#
bd8f1068 |
| 24-Nov-2023 |
José Lira Junior <josejunior@10xengineers.ai> |
[lldb] correct inconsistent order of messages on process launch (#73173)
Fixes [#68035](https://github.com/llvm/llvm-project/issues/68035), where
an inconsistency in the order of "Process launched"
[lldb] correct inconsistent order of messages on process launch (#73173)
Fixes [#68035](https://github.com/llvm/llvm-project/issues/68035), where
an inconsistency in the order of "Process launched" and "Process
stopped" messages occurs during `process launch`.
The fix involves adjusting the message output sequence in
`CommandObjectProcessLaunch::DoExecute` within
`source/Commands/CommandObjectProcess.cpp`. This ensures "Process
launched" consistently precedes "Process stopped" when executing
commands with the '-o' flag, i.e., non-interactive mode.
Upon implementing this change, two tests failed:
`lldb/test/Shell/Breakpoint/jit-loader_jitlink_elf.test` and
`lldb/test/Shell/Breakpoint/jit-loader_rtdyld_elf.test`. These failures
were expected as they relied on the previous, now-corrected message
order. Updating these tests to align with the new message sequence is
part of this PR's scope.
show more ...
|
Revision tags: llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
92d8a28c |
| 30-Oct-2023 |
Pete Lawrence <plawrence@apple.com> |
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` (not `bool`) (#69991)
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return
`void` instead of ~~`bool`~
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` return `void` (not `bool`) (#69991)
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` to return
`void` instead of ~~`bool`~~
Justifications:
- The code doesn't ultimately apply the `true`/`false` return values.
- The methods already pass around a `CommandReturnObject`, typically
with a `result` parameter.
- Each command return object already contains:
- A more precise status
- The error code(s) that apply to that status
Part 1 refactors the `CommandObject::Execute(...)` method.
- See
[https://github.com/llvm/llvm-project/pull/69989](https://github.com/llvm/llvm-project/pull/69989)
rdar://117378957
show more ...
|
Revision tags: 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 |
|
#
58fe7b75 |
| 17-Aug-2023 |
Alex Langford <alangford@apple.com> |
[lldb] Change UnixSignals::GetSignalAsCString to GetSignalAsStringRef
This is in preparation to remove the uses of ConstString from UnixSignals.
Differential Revision: https://reviews.llvm.org/D158
[lldb] Change UnixSignals::GetSignalAsCString to GetSignalAsStringRef
This is in preparation to remove the uses of ConstString from UnixSignals.
Differential Revision: https://reviews.llvm.org/D158209
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
ec05cf50 |
| 13-Jun-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb] Improve corefile saving ergonomics
This patch improves the way the user can save the process state into a corefile by adding completion handler that would provide tab completion for the coref
[lldb] Improve corefile saving ergonomics
This patch improves the way the user can save the process state into a corefile by adding completion handler that would provide tab completion for the corefile path and also resolves the corefile path to expand relative path.
Differential Revision: https://reviews.llvm.org/D152842
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: llvmorg-16.0.6 |
|
#
6a9c3e61 |
| 06-Jun-2023 |
Med Ismail Bennani <ismail@bennani.ma> |
[lldb/Commands] Add support to auto-completion for user commands
This patch should allow the user to set specific auto-completion type for their custom commands.
To do so, we had to hoist the `Comp
[lldb/Commands] Add support to auto-completion for user commands
This patch should allow the user to set specific auto-completion type for their custom commands.
To do so, we had to hoist the `CompletionType` enum so the user can access it and add a new completion type flag to the CommandScriptAdd Command Object.
So now, the user can specify which completion type will be used with their custom command, when they register it.
This also makes the `crashlog` custom commands use disk-file completion type, to browse through the user file system and load the report.
Differential Revision: https://reviews.llvm.org/D152011
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
show more ...
|
Revision tags: 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 |
|
#
601583e5 |
| 06-Mar-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Utility] Fix layering violation caused by ScriptedMetadata
This patch moves `ScriptedMetadata.h` from the `Interpreter` directory to the `Utility` sub-directory since `ProcessInfo.h` depends o
[lldb/Utility] Fix layering violation caused by ScriptedMetadata
This patch moves `ScriptedMetadata.h` from the `Interpreter` directory to the `Utility` sub-directory since `ProcessInfo.h` depends on it.
It also gets rid of the unused `OptionGroupPythonClassWithDict` constructor for `ScriptedMetadata` which would address the layering violation.
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
b9d4c94a |
| 03-Mar-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Plugins] Add Attach capabilities to ScriptedProcess
This patch adds process attach capabilities to the ScriptedProcess plugin. This doesn't really expects a PID or process name, since the proc
[lldb/Plugins] Add Attach capabilities to ScriptedProcess
This patch adds process attach capabilities to the ScriptedProcess plugin. This doesn't really expects a PID or process name, since the process state is already script, however, this allows to create a scripted process without requiring to have an executuble in the target.
In order to do so, this patch also turns the scripted process related getters and setters from the `ProcessLaunchInfo` and `ProcessAttachInfo` classes to a `ScriptedMetadata` instance and moves it in the `ProcessInfo` class, so it can be accessed interchangeably.
This also adds the necessary SWIG wrappers to convert the internal `Process{Attach,Launch}InfoSP` into a `SB{Attach,Launch}Info` to pass it as argument the scripted process python implementation and convert it back to the internal representation.
rdar://104577406
Differential Revision: https://reviews.llvm.org/D143104
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
#
3014a1c5 |
| 03-Mar-2023 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb] Add scripted process launch/attach option to {,platform }process commands
This patch does several things:
First, it refactors the `CommandObject{,Platform}ProcessObject` command option class
[lldb] Add scripted process launch/attach option to {,platform }process commands
This patch does several things:
First, it refactors the `CommandObject{,Platform}ProcessObject` command option class into a separate `CommandOptionsProcessAttach` option group.
This will make sure both the `platform process attach` and `process attach` command options will always stay in sync without having with duplicate them each time. But more importantly, making this class an `OptionGroup` allows us to combine with a `OptionGroupPythonClassWithDict` to add support for the scripted process managing class name and user-provided dictionary options.
This patch also improves feature parity between `ProcessLaunchInfo` and `ProcessAttachInfo` with regard to ScriptedProcesses, by exposing the various getters and setters necessary to use them through the SBAPI.
This is foundation work for adding support to "attach" to a process from the scripted platform.
Differential Revision: https://reviews.llvm.org/D139945
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
984b800a |
| 09-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - last part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Re
Move from llvm::makeArrayRef to ArrayRef deduction guides - last part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Revision: https://reviews.llvm.org/D141298
show more ...
|
#
2fe83274 |
| 07-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[lldb] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/
[lldb] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
f190ce62 |
| 07-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[lldb] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optiona
[lldb] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5 |
|
#
e861d053 |
| 03-Nov-2022 |
Med Ismail Bennani <medismail.bennani@gmail.com> |
[lldb/Utility] Add GetDescription(Stream&) to StructureData::*
This patch improves the StructuredData classes to provide a GetDescription(lldb_private::Stream&) affordance.
This is very convenient
[lldb/Utility] Add GetDescription(Stream&) to StructureData::*
This patch improves the StructuredData classes to provide a GetDescription(lldb_private::Stream&) affordance.
This is very convenient compared to the Dump method because this try to pretty print the structure instead of just serializing it into a JSON.
This patch also updates some parts of lldb (i.e. extended crash info) to use this new affordance instead of StructuredData::Dump.
Differential Revision: https://reviews.llvm.org/D135547
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
show more ...
|
Revision tags: llvmorg-15.0.4, llvmorg-15.0.3, working, 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 |
|
#
7ced9fff |
| 14-Jul-2022 |
Jonas Devlieghere <jonas@devlieghere.com> |
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table to connect the two. This has two benefits:
- We guarantee that two options t
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table to connect the two. This has two benefits:
- We guarantee that two options that use the same argument type have the same accepted values. - We can print the enum values and their description in the help output. (D129707)
Differential revision: https://reviews.llvm.org/D129703
show more ...
|
#
b532dd54 |
| 06-Jul-2022 |
Walter Erquinigo <wallace@fb.com> |
[trace] Add an option to save a compact trace bundle
A trace bundle contains many trace files, and, in the case of intel pt, the largest files are often the context switch traces because they are no
[trace] Add an option to save a compact trace bundle
A trace bundle contains many trace files, and, in the case of intel pt, the largest files are often the context switch traces because they are not compressed by default. As a way to improve this, I'm adding a --compact option to the `trace save` command that filters out unwanted processes from the context switch traces. Eventually we can do the same for intel pt traces as well.
Differential Revision: https://reviews.llvm.org/D129239
show more ...
|
#
c1b07d61 |
| 23-Jun-2022 |
Jim Ingham <jingham@apple.com> |
Have CommandObjectParsed check for "commands that take no arguments".
This is currently being done in an ad hoc way, and so for some commands it isn't being checked. We have the info to make this c
Have CommandObjectParsed check for "commands that take no arguments".
This is currently being done in an ad hoc way, and so for some commands it isn't being checked. We have the info to make this check, since commands are supposed to add their arguments to the m_arguments field of the CommandObject. This change uses that info to check whether the command received arguments in error.
A handful of commands weren't defining their argument types, I also had to fix them. And a bunch of commands were checking for arguments by hand, so I removed those checks in favor of the CommandObject one. That also meant I had to change some tests that were checking for the ad hoc error outputs.
Differential Revision: https://reviews.llvm.org/D128453
show more ...
|
#
bae10a6b |
| 22-Jun-2022 |
Jim Ingham <jingham@apple.com> |
Fix a bug with "process continue -b" when no breakpoints are passed. I was passing the empty list of breakponts to the VerifyBreakpointList routine, but that treats empty as "choose the default brea
Fix a bug with "process continue -b" when no breakpoints are passed. I was passing the empty list of breakponts to the VerifyBreakpointList routine, but that treats empty as "choose the default breakpoint" which we don't want here.
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
4298b1b8 |
| 08-Jun-2022 |
Jim Ingham <jingham@apple.com> |
Add a "-b" option to "process continue" to run to a set of breakpoints, temporarily ignoring the others.
Differential Revision: https://reviews.llvm.org/D126513
|
Revision tags: llvmorg-14.0.4 |
|
#
134d7f9a |
| 18-May-2022 |
Jim Ingham <jingham@apple.com> |
Store a by name list of signals with their actions in the Target so that they can be used to prime new Process runs. "process handle" was also changed to populate the dummy target if there's no sele
Store a by name list of signals with their actions in the Target so that they can be used to prime new Process runs. "process handle" was also changed to populate the dummy target if there's no selected target, so that the settings will get copied into new targets.
Differential Revision: https://reviews.llvm.org/D126259
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
24f9a2f5 |
| 31-Mar-2022 |
Shafik Yaghmour <syaghmour@apple.com> |
[LLDB] Applying clang-tidy modernize-use-equals-default over LLDB
Applied modernize-use-equals-default clang-tidy check over LLDB.
This check is already present in the lldb/.clang-tidy config.
Dif
[LLDB] Applying clang-tidy modernize-use-equals-default over LLDB
Applied modernize-use-equals-default clang-tidy check over LLDB.
This check is already present in the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121844
show more ...
|
#
28c878ae |
| 14-Mar-2022 |
Shafik Yaghmour <syaghmour@apple.com> |
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB. It appears in many files we had already switched to in cl
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB. It appears in many files we had already switched to in class member init but never updated the constructors to reflect that. This check is already present in the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121481
show more ...
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
#
635f03fe |
| 04-Feb-2022 |
Jim Ingham <jingham@apple.com> |
Add a repeat command option for "thread backtrace --count N".
This way if you have a long stack, you can issue "thread backtrace --count 10" and then subsequent <Return>-s will page you through the
Add a repeat command option for "thread backtrace --count N".
This way if you have a long stack, you can issue "thread backtrace --count 10" and then subsequent <Return>-s will page you through the stack.
This took a little more effort than just adding the repeat command, since the GetRepeatCommand API was returning a "const char *". That meant the command had to keep the repeat string alive, which is inconvenient. The original API returned either a nullptr, or a const char *, so I changed the private API to return an llvm::Optional<std::string>. Most of the patch is propagating that change.
Also, there was a little thinko in fetching the repeat command. We don't fetch repeat commands for commands that aren't being added to history, which is in general reasonable. And we don't add repeat commands to the history - also reasonable. But we do want the repeat command to be able to generate the NEXT repeat command. So I adjusted the logic in HandleCommand to work that way.
Differential Revision: https://reviews.llvm.org/D119046
show more ...
|
Revision tags: llvmorg-15-init |
|
#
abb0ed44 |
| 23-Jan-2022 |
Kazu Hirata <kazu@google.com> |
[Commands] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
92eaad2d |
| 17-Nov-2021 |
Jim Ingham <jingham@apple.com> |
Revert "Revert "Make it possible for lldb to launch a remote binary with no local file.""
This reverts commit dd5505a8f2c75a903ec944b6e46aed2042610673.
I picked the wrong class for the test, should
Revert "Revert "Make it possible for lldb to launch a remote binary with no local file.""
This reverts commit dd5505a8f2c75a903ec944b6e46aed2042610673.
I picked the wrong class for the test, should have been GDBRemoteTestBase.
show more ...
|
#
dd5505a8 |
| 17-Nov-2021 |
Jim Ingham <jingham@apple.com> |
Revert "Make it possible for lldb to launch a remote binary with no local file."
The reworking of the gdb client tests into the PlatformClientTestBase broke the test for this. I did the mutatis mut
Revert "Make it possible for lldb to launch a remote binary with no local file."
The reworking of the gdb client tests into the PlatformClientTestBase broke the test for this. I did the mutatis mutandis for the move, but the test still fails. Reverting till I have time to figure out why.
This reverts commit b715b79d54d5ca2d4e8c91089b8f6a9389d9dc48.
show more ...
|
#
b715b79d |
| 09-Nov-2021 |
Jim Ingham <jingham@apple.com> |
Make it possible for lldb to launch a remote binary with no local file.
We don't actually need a local copy of the main executable to debug a remote process. So instead of treating "no local module
Make it possible for lldb to launch a remote binary with no local file.
We don't actually need a local copy of the main executable to debug a remote process. So instead of treating "no local module" as an error, see if the LaunchInfo has an executable it wants lldb to use, and if so use it. Then report whatever error the remote server returns.
Differential Revision: https://reviews.llvm.org/D113521
show more ...
|