|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
| #
1490f871 |
| 21-Jun-2022 |
Jason Molenda <[email protected]> |
Roll back Michał's changes to debugserver, not meant for there
Michał's change in https://reviews.llvm.org/D127193 did a search & replace for a pattern that also appears in debugserver, but it shoul
Roll back Michał's changes to debugserver, not meant for there
Michał's change in https://reviews.llvm.org/D127193 did a search & replace for a pattern that also appears in debugserver, but it shouldn't be done there.
show more ...
|
| #
d6b3de72 |
| 20-Jun-2022 |
Michał Górny <[email protected]> |
[lldb] [llgs] Fix signo sent with fork/vfork/vforkdone events
Fix ThreadStopInfo struct to include the signal number for all events. Since signo was not included in the details for fork, vfork and v
[lldb] [llgs] Fix signo sent with fork/vfork/vforkdone events
Fix ThreadStopInfo struct to include the signal number for all events. Since signo was not included in the details for fork, vfork and vforkdone stops, the code incidentally referenced the wrong union member, resulting in wrong signo being sent.
Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D127193
show more ...
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
bff4673b |
| 11-May-2022 |
Jim Ingham <[email protected]> |
Add a darwin platform setting to specify which exceptions debugserver should not receive as exceptions (some will get converted to BSD signals instead). This is really the only stable way to ensure
Add a darwin platform setting to specify which exceptions debugserver should not receive as exceptions (some will get converted to BSD signals instead). This is really the only stable way to ensure that a Mach exception gets converted to it's equivalent BSD signal. For programs that rely on BSD signal handlers, this has to happen or you can't even get the program to invoke the signal handler when under the debugger.
This builds on a previous solution to this problem which required you start debugserver with the -U flag. This was not very discoverable and required lldb be the one to launch debugserver, which is not always the case.
Differential Revision: https://reviews.llvm.org/D125434
show more ...
|
| #
eb3136f0 |
| 02-May-2022 |
Alexandre Perez <[email protected]> |
Fix debugserver translation check
Currently, debugserver has a test to check if it was launched in translation. The intent was to cover the case where an x86_64 debugserver attempts to control an ar
Fix debugserver translation check
Currently, debugserver has a test to check if it was launched in translation. The intent was to cover the case where an x86_64 debugserver attempts to control an arm64/arm64e process, returning an error. However, this check also covers the case where users are attaching to an x86_64 process, exiting out before attempting to hand off control to the translated debugserver at `/Library/Apple/usr/libexec/oah/debugserver`.
This diff delays the debugserver translation check until after determining whether to hand off control to `/Library/Apple/usr/libexec/oah/debugserver`. Only when the process is not translated and thus has not been handed off do we check if the debugserver is translated, erroring out in that case.
Reviewed By: jasonmolenda
Differential Revision: https://reviews.llvm.org/D124814
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
7ebcd889 |
| 04-Apr-2022 |
Jason Molenda <[email protected]> |
Add DumpBinaryEscaped method to JSONGenerator, avoid extra copy
All uses of JSONGenerator in debugserver would create a JSON text dump of the object collection, then copy that string into a binary-e
Add DumpBinaryEscaped method to JSONGenerator, avoid extra copy
All uses of JSONGenerator in debugserver would create a JSON text dump of the object collection, then copy that string into a binary-escaped string, then send it up to the lldb side or make a compressed version and send that.
This adds a DumpBinaryEscaped method to JSONGenerator which does the gdb remote serial protocol binary escaping directly, and removes the need to pass over the string and have an additional copy in memory.
Differential Revision: https://reviews.llvm.org/D122882 rdar://91117456
show more ...
|
| #
c04fdfa1 |
| 01-Apr-2022 |
Jason Molenda <[email protected]> |
Update callers to SendPacket with std::string's to not devolve to c-strs
Many callers of SendPacket() in RNBRemote.cpp have a local std::string object, call c_str() on it to pass a c-string, which i
Update callers to SendPacket with std::string's to not devolve to c-strs
Many callers of SendPacket() in RNBRemote.cpp have a local std::string object, call c_str() on it to pass a c-string, which is then copied into a std::string temporary object.
Also free JSONGenerator objects once we've formatted them into ostringstream and don't need the objects any longer, to reduce max memory use in debugserver.
Differential Revision: https://reviews.llvm.org/D122848 rdar://91117263
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
ca7f06fc |
| 17-Feb-2022 |
Adrian Prantl <[email protected]> |
add missing include
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
18d883cc |
| 10-Nov-2021 |
Jonas Devlieghere <[email protected]> |
[debugserver] Remove varaible `ldb_set` which is set but not used.
Differential revision: https://reviews.llvm.org/D113598
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
3f137236 |
| 14-Aug-2021 |
Michał Górny <[email protected]> |
[lldb] Support gdbserver signals
GDB and LLDB use different signal models. GDB uses a predefined set of signal codes, and maps platform's signos to them. On the other hand, LLDB has historically s
[lldb] Support gdbserver signals
GDB and LLDB use different signal models. GDB uses a predefined set of signal codes, and maps platform's signos to them. On the other hand, LLDB has historically simply passed native signos.
In order to improve compatibility between LLDB and gdbserver, the GDB signal model should be used. However, GDB does not provide a mapping for all existing signals on Linux and unsupported signals are passed as 'unknown'. Limiting LLDB to this behavior could be considered a regression.
To get the best of both worlds, use the LLDB signal model when talking to lldb-server, and the GDB signal model otherwise. For this purpose, new versions of lldb-server indicate "native-signals+" via qSupported. At the same time, we also detect older versions of lldb-server via QThreadSuffixSupported for backwards compatibility. If neither test succeeds, we assume gdbserver or another implementation using GDB model.
Differential Revision: https://reviews.llvm.org/D108078
show more ...
|
| #
ec2d0ded |
| 26-Sep-2021 |
Michał Górny <[email protected]> |
[lldb] Remove "0x" prefix from hex values in dirty-pages
Remove the redudant "0x" prefix in the "dirty-pages" key of qMemoryRegionInfo packet. The client accepts hex values both with and without th
[lldb] Remove "0x" prefix from hex values in dirty-pages
Remove the redudant "0x" prefix in the "dirty-pages" key of qMemoryRegionInfo packet. The client accepts hex values both with and without the prefix.
Differential Revision: https://reviews.llvm.org/D110510
show more ...
|
| #
2b30fc2f |
| 12-Aug-2021 |
Jason Molenda <[email protected]> |
Fix two bugs with stack corefiles patch, restrict test built debugserver
These two tests, TestSkinnyCorefile.py and TestStackCorefile.py, require a new debugserver on darwin systems to run correctly
Fix two bugs with stack corefiles patch, restrict test built debugserver
These two tests, TestSkinnyCorefile.py and TestStackCorefile.py, require a new debugserver on darwin systems to run correctly; for now, skip them if the system debugserver is in use. There's no easy way to test if the debugserver being used supports either of these memory region info features. For end users, the fallback will be a full corefile and that's not the worst thing, but for the tests it is a problem.
show more ...
|
| #
8c31efee |
| 11-Aug-2021 |
Jason Molenda <[email protected]> |
Add the ability to process save-core stack-memory-only corefiles
Add a field to the qMemoryRegionInfo packet where the remote stub can describe the type of memory -- heap, stack. Keep track of memo
Add the ability to process save-core stack-memory-only corefiles
Add a field to the qMemoryRegionInfo packet where the remote stub can describe the type of memory -- heap, stack. Keep track of memory regions that are stack memory in lldb. Add a new "--style stack" to process save-core to request that only stack memory be included in the corefile.
Differential Revision: https://reviews.llvm.org/D107625
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
b2e25572 |
| 20-Jul-2021 |
Jason Molenda <[email protected]> |
Remove the DarwinLog functionality from debguserver
Remove the DarwinLog and qStructuredDataPlugins support from debugserver. The DarwinLog plugin was never debugged fully and made reliable, and th
Remove the DarwinLog functionality from debguserver
Remove the DarwinLog and qStructuredDataPlugins support from debugserver. The DarwinLog plugin was never debugged fully and made reliable, and the underlying private APIs it uses have migrated since 2016 so none of them exist any longer.
Differential Revision: https://reviews.llvm.org/D106324 rdar://75073283
show more ...
|
| #
b5a84e21 |
| 16-Jul-2021 |
Jonas Devlieghere <[email protected]> |
[debugserver] Un-conditionalize code guarded by macOS 10.10 checks
We've been requiring macOS 10.11 since 2018 so there's no point in keeping code for 10.10 around.
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
| #
9ea6dd5c |
| 20-Jun-2021 |
Jason Molenda <[email protected]> |
Add a corefile style option to process save-core; skinny corefiles
Add a new feature to process save-core on Darwin systems -- for lldb to create a user process corefile with only the dirty (modifie
Add a corefile style option to process save-core; skinny corefiles
Add a new feature to process save-core on Darwin systems -- for lldb to create a user process corefile with only the dirty (modified memory) pages included. All of the binaries that were used in the corefile are assumed to still exist on the system for the duration of the use of the corefile. A new --style option to process save-core is added, so a full corefile can be requested if portability across systems, or across time, is needed for this corefile.
debugserver can now identify the dirty pages in a memory region when queried with qMemoryRegionInfo, and the size of vm pages is given in qHostInfo.
Create a new "all image infos" LC_NOTE for Mach-O which allows us to describe all of the binaries that were loaded in the process -- load address, UUID, file path, segment load addresses, and optionally whether code from the binary was executing on any thread. The old "read dyld_all_image_infos and then the in-memory Mach-O load commands to get segment load addresses" no longer works when we only have dirty memory.
rdar://69670807 Differential Revision: https://reviews.llvm.org/D88387
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc2 |
|
| #
76e47d48 |
| 26-May-2021 |
Raphael Isemann <[email protected]> |
[lldb][NFC] Use C++ versions of the deprecated C standard library headers
The C headers are deprecated so as requested in D102845, this is replacing them all with their (not deprecated) C++ equivale
[lldb][NFC] Use C++ versions of the deprecated C standard library headers
The C headers are deprecated so as requested in D102845, this is replacing them all with their (not deprecated) C++ equivalent.
Reviewed By: shafik
Differential Revision: https://reviews.llvm.org/D103084
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1 |
|
| #
0c443e92 |
| 13-May-2021 |
Jason Molenda <[email protected]> |
Add some warnings when debugserver is running in translation
A debugserver launched x86_64 cannot control an arm64/arm64e process on an Apple Silicon system. Warn when this situation has happened a
Add some warnings when debugserver is running in translation
A debugserver launched x86_64 cannot control an arm64/arm64e process on an Apple Silicon system. Warn when this situation has happened and return an error for the most common case of attach. I think there will be refinements to this in the future, but start out by making it easy to spot the problem when it happens.
rdar://76630595
show more ...
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init |
|
| #
ad25bdcb |
| 23-Jan-2021 |
Jason Molenda <[email protected]> |
Change static buffer to be BSS instead of DATA in HandlePacket_qSpeedTest
Having this 4MB buffer with a compile-time initialized string forced it into the DATA section and it took up 4MB of space in
Change static buffer to be BSS instead of DATA in HandlePacket_qSpeedTest
Having this 4MB buffer with a compile-time initialized string forced it into the DATA section and it took up 4MB of space in the binary, which accounts for like 80% of debugserver's footprint on disk. Change it to BSS and strcpy in the initial value at runtime instead.
<rdar://problem/73503892>
show more ...
|
|
Revision tags: llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
| #
edde2eb1 |
| 12-Jan-2021 |
Jason Molenda <[email protected]> |
Add unconditional logging to debugserver for launch/attach processes
Debugging app launch/attach failures can be difficult because of all of the messages logged to the console on a darwin system; em
Add unconditional logging to debugserver for launch/attach processes
Debugging app launch/attach failures can be difficult because of all of the messages logged to the console on a darwin system; emitting specific messages around critical API calls can make it easier to narrow the search for the console messages related to the failure.
<rdar://problem/67220442>
Differential revision: https://reviews.llvm.org/D94357
show more ...
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
27012c0f |
| 17-Nov-2020 |
Alessandro Arzilli <[email protected]> |
[debugserver] Add option to propagate SIGSEGV to target process
Adds a command line option that makes debugserver propagate the SIGSEGV signal to the target process.
Motivation: I'm one of the main
[debugserver] Add option to propagate SIGSEGV to target process
Adds a command line option that makes debugserver propagate the SIGSEGV signal to the target process.
Motivation: I'm one of the maintainers of Delve [1] a debugger for Go. We use debugserver as our backend on macOS and one of the most often reported bugs is that, on macOS, we don't propagate SIGSEGV back to the target process [2]. Sometimes some programs will actually cause a SIGSEGV, by design, and then handle it. Those programs can not be debugged at all.
Since catching signals isn't very important for a Go debugger I'd much rather have a command line option in debugserver that causes it to let SIGSEGV go directly to the target process.
[1] https://github.com/go-delve/delve/ [2] https://github.com/go-delve/delve/issues/852
Differential revision: https://reviews.llvm.org/D89315
show more ...
|
| #
b1985688 |
| 15-Oct-2020 |
Jason Molenda <[email protected]> |
Fix typeo in attach failed error message. <rdar://problem/70296751>
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
| #
f0699d91 |
| 03-Sep-2020 |
Raphael Isemann <[email protected]> |
[debugserver] Fix that debugserver's stop reply packets always return signal code 0
If our process terminates due to an unhandled signal, we are supposed to get the signal code via WTERMSIG. However
[debugserver] Fix that debugserver's stop reply packets always return signal code 0
If our process terminates due to an unhandled signal, we are supposed to get the signal code via WTERMSIG. However, we instead try to get the exit status via WEXITSTATUS which just ends up always calculating signal code 0 (at least on the macOS implementation where it just shifts the signal code bits away and we're left with only 0 bits).
The exit status calculation on the LLDB side also seems a bit off as it claims an exit status that is just the signal code (instead of for example 128 + signal code), but that will be another patch.
Reviewed By: jasonmolenda
Differential Revision: https://reviews.llvm.org/D86336
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
| #
7e9bab6a |
| 25-Jul-2020 |
Adrian Prantl <[email protected]> |
Fix debugserver's qProcessInfo reporting of maccatalyst binaries
This patch is similar in spirit to https://reviews.llvm.org/D84480, but does the maccatalyst/macosx disambiguation. I also took the o
Fix debugserver's qProcessInfo reporting of maccatalyst binaries
This patch is similar in spirit to https://reviews.llvm.org/D84480, but does the maccatalyst/macosx disambiguation. I also took the opportunity to factor out the gdb-remote packet log scanning used by several testcases into lldbutil functions.
rdar://problem/66059257
Differential Revision: https://reviews.llvm.org/D84576
show more ...
|
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
2276bb48 |
| 23-Jun-2020 |
Davide Italiano <[email protected]> |
[debugserver] Initial support for Apple Silicon.
Set the correct os type in the arch triple when running macOS. Debugserver currently always assumes macOS == x86_64. This patch generalizes the suppo
[debugserver] Initial support for Apple Silicon.
Set the correct os type in the arch triple when running macOS. Debugserver currently always assumes macOS == x86_64. This patch generalizes the support to make sure it works on a different architecture.
Differential Revision: https://reviews.llvm.org/D82394
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1 |
|
| #
2b8b783b |
| 12-May-2020 |
Jason Molenda <[email protected]> |
Quote error string from qLaunchSuccess
If the error message from qLaunchSucess included a gdb RSP metacharacter, it could crash lldb. Apply the binary escaping to the string before sending it to ll
Quote error string from qLaunchSuccess
If the error message from qLaunchSucess included a gdb RSP metacharacter, it could crash lldb. Apply the binary escaping to the string before sending it to lldb; lldb promiscuously applies the binary escaping protocol on packets it receives.
Also fix a small bug in cstring_to_asciihex_string where a high bit character (eg utf-8 chars) would not be quoted correctly due to signed char fun.
Differential Revision: https://reviews.llvm.org/D79614
rdar://problem/62873581
show more ...
|