[all-commits] [llvm/llvm-project] b1c027: [LLDB] Add module hook implementation (#185465)
Bar Soloveychik via All-commits
all-commits at lists.llvm.org
Tue Apr 28 14:08:07 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b1c027b3aa52a19ae87b36a61b78adee1e7aaee5
https://github.com/llvm/llvm-project/commit/b1c027b3aa52a19ae87b36a61b78adee1e7aaee5
Author: Bar Soloveychik <barsolo at meta.com>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
A lldb/include/lldb/Interpreter/Interfaces/ScriptedHookInterface.h
M lldb/include/lldb/Interpreter/ScriptInterpreter.h
M lldb/include/lldb/Target/Target.h
M lldb/include/lldb/lldb-forward.h
M lldb/source/Commands/CommandObjectTarget.cpp
M lldb/source/Commands/Options.td
M lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.cpp
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.h
A lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedHookPythonInterface.cpp
A lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedHookPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
M lldb/source/Target/Target.cpp
A lldb/test/API/commands/target/module-hook/delete/TestTargetModuleHookDelete.py
A lldb/test/API/commands/target/module-hook/disable/TestTargetModuleHookDisable.py
A lldb/test/API/commands/target/module-hook/enable/TestTargetModuleHookEnable.py
A lldb/test/Shell/Commands/command-module-hook-fire.test
A lldb/test/Shell/Commands/command-module-hook.test
A lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-unified-1.lldbinit
A lldb/test/Shell/ExecControl/StopHook/stop-hook-unified.test
Log Message:
-----------
[LLDB] Add module hook implementation (#185465)
Introduce a unified target hook command system for LLDB that handles
multiple target lifecycle events (module load, module unload, process
stop) through a single Hook class.
The existing target stop-hook commands remain unchanged for now, meaning
stop-hooks can now be created through either target stop-hook add or
target hook add -S.
A future follow-up can alias target stop-hook to the unified system to
consolidate the two paths.
New commands:
- target hook add [-o cmd] [-P class] [-u] [-S] - create a hook (fires
on module load by default, optionally on unload/stop)
- target hook add-filter [filter-opts] <hook-id> - attach stop-event
filters (shlib, function, file/line, thread) to an existing hook
- target hook list / delete / enable / disable - manage hooks
- target hook {enable,disable} {module-loaded|module-unloaded|stop-hook}
<id> - per-event toggling
top-event filter options live on a separate add-filter command rather
than on target hook add, keeping the add command clean and making the
system safe for filters on other event types.
Ran the tests + Made sure stop tests are passing as well.
---------
Co-authored-by: Bar Soloveychik <barsolo at fb.com>
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