#
2ace1e57 |
| 18-Oct-2021 |
Pavel Labath <pavel@labath.sk> |
[lldb] Remove ConstString from GetPluginNameStatic of some plugins
This patch deals with ObjectFile, ObjectContainer and OperatingSystem plugins. I'll convert the other types in separate patches.
I
[lldb] Remove ConstString from GetPluginNameStatic of some plugins
This patch deals with ObjectFile, ObjectContainer and OperatingSystem plugins. I'll convert the other types in separate patches.
In order to enable piecemeal conversion, I am leaving some ConstStrings in the lowest PluginManager layers. I'll convert those as the last step.
Differential Revision: https://reviews.llvm.org/D112061
show more ...
|
#
2303391d |
| 30-Sep-2021 |
Jim Ingham <jingham@apple.com> |
Make "process attach -c" work correctly, and add a test for it.
The issue here was that we were not updating the interpreter's execution context when calling HandleCommand to continue the process. S
Make "process attach -c" work correctly, and add a test for it.
The issue here was that we were not updating the interpreter's execution context when calling HandleCommand to continue the process. Since we had just created the process, it wasn't in the interpreter's execution context so HandleCommand failed at CheckRequirements. The patch fixes that by passing the process execution context directly to HandleCommand.
Differential Revision: https://reviews.llvm.org/D110787
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
#
eee687a6 |
| 01-Sep-2021 |
Andrej Korman <andrejkorman@google.com> |
[lldb] Add minidump save-core functionality to ELF object files
This change adds save-core functionality into the ObjectFileELF that enables saving minidump of a stopped process. This change is main
[lldb] Add minidump save-core functionality to ELF object files
This change adds save-core functionality into the ObjectFileELF that enables saving minidump of a stopped process. This change is mainly targeting Linux running on x86_64 machines. Minidump should contain basic information needed to examine state of threads, local variables and stack traces. Full support for other platforms is not so far implemented. API tests are using LLDB's MinidumpParser.
This relands commit aafa05e, reverted in 1f986f6. Failed tests were fixed.
Reviewed By: clayborg
Differential Revision: https://reviews.llvm.org/D108233
show more ...
|
#
1f986f60 |
| 31-Aug-2021 |
Andy Yankovsky <werat@google.com> |
Revert "[lldb] Add minidump save-core functionality to ELF object files"
This reverts commit aafa05e03d629cc6605718c54575256d9d683659.
Broke builder on aarch64 -- https://lab.llvm.org/buildbot/#/bu
Revert "[lldb] Add minidump save-core functionality to ELF object files"
This reverts commit aafa05e03d629cc6605718c54575256d9d683659.
Broke builder on aarch64 -- https://lab.llvm.org/buildbot/#/builders/96/builds/10926
show more ...
|
#
aafa05e0 |
| 31-Aug-2021 |
Andrej Korman <andrejkorman@google.com> |
[lldb] Add minidump save-core functionality to ELF object files
This change adds save-core functionality into the ObjectFileELF that enables saving minidump of a stopped process. This change is main
[lldb] Add minidump save-core functionality to ELF object files
This change adds save-core functionality into the ObjectFileELF that enables saving minidump of a stopped process. This change is mainly targeting Linux running on x86_64 machines. Minidump should contain basic information needed to examine state of threads, local variables and stack traces. Full support for other platforms is not so far implemented. API tests are using LLDB's MinidumpParser.
Reviewed By: clayborg
Differential Revision: https://reviews.llvm.org/D108233
show more ...
|
#
602497d6 |
| 27-Aug-2021 |
Walter Erquinigo <wallace@fb.com> |
[trace] [intel pt] Create a "process trace save" command
added new command "process trace save -d <directory>". -it saves a JSON file as <directory>/trace.json, with the main properties of the trace
[trace] [intel pt] Create a "process trace save" command
added new command "process trace save -d <directory>". -it saves a JSON file as <directory>/trace.json, with the main properties of the trace session. -it saves binary Intel-pt trace as <directory>/thread_id.trace; each file saves each thread. -it saves modules to the directory <directory>/modules . -it only works for live process and it only support Intel-pt right now.
Example: ``` b main run process trace start n process trace save -d /tmp/mytrace ``` A file named trace.json and xxx.trace should be generated in /tmp/mytrace. To load the trace that was just saved: ``` trace load /tmp/mytrace thread trace dump instructions ``` You should see the instructions of the trace got printed.
To run a test: ``` cd ~/llvm-sand/build/Release/fbcode-x86_64/toolchain ninja lldb-dotest ./bin/lldb-dotest -p TestTraceSave ```
Reviewed By: wallace
Differential Revision: https://reviews.llvm.org/D107669
show more ...
|
Revision tags: llvmorg-13.0.0-rc2 |
|
#
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 ...
|
#
be556d51 |
| 11-Aug-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Commands] Fix heap-use-after-free error in CommandObjectProcess
This patch should fix the use-after-free error that was brought up by the LLDB ASAN Green Dragon bot.
This is caused because th
[lldb/Commands] Fix heap-use-after-free error in CommandObjectProcess
This patch should fix the use-after-free error that was brought up by the LLDB ASAN Green Dragon bot.
This is caused because the `StringRef` object was acquired too early before being use and by the underlying memory was modified which caused it to point to null memory.
Fetching back the string reference close to its usage location should fix the issue.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
#
07800348 |
| 22-Jul-2021 |
Raphael Isemann <teemperor@gmail.com> |
[lldb] Fix that `process signal` completion always returns all signals
`CompletionRequest::AddCompletion` adds the given string as completion of the current command token. `CompletionRequest::TryCom
[lldb] Fix that `process signal` completion always returns all signals
`CompletionRequest::AddCompletion` adds the given string as completion of the current command token. `CompletionRequest::TryCompleteCurrentArg` only adds it if the current token is a prefix of the given string. We're using `AddCompletion` for the `process signal` handler which means that `process signal SIGIN` doesn't get uniquely completed to `process signal SIGINT` as we unconditionally add all other signals (such as `SIGABRT`) as possible completions.
By using `TryCompleteCurrentArg` we actually do the proper filtering which will only add `SIGINT` (as that's the only signal with the prefix 'SIGIN' in the example above).
Reviewed By: mib
Differential Revision: https://reviews.llvm.org/D105028
show more ...
|
#
cdc6f8d7 |
| 22-Jul-2021 |
Jason Molenda <jason@molenda.com> |
Read and write a LC_NOTE "addrable bits" for addressing mask
This patch adds code to process save-core for Mach-O files which embeds an "addrable bits" LC_NOTE when the process is using a code addre
Read and write a LC_NOTE "addrable bits" for addressing mask
This patch adds code to process save-core for Mach-O files which embeds an "addrable bits" LC_NOTE when the process is using a code address mask (e.g. AArch64 v8.3 with ptrauth aka arm64e). Add code to ObjectFileMachO to read that LC_NOTE from corefiles, and ProcessMachCore to set the process masks based on it when reading a corefile back in.
Also have "process status --verbose" print the current address masks that lldb is using internally to strip ptrauth bits off of addresses.
Differential Revision: https://reviews.llvm.org/D106348 rdar://68630113
show more ...
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
#
1b1c8e4a |
| 22-Jun-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb] Remove CommandReturnObject's SetError(StringRef)
Replacing existing uses with AppendError.
SetError is also part of the SBI API. This remains but instead of calling the underlying SetError i
[lldb] Remove CommandReturnObject's SetError(StringRef)
Replacing existing uses with AppendError.
SetError is also part of the SBI API. This remains but instead of calling the underlying SetError it will call AppendError.
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D104768
show more ...
|
#
9ea6dd5c |
| 20-Jun-2021 |
Jason Molenda <jason@molenda.com> |
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 |
|
#
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 ...
|
#
eaf60a44 |
| 17-Jun-2021 |
David Spickett <david.spickett@linaro.org> |
[lldb] Remove redundant calls to set eReturnStatusFailed
This is part 2, covering the commands source.
Some uses remain where it's tricky to see what the logic is or they are not used with AppendEr
[lldb] Remove redundant calls to set eReturnStatusFailed
This is part 2, covering the commands source.
Some uses remain where it's tricky to see what the logic is or they are not used with AppendError.
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D104448
show more ...
|
#
9494c510 |
| 09-Jun-2021 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Use C++11 default member initializers
This converts a default constructor's member initializers into C++11 default member initializers. This patch was automatically generated with clang-tidy
[lldb] Use C++11 default member initializers
This converts a default constructor's member initializers into C++11 default member initializers. This patch was automatically generated with clang-tidy and the modernize-use-default-member-init check.
$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-default-member-init' -fix
This is a mass-refactoring patch and this commit will be added to .git-blame-ignore-revs.
Differential revision: https://reviews.llvm.org/D103483
show more ...
|
Revision tags: llvmorg-12.0.1-rc1, 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, 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 ...
|
#
3e0ad115 |
| 23-Mar-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch
This patch adds a new command options to the CommandObjectProcessLaunch for scripted processes.
Among the options, the user
[lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch
This patch adds a new command options to the CommandObjectProcessLaunch for scripted processes.
Among the options, the user need to specify the class name managing the scripted process. The user can also use a key-value dictionary holding arbitrary data that will be passed to the managing class.
This patch also adds getters and setters to `SBLaunchInfo` for the class name managing the scripted process and the dictionary.
rdar://65508855
Differential Review: https://reviews.llvm.org/D95710
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
36254f1a |
| 01-Mar-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb] Revert ScriptedProcess patches
This patch reverts the following commits: - 5a9c34918bb1526b7e8c29aa5e4fb8d8e27e27b4 - 46796762afe76496ec4dd900f64d0cf4cdc30e99 - 2cff3dec1171188ce04ab1a4373cc1
[lldb] Revert ScriptedProcess patches
This patch reverts the following commits: - 5a9c34918bb1526b7e8c29aa5e4fb8d8e27e27b4 - 46796762afe76496ec4dd900f64d0cf4cdc30e99 - 2cff3dec1171188ce04ab1a4373cc1885ab97be1 - 182f0d1a34419445bb19d67581d6ac1afc98b7fa - d62a53aaf1d38a55d1affbd3a30d564a4e9d3171
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
d62a53aa |
| 16-Feb-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch
This patch adds a new command options to the CommandObjectProcessLaunch for scripted processes.
Among the options, the user
[lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch
This patch adds a new command options to the CommandObjectProcessLaunch for scripted processes.
Among the options, the user need to specify the class name managing the scripted process. The user can also use a key-value dictionary holding arbitrary data that will be passed to the managing class.
This patch also adds getters and setters to `SBLaunchInfo` for the class name managing the scripted process and the dictionary.
rdar://65508855
Differential Review: https://reviews.llvm.org/D95710
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
36de94cf |
| 18-Dec-2020 |
Tatyana Krasnukha <tatyana@synopsys.com> |
Reland "[lldb] Make CommandInterpreter's execution context the same as debugger's one"
|
#
7169d3a3 |
| 20-Jan-2021 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Commands] Refactor ProcessLaunchCommandOptions to use TableGen (NFC)
This patch refactors the current implementation of `ProcessLaunchCommandOptions` to be generated by TableGen.
The patch al
[lldb/Commands] Refactor ProcessLaunchCommandOptions to use TableGen (NFC)
This patch refactors the current implementation of `ProcessLaunchCommandOptions` to be generated by TableGen.
The patch also renames the class to `CommandOptionsProcessLaunch` to align better with the rest of the codebase style and moves it to separate files.
Differential Review: https://reviews.llvm.org/D95059
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
122a4ebd |
| 17-Dec-2020 |
Pavel Labath <pavel@labath.sk> |
Revert "[lldb] Make CommandInterpreter's execution context the same as debugger's one."
This reverts commit a01b26fb51c710a3a8ef88cc83b0701461f5b9ab, because it breaks the "finish" command in some w
Revert "[lldb] Make CommandInterpreter's execution context the same as debugger's one."
This reverts commit a01b26fb51c710a3a8ef88cc83b0701461f5b9ab, because it breaks the "finish" command in some way -- the command does not terminate after it steps out, but continues running the target. The exact blast radius is not clear, but it at least affects the usage of the "finish" command in TestGuiBasicDebug.py. The error is *not* gui-related, as the same issue can be reproduced by running the same steps outside of the gui.
There is some kind of a race going on, as the test fails only 20% of the time on the buildbot.
show more ...
|
#
a01b26fb |
| 10-Dec-2020 |
Tatyana Krasnukha <21970096+tkrasnukha@users.noreply.github.com> |
[lldb] Make CommandInterpreter's execution context the same as debugger's one.
Currently, the interpreter's context is not updated until a command is executed. This has resulted in the behavior of S
[lldb] Make CommandInterpreter's execution context the same as debugger's one.
Currently, the interpreter's context is not updated until a command is executed. This has resulted in the behavior of SB-interface functions and some commands depends on previous user actions. The interpreter's context can stay uninitialized, point to a currently selected target, or point to one of previously selected targets.
This patch removes any usages of CommandInterpreter::UpdateExecutionContext. CommandInterpreter::HandleCommand* functions still may override context temporarily, but now they always restore it before exiting. CommandInterpreter saves overriden contexts to the stack, that makes nesting commands possible.
Added test reproduces one of the issues. Without this fix, the last assertion fails because interpreter's execution context is empty until running "target list", so, the value of the global property was updated instead of process's local instance.
Differential Revision: https://reviews.llvm.org/D92164
show more ...
|
#
2634ec6c |
| 11-Dec-2020 |
Tatyana Krasnukha <21970096+tkrasnukha@users.noreply.github.com> |
[lldb] "target create" shouldn't save target if the command failed
TargetList::CreateTarget automatically adds created target to the list, however, CommandObjectTargetCreate does some additional pre
[lldb] "target create" shouldn't save target if the command failed
TargetList::CreateTarget automatically adds created target to the list, however, CommandObjectTargetCreate does some additional preparation after creating a target and which can fail. The command should remove created target if it failed. Since the function has many ways to return, scope guard does this work safely.
Changes to the TargetList make target adding and selection more transparent.
Other changes remove unnecessary SetSelectedTarget after CreateTarget.
Differential Revision: https://reviews.llvm.org/D93052
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 |
|
#
19311f5c |
| 24-Aug-2020 |
Gongyu Deng <gy_deng@icloud.com> |
[lldb] common completion for process pids and process names
1. Added two common completions: `ProcessIDs` and `ProcessNames`, which are refactored from their original dedicated option completions; 2
[lldb] common completion for process pids and process names
1. Added two common completions: `ProcessIDs` and `ProcessNames`, which are refactored from their original dedicated option completions; 2. Removed the dedicated option completion functions of `process attach` and `platform process attach`, so that they can use arg-type-bound common completions instead; 3. Bound `eArgTypePid` to the pid completion, `eArgTypeProcessName` to the process name completion in `CommandObject.cpp`; 4. Added a related test case.
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D80700
show more ...
|