diff options
| author | Julian Lettner <yln@users.noreply.github.com> | 2025-10-24 17:08:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-24 17:08:25 -0700 |
| commit | 10a975be0f4c6337fe981c4086d90c582a970010 (patch) | |
| tree | 7ae4eea5bebdd1f90e49292a6df6fbd743c5498d /lldb/source/Commands/CommandObjectBreakpoint.cpp | |
| parent | 409c6544435395ac24d3efb92fd51841e9223315 (diff) | |
| download | llvm-10a975be0f4c6337fe981c4086d90c582a970010.zip llvm-10a975be0f4c6337fe981c4086d90c582a970010.tar.gz llvm-10a975be0f4c6337fe981c4086d90c582a970010.tar.bz2 | |
[lldb] Introduce internal stop hooks (#164506)
Introduce the concept of internal stop hooks.
These are similar to LLDB's internal breakpoints:
LLDB itself will add them and users of LLDB will
not be able to add or remove them.
This change adds the following 3
independently-useful concepts:
* Maintain a list of internal stop hooks that will be populated by LLDB
and cannot be added to or removed from by users. They are managed in a
separate list in `Target::m_internal_stop_hooks`.
* `StopHookKind:CodeBased` and `StopHookCoded` represent a stop hook
defined by a C++ code callback (instead of command line expressions or a
Python class).
* Stop hooks that do not print any output can now also suppress the
printing of their header and description when they are hit via
`StopHook::GetSuppressOutput`.
Combining these 3 concepts we can model "internal
stop hooks" which serve the same function as
LLDB's internal breakpoints: executing built-in,
LLDB-defined behavior, leveraging the existing
mechanism of stop hooks.
This change also simplifies
`Target::RunStopHooks`. We already have to
materialize a new list for combining internal and
user stop hooks. Filter and only add active hooks to this list to avoid
the need for "isActive?"
checks later on.
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index de0a7e7..5a55126 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -1114,9 +1114,7 @@ public: CommandObjectBreakpointList(CommandInterpreter &interpreter) : CommandObjectParsed( interpreter, "breakpoint list", - "List some or all breakpoints at configurable levels of detail.", - nullptr) { - CommandArgumentData bp_id_arg; + "List some or all breakpoints at configurable levels of detail.") { // Define the first (and only) variant of this arg. AddSimpleArgumentList(eArgTypeBreakpointID, eArgRepeatOptional); |
