Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
5d343620 |
| 19-Feb-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb][AArch64] Add MTE memory tag reading to lldb
This adds GDB client support for the qMemTags packet which reads memory tags. Following the design which was recently committed to GDB.
https://so
[lldb][AArch64] Add MTE memory tag reading to lldb
This adds GDB client support for the qMemTags packet which reads memory tags. Following the design which was recently committed to GDB.
https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets (look for qMemTags)
lldb commands will use the new Process methods GetMemoryTagManager and ReadMemoryTags.
The former takes a range and checks that: * The current process architecture has an architecture plugin * That plugin provides a MemoryTagManager * That the range of memory requested lies in a tagged range (it will expand it to granules for you)
If all that was true you get a MemoryTagManager you can give to ReadMemoryTags.
This two step process is done to allow commands to get the tag manager without having to read tags as well. For example you might just want to remove a logical tag, or error early if a range with tagged addresses is inverted.
Note that getting a MemoryTagManager doesn't mean that the process or a specific memory range is tagged. Those are seperate checks. Having a tag manager just means this architecture *could* have a tagging feature enabled.
An architecture plugin has been added for AArch64 which will return a MemoryTagManagerAArch64MTE, which was added in a previous patch.
Reviewed By: omjavaid
Differential Revision: https://reviews.llvm.org/D95602
show more ...
|
#
bf9f21a2 |
| 01-Jun-2021 |
Walter Erquinigo <wallace@fb.com> |
[trace][intel-pt] Create basic SB API
This adds a basic SB API for creating and stopping traces. Note: This doesn't add any APIs for inspecting individual instructions. That'd be a more complicated
[trace][intel-pt] Create basic SB API
This adds a basic SB API for creating and stopping traces. Note: This doesn't add any APIs for inspecting individual instructions. That'd be a more complicated change and it might be better to enhande the dump functionality to output the data in binary format. I'll leave that for a later diff.
This also enhances the existing tests so that they test the same flow using both the command interface and the SB API.
I also did some cleanup of legacy code.
Differential Revision: https://reviews.llvm.org/D103500
show more ...
|
#
82a38837 |
| 17-May-2021 |
Jim Ingham <jingham@apple.com> |
Revert "Reset the wakeup timeout when we re-enter the continue wait."
This reverts commit bd5751f3d249ec0798060bd98c07272174c52af0. This patch series is causing us to every so often miss switching t
Revert "Reset the wakeup timeout when we re-enter the continue wait."
This reverts commit bd5751f3d249ec0798060bd98c07272174c52af0. This patch series is causing us to every so often miss switching the state from eStateRunning to eStateStopped when we get the stop packet from the debug server.
Reverting till I can figure out how that could be happening.
show more ...
|
#
9558b602 |
| 06-May-2021 |
Jim Ingham <jingham@apple.com> |
Add an "interrupt timeout" to Process, and pipe that through the ProcessGDBRemote plugin layers.
Also fix a bug where if we tried to interrupt, but the ReadPacket wakeup timer woke us up just after
Add an "interrupt timeout" to Process, and pipe that through the ProcessGDBRemote plugin layers.
Also fix a bug where if we tried to interrupt, but the ReadPacket wakeup timer woke us up just after the timeout, we would break out the switch, but then since we immediately check if the response is empty & fail if it is, we could end up actually only giving a small interval to the interrupt.
Differential Revision: https://reviews.llvm.org/D102085
show more ...
|
#
a4ee79c8 |
| 31-Mar-2021 |
Walter Erquinigo <a20012251@gmail.com> |
Fix errors in 0b69756110db444282c40ea16929186b2910c3b1
Errors found in https://lab.llvm.org/buildbot/#/builders/68/builds/9681/steps/6/logs/stdio
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
0b697561 |
| 09-Nov-2020 |
Walter Erquinigo <a20012251@gmail.com> |
[trace][intel-pt] Implement trace start and trace stop
This implements the interactive trace start and stop methods.
This diff ended up being much larger than I anticipated because, by doing it, I
[trace][intel-pt] Implement trace start and trace stop
This implements the interactive trace start and stop methods.
This diff ended up being much larger than I anticipated because, by doing it, I found that I had implemented in the beginning many things in a non optimal way. In any case, the code is much better now.
There's a lot of boilerplate code due to the gdb-remote protocol, but the main changes are:
- New tracing packets: jLLDBTraceStop, jLLDBTraceStart, jLLDBTraceGetBinaryData. The gdb-remote packet definitions are quite comprehensive. - Implementation of the "process trace start|stop" and "thread trace start|stop" commands. - Implementaiton of an API in Trace.h to interact with live traces. - Created an IntelPTDecoder for live threads, that use the debugger's stop id as checkpoint for its internal cache. - Added a functionality to stop the process in case "process tracing" is enabled and a new thread can't traced. - Added tests
I have some ideas to unify the code paths for post mortem and live threads, but I'll do that in another diff.
Differential Revision: https://reviews.llvm.org/D91679
show more ...
|
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, llvmorg-11.0.0-rc2 |
|
#
32541685 |
| 17-Aug-2020 |
David Spickett <david.spickett@linaro.org> |
[lldb][AArch64/Linux] Show memory tagged memory regions
This extends the "memory region" command to show tagged regions on AArch64 Linux when the MTE extension is enabled.
(lldb) memory region the_
[lldb][AArch64/Linux] Show memory tagged memory regions
This extends the "memory region" command to show tagged regions on AArch64 Linux when the MTE extension is enabled.
(lldb) memory region the_page [0x0000fffff7ff8000-0x0000fffff7ff9000) rw- memory tagging: enabled
This is done by adding an optional "flags" field to the qMemoryRegion packet. The only supported flag is "mt" but this can be extended.
This "mt" flag is read from /proc/{pid}/smaps on Linux, other platforms will leave out the "flags" field.
Where this "mt" flag is received "memory region" will show that it is enabled. If it is not or the target doesn't support memory tagging, the line is not shown. (since majority of the time tagging will not be enabled)
Testing is added for the existing /proc/{pid}/maps parsing and the new smaps parsing. Minidump parsing has been updated where needed, though it only uses maps not smaps.
Target specific tests can be run with QEMU and I have added MTE flags to the existing helper scripts.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D87442
show more ...
|
#
d2f18e6b |
| 11-Nov-2020 |
Walter Erquinigo <a20012251@gmail.com> |
Fix 21555fff4de811309ea7935f9cb65578c957d77f
Buildbot failed on Windows http://lab.llvm.org:8011/#/builders/83/builds/693
Error: On Windows, std::future can't hold an Expected, as it doesn't have a
Fix 21555fff4de811309ea7935f9cb65578c957d77f
Buildbot failed on Windows http://lab.llvm.org:8011/#/builders/83/builds/693
Error: On Windows, std::future can't hold an Expected, as it doesn't have a default constructor.
Solution: Use std::future<bool> instead of std::future<Expected<T>>
show more ...
|
#
21555fff |
| 29-Oct-2020 |
Walter Erquinigo <a20012251@gmail.com> |
[intel-pt][trace] Implement a "get supported trace type" packet
Depends on D89283.
The goal of this packet (jTraceGetSupportedType) is to be able to query the gdb-server for the tracing technology
[intel-pt][trace] Implement a "get supported trace type" packet
Depends on D89283.
The goal of this packet (jTraceGetSupportedType) is to be able to query the gdb-server for the tracing technology that can work for the current debuggeer, which can make the user experience simpler but allowing the user to simply type
thread trace start
to start tracing the current thread without even telling the debugger to use "intel-pt", for example. Similarly, `thread trace start [args...]` would accept args beloging to the working trace type.
Also, if the user typed
help thread trace start
We could directly show the help information of the trace type that is supported for the target, or mention instead that no tracing is supported, if that's the case.
I added some simple tests, besides, when I ran this on my machine with intel-pt support, I got
$ process plugin packet send "jTraceSupportedType" packet: jTraceSupportedType response: {"description":"Intel Processor Trace","pluginName":"intel-pt"}
On a machine without intel-pt support, I got
$ process plugin packet send "jTraceSupportedType" packet: jTraceSupportedType response: E00;
Reviewed By: clayborg, labath
Differential Revision: https://reviews.llvm.org/D90490
show more ...
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
d4eca120 |
| 13-Feb-2020 |
Pavel Labath <pavel@labath.sk> |
[lldb/gdb-remote] Add support for the qOffsets packet
Summary: This packet is necessary to make lldb work with the remote-gdb stub in user mode qemu when running position-independent binaries. It re
[lldb/gdb-remote] Add support for the qOffsets packet
Summary: This packet is necessary to make lldb work with the remote-gdb stub in user mode qemu when running position-independent binaries. It reports the relative position (load bias) of the loaded executable wrt. the addresses in the file itself.
Lldb needs to know this information in order to correctly set the load address of the executable. Normally, lldb would be able to find this out on its own by following the breadcrumbs in the process auxiliary vector, but we can't do this here because qemu does not support the qXfer:auxv:read packet.
This patch does not implement full scope of the qOffsets packet (it only supports packets with identical code, data and bss offsets), because it is not fully clear how should the different offsets be handled and I am not aware of a producer which would make use of this feature (qemu will always <https://github.com/qemu/qemu/blob/master/linux-user/elfload.c#L2436> return the same value for code and data offsets). In fact, even gdb ignores the offset for the bss sections, and uses the "data" offset instead. So, until the we need more of this packet, I think it's best to stick to the simplest solution possible. This patch simply rejects replies with non-uniform offsets.
Reviewers: clayborg, jasonmolenda
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74598
show more ...
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
777180a3 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[ADT] Make StringRef's std::string conversion operator explicit
This has the same behavior as converting std::string_view to std::string. This is an expensive conversion, so explicit conversions are
[ADT] Make StringRef's std::string conversion operator explicit
This has the same behavior as converting std::string_view to std::string. This is an expensive conversion, so explicit conversions are helpful for avoiding unneccessary string copies.
show more ...
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
#
80814287 |
| 24-Jan-2020 |
Raphael Isemann <teemperor@gmail.com> |
[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp ----------------------------------------
[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files).
This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line).
Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73258
show more ...
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
2783d817 |
| 01-Oct-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[JSON] Use LLVM's library for encoding JSON in StructuredData
This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library.
Differential revision: https://reviews.ll
[JSON] Use LLVM's library for encoding JSON in StructuredData
This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library.
Differential revision: https://reviews.llvm.org/D68248
llvm-svn: 373359
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
#
9e046f02 |
| 13-Nov-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
Add GDB remote packet reproducer.
llvm-svn: 346780
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
8f3be7a3 |
| 01-Nov-2018 |
Jonas Devlieghere <jonas@devlieghere.com> |
[FileSystem] Move path resolution logic out of FileSpec
This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead.
Differential
[FileSystem] Move path resolution logic out of FileSpec
This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead.
Differential revision: https://reviews.llvm.org/D53915
llvm-svn: 345890
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
2f93fd1f |
| 26-Jun-2018 |
Pavel Labath <labath@google.com> |
Represent invalid UUIDs as UUIDs with length zero
Summary: During the previous attempt to generalize the UUID class, it was suggested that we represent invalid UUIDs as length zero (previously, we u
Represent invalid UUIDs as UUIDs with length zero
Summary: During the previous attempt to generalize the UUID class, it was suggested that we represent invalid UUIDs as length zero (previously, we used an all-zero UUID for that). This meant that some valid build-ids could not be represented (it's possible however unlikely that a checksum of some file would be zero) and complicated adding support for variable length build-ids (should a 16-byte empty UUID compare equal to a 20-byte empty UUID?).
This patch resolves these issues by introducing a canonical representation for an invalid UUID. The slight complication here is that some clients (MachO) actually use the all-zero notation to mean "no UUID has been set". To keep this use case working (while making it very explicit about which construction semantices are wanted), replaced the UUID constructors and the SetBytes functions with named factory methods. - "fromData" creates a UUID from the given data, and it treats all bytes equally. - "fromOptionalData" first checks the data contents - if all bytes are zero, it treats this as an invalid/empty UUID.
Reviewers: clayborg, sas, lemo, davide, espindola
Subscribers: emaste, lldb-commits, arichardson
Differential Revision: https://reviews.llvm.org/D48479
llvm-svn: 335612
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2 |
|
#
2cb7cf8e |
| 14-May-2018 |
Pavel Labath <labath@google.com> |
FileSpec: Remove PathSyntax enum and use llvm version instead
Summary: The llvm version of the enum has the same enumerators, with stlightly different names, so this is mostly just a search&replace
FileSpec: Remove PathSyntax enum and use llvm version instead
Summary: The llvm version of the enum has the same enumerators, with stlightly different names, so this is mostly just a search&replace exercise. One concrete benefit of this is that we can remove the function for converting between the two enums.
To avoid typing llvm::sys::path::Style::windows everywhere I import the enum into the FileSpec class, so it can be referenced as FileSpec::Style::windows.
Reviewers: zturner, clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D46753
llvm-svn: 332247
show more ...
|
#
47776cbd |
| 02-May-2018 |
Pavel Labath <labath@google.com> |
Fix gdb-remote qMemoryRegionInfo unit tests for xml-enabled builds
In case we are building with xml enabled, the GetMemoryRegionInfo function will send extra packets to query te extended memory map,
Fix gdb-remote qMemoryRegionInfo unit tests for xml-enabled builds
In case we are building with xml enabled, the GetMemoryRegionInfo function will send extra packets to query te extended memory map, which the tests were not expecting.
Add an expectation for this to the test. Right now, it's just a basic one which pretends we don't support the extension, however, it would be also interesting the add a test which verifies the extension-enabled case.
I also noticed that the test does a pretty lousy job of validating the returned memory region info, so I add a couple of extra assertions to improve that.
llvm-svn: 331374
show more ...
|
Revision tags: llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1 |
|
#
8c92c899 |
| 18-Dec-2017 |
Pavel Labath <labath@google.com> |
Fix regression in jModulesInfo packet handling
The recent UUID cleanups exposed a bug in the parsing code for the jModulesInfo response, which was passing wrong value for the second argument to UUID
Fix regression in jModulesInfo packet handling
The recent UUID cleanups exposed a bug in the parsing code for the jModulesInfo response, which was passing wrong value for the second argument to UUID::SetFromStringRef (it passed the length of the string, whereas the correct value should be the number of decoded bytes we expect to receive).
This was not picked up by tests, because they test with 16-byte uuids, for which the function happens to do the right thing even if the length does not match (if the length does not match, the function does not update m_num_uuid_bytes member, but that member is already 16 to begin with).
I fix that and add a test with 20-byte uuid to catch if this regresses. I have also added more safeguards into the parsing code to fail if we cannot parse the entire uuid field we recieve. While testing the latter part, I noticed that the "negative" jModulesInfo tests were succeeding because we were sending malformed json (and not because the json contents was invalid), so I make those tests a bit more robuts as well.
llvm-svn: 320985
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
38d0632e |
| 29-Jun-2017 |
Pavel Labath <labath@google.com> |
Move Timer and TraceOptions from Core to Utility
Summary: The classes have no dependencies, and they are used both by lldb and lldb-server, so it makes sense for them to live in the lowest layers.
Move Timer and TraceOptions from Core to Utility
Summary: The classes have no dependencies, and they are used both by lldb and lldb-server, so it makes sense for them to live in the lowest layers.
Reviewers: zturner, jingham
Subscribers: emaste, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D34746
llvm-svn: 306682
show more ...
|
#
f2a8bccf |
| 27-Jun-2017 |
Pavel Labath <labath@google.com> |
Move StructuredData from Core to Utility
Summary: It had a dependency on StringConvert and file reading code, which is not in Utility. I've replaced that code by equivalent llvm operations.
I've ad
Move StructuredData from Core to Utility
Summary: It had a dependency on StringConvert and file reading code, which is not in Utility. I've replaced that code by equivalent llvm operations.
I've added a unit test to demonstrate that parsing a file still works.
Reviewers: zturner, jingham
Subscribers: kubamracek, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D34625
llvm-svn: 306394
show more ...
|
#
93df2fbe |
| 22-Jun-2017 |
Pavel Labath <labath@google.com> |
Simplify the gdb-remote unit tests
Instead of every test creating a client-server combo, do that in the SetUp method of the test fixture. This also means that we can rely on gtest to not run the tes
Simplify the gdb-remote unit tests
Instead of every test creating a client-server combo, do that in the SetUp method of the test fixture. This also means that we can rely on gtest to not run the test if the SetUp method fails and delete the if(HasFailure) calls.
llvm-svn: 306013
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
32f29fac |
| 06-Jun-2017 |
Pavel Labath <labath@google.com> |
Fix assorted compiler warnings. NFC
llvm-svn: 304796
|