Revision tags: llvmorg-13.0.1-rc1, 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 <mgorny@moritz.systems> |
[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 ...
|
#
6d48e250 |
| 05-Nov-2021 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Use std::string instead of llvm::Twine in GDBRemoteCommunicationClient
From the documentation:
A Twine is not intended for use directly and should not be stored, its implementation relie
[lldb] Use std::string instead of llvm::Twine in GDBRemoteCommunicationClient
From the documentation:
A Twine is not intended for use directly and should not be stored, its implementation relies on the ability to store pointers to temporary stack objects which may be deallocated at the end of a statement. Twines should only be used accepted as const references in arguments, when an API wishes to accept possibly-concatenated strings.
rdar://84799118
Differential revision: https://reviews.llvm.org/D113314
show more ...
|
#
f5158ca4 |
| 26-Oct-2021 |
Pavel Labath <pavel@labath.sk> |
Modernize Platform::GetOSKernelDescription
|
#
40e4ac3e |
| 25-Oct-2021 |
Pavel Labath <pavel@labath.sk> |
[lldb] Modernize Platform::GetOSBuildString
|
#
4ba9d9c8 |
| 24-Oct-2021 |
Kazu Hirata <kazu@google.com> |
Use StringRef::contains (NFC)
|
#
66e06cc8 |
| 27-Sep-2021 |
Michał Górny <mgorny@moritz.systems> |
[llvm] [ADT] Update llvm::Split() per Pavel Labath's suggestions
Optimize the iterator comparison logic to compare Current.data() pointers. Use std::tie for assignments from std::pair. Replace the
[llvm] [ADT] Update llvm::Split() per Pavel Labath's suggestions
Optimize the iterator comparison logic to compare Current.data() pointers. Use std::tie for assignments from std::pair. Replace the custom class with a function returning iterator_range.
Differential Revision: https://reviews.llvm.org/D110535
show more ...
|
#
f4145c07 |
| 07-Oct-2021 |
Pavel Labath <pavel@labath.sk> |
[lldb/gdb-remote] Refactor ReadExtFeature
replace stl and lldb apis with standard llvm ones.
|
#
81a2f393 |
| 07-Oct-2021 |
Pavel Labath <pavel@labath.sk> |
[lldb/gdb-remote] Delete SendPacketsAndConcatenateResponses
ReadExtFeature provides equivalent functionality. Also fix a but in ReadExtFeature, which prevented it from being used for auxv data (it c
[lldb/gdb-remote] Delete SendPacketsAndConcatenateResponses
ReadExtFeature provides equivalent functionality. Also fix a but in ReadExtFeature, which prevented it from being used for auxv data (it contains nul characters).
show more ...
|
#
156cb4cc |
| 27-Sep-2021 |
Pavel Labath <pavel@labath.sk> |
[lldb] Remove non-stop mode code
We added some support for this mode back in 2015, but the feature was never productionized. It is completely untested, and there are known major structural lldb issu
[lldb] Remove non-stop mode code
We added some support for this mode back in 2015, but the feature was never productionized. It is completely untested, and there are known major structural lldb issues that need to be resolved before this feature can really be supported.
It also complicates making further changes to stop reply packet handling, which is what I am about to do.
Differential Revision: https://reviews.llvm.org/D110553
show more ...
|
#
f4b71e34 |
| 26-Sep-2021 |
Michał Górny <mgorny@moritz.systems> |
[llvm] [ADT] Add a range/iterator-based Split()
Add a llvm::Split() implementation that can be used via range-for loop, e.g.:
for (StringRef x : llvm::Split("foo,bar,baz", ',')) ...
The
[llvm] [ADT] Add a range/iterator-based Split()
Add a llvm::Split() implementation that can be used via range-for loop, e.g.:
for (StringRef x : llvm::Split("foo,bar,baz", ',')) ...
The implementation uses an additional SplittingIterator class that uses StringRef::split() internally.
Differential Revision: https://reviews.llvm.org/D110496
show more ...
|
#
e2f780fb |
| 25-Sep-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Use llvm::StringRef.split() and llvm::to_integer()
Replace the uses of StringConvert combined with hand-rolled array splitting with llvm::StringRef.split() and llvm::to_integer()
[lldb] [gdb-remote] Use llvm::StringRef.split() and llvm::to_integer()
Replace the uses of StringConvert combined with hand-rolled array splitting with llvm::StringRef.split() and llvm::to_integer().
Differential Revision: https://reviews.llvm.org/D110472
show more ...
|
#
953ddded |
| 16-Sep-2021 |
Ted Woodward <tedwood@quicinc.com> |
[lldb] Handle malformed qfThreadInfo reply
If the remote gdbserver's qfThreadInfo reply has a trailing comma, GDBRemoteCommunicationClient::GetCurrentProcessAndThreadIDs will return an empty vector
[lldb] Handle malformed qfThreadInfo reply
If the remote gdbserver's qfThreadInfo reply has a trailing comma, GDBRemoteCommunicationClient::GetCurrentProcessAndThreadIDs will return an empty vector of thread ids. This will cause lldb to recurse through three functions trying to get the list of threads, until it blows its stack and crashes.
A trailing comma is a malformed response, but it shouldn't cause lldb to crash. This patch will return the tids received before the malformed response.
Reviewed By: clayborg, labath
Differential Revision: https://reviews.llvm.org/D109937
show more ...
|
#
b1099120 |
| 19-Sep-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Always send PID when detaching w/ multiprocess
Always send PID in the detach packet when multiprocess extensions are enabled. This is required by qemu's GDB server, as plain 'D'
[lldb] [gdb-remote] Always send PID when detaching w/ multiprocess
Always send PID in the detach packet when multiprocess extensions are enabled. This is required by qemu's GDB server, as plain 'D' packet results in an error and the emulated system is not resumed.
Differential Revision: https://reviews.llvm.org/D110033
show more ...
|
#
3d3017d3 |
| 16-Aug-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Use standardized GDB errno values
GDB uses normalized errno values for vFile errors. Implement the translation between them and system errno values in the gdb-remote plugin.
Di
[lldb] [gdb-remote] Use standardized GDB errno values
GDB uses normalized errno values for vFile errors. Implement the translation between them and system errno values in the gdb-remote plugin.
Differential Revision: https://reviews.llvm.org/D108148
show more ...
|
#
3fade954 |
| 12-Aug-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Support QEnvironment fallback to hex-encoded
Fall back to QEnvironmentHexEncoded if QEnvironment is not supported. The latter packet is an LLDB extension, while the former is uni
[lldb] [gdb-remote] Support QEnvironment fallback to hex-encoded
Fall back to QEnvironmentHexEncoded if QEnvironment is not supported. The latter packet is an LLDB extension, while the former is universally supported.
Add tests for both QEnvironment and QEnvironmentHexEncoded packets, including both use due to characters that need escaping and fallback when QEnvironment is not supported.
Differential Revision: https://reviews.llvm.org/D108018
show more ...
|
#
6ba3f723 |
| 11-Aug-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Implement the vRun packet
Implement the simpler vRun packet and prefer it over the A packet. Unlike the latter, it tranmits command-line arguments without redundant indices and l
[lldb] [gdb-remote] Implement the vRun packet
Implement the simpler vRun packet and prefer it over the A packet. Unlike the latter, it tranmits command-line arguments without redundant indices and lengths. This also improves GDB compatibility since modern versions of gdbserver do not implement the A packet at all.
Make qLaunchSuccess not obligatory when using vRun. It is not implemented by gdbserver, and since vRun returns the stop reason, we can assume it to be successful.
Differential Revision: https://reviews.llvm.org/D107931
show more ...
|
#
501eaf88 |
| 10-Aug-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Add fallbacks for vFile:mode and vFile:exists
Add a GDB-compatible fallback to vFile:fstat for vFile:mode, and to vFile:open for vFile:exists. Note that this is only partial fal
[lldb] [gdb-remote] Add fallbacks for vFile:mode and vFile:exists
Add a GDB-compatible fallback to vFile:fstat for vFile:mode, and to vFile:open for vFile:exists. Note that this is only partial fallback, as it fails if the file cannot be opened.
Differential Revision: https://reviews.llvm.org/D107811
show more ...
|
#
21e2d7ce |
| 09-Aug-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Implement fallback to vFile:stat for GetFileSize()
Implement a fallback to getting the file size via vFile:stat packet when the remote server does not implement vFile:size. This
[lldb] [gdb-remote] Implement fallback to vFile:stat for GetFileSize()
Implement a fallback to getting the file size via vFile:stat packet when the remote server does not implement vFile:size. This makes it possible to query file sizes from remote gdbserver.
Note that unlike vFile:size, the fallback will not work if the server is unable to open the file.
While at it, add a few tests for the 'platform get-size' command.
Differential Revision: https://reviews.llvm.org/D107780
show more ...
|
#
f3472ad5 |
| 10-Sep-2021 |
Jason Molenda <jason@molenda.com> |
Add specific error messages around gdb RSP handshake failures
Report timeout exceeded and connection lost error messages when sending the initial handshake packet in a gdb remote serial protocol con
Add specific error messages around gdb RSP handshake failures
Report timeout exceeded and connection lost error messages when sending the initial handshake packet in a gdb remote serial protocol connection, an especially fragile time.
Differential Revision: https://reviews.llvm.org/D108888
show more ...
|
#
d2189b5c |
| 08-Sep-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb] Remove unused GDBRemoteCommunicationClient::SendAttach function
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D109427
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
25fbbc59 |
| 26-Apr-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] Support SaveCore() from gdb-remote client
Extend PluginManager::SaveCore() to support saving core dumps via Process plugins. Implement the client-side part of qSaveCore request in the gdb-re
[lldb] Support SaveCore() from gdb-remote client
Extend PluginManager::SaveCore() to support saving core dumps via Process plugins. Implement the client-side part of qSaveCore request in the gdb-remote plugin, that creates the core dump on the remote host and then uses vFile packets to transfer it.
Differential Revision: https://reviews.llvm.org/D101329
show more ...
|
#
0a1d80d5 |
| 09-Apr-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote client] Support minimal fork/vfork handling
Add a support for handling fork/vfork stops in LLGS client. At this point, it only sends a detach packet for the newly forked child (a
[lldb] [gdb-remote client] Support minimal fork/vfork handling
Add a support for handling fork/vfork stops in LLGS client. At this point, it only sends a detach packet for the newly forked child (and implicitly resumes the parent).
Differential Revision: https://reviews.llvm.org/D100206
show more ...
|
#
8c31efee |
| 11-Aug-2021 |
Jason Molenda <jason@molenda.com> |
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 ...
|
#
9929cfbc |
| 04-Aug-2021 |
Michał Górny <mgorny@moritz.systems> |
[lldb] [gdb-remote] Use hexadecimal numbers in vFile packats for GDB compliance
Use hexadecimal numbers rather than decimal in various vFile packets in order to fix compatibility with gdbserver. Th
[lldb] [gdb-remote] Use hexadecimal numbers in vFile packats for GDB compliance
Use hexadecimal numbers rather than decimal in various vFile packets in order to fix compatibility with gdbserver. This also changes the few custom LLDB packets -- while technically they do not have to be changed, it is easier to use the same syntax consistently across LLDB.
Differential Revision: https://reviews.llvm.org/D107475
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
5ea091a8 |
| 31-Mar-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb][AArch64] Add memory tag writing to lldb
This adds memory tag writing to Process and the GDB remote code. Supporting work for the "memory tag write" command. (to follow)
Process WriteMemoryTa
[lldb][AArch64] Add memory tag writing to lldb
This adds memory tag writing to Process and the GDB remote code. Supporting work for the "memory tag write" command. (to follow)
Process WriteMemoryTags is similair to ReadMemoryTags. It will pack the tags then call DoWriteMemoryTags. That function will send the QMemTags packet to the gdb-remote.
The QMemTags packet follows the GDB specification in: https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets
Note that lldb-server will be treating partial writes as complete failures. So lldb doesn't need to handle the partial write case in any special way.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D105181
show more ...
|