[all-commits] [llvm/llvm-project] 5f6cae: [lldb] Introduce internal stop hooks
Julian Lettner via All-commits
all-commits at lists.llvm.org
Tue Oct 21 14:40:13 PDT 2025
Branch: refs/heads/users/yln/lldb-internal-stop-hooks
Home: https://github.com/llvm/llvm-project
Commit: 5f6caec8cbd40aa92233045e231ee791b6fba136
https://github.com/llvm/llvm-project/commit/5f6caec8cbd40aa92233045e231ee791b6fba136
Author: Julian Lettner <jlettner at apple.com>
Date: 2025-10-21 (Tue, 21 Oct 2025)
Changed paths:
M lldb/include/lldb/Target/Target.h
M lldb/source/Target/Target.cpp
Log Message:
-----------
[lldb] Introduce internal stop hooks
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list