ScriptedHook#
- class lldb.plugins.scripted_hook.ScriptedHook(target: SBTarget, args: SBStructuredData)#
The base class for a scripted target hook.
A single
ScriptedHooksubclass backs bothtarget hook add -Pandtarget stop-hook add -P.handle_stopis required so a hook can always be attached as a stop-hook;handle_module_loadedandhandle_module_unloadedare optional and only called for hooks registered viatarget hook add -P.Methods Summary
handle_module_loaded(stream)Called whenever a module is loaded into the target.
handle_module_unloaded(stream)Called whenever a module is unloaded from the target.
handle_stop(exe_ctx, stream)Called whenever the process stops, before control is returned to the user.
Methods Documentation
- handle_module_loaded(stream: SBStream) None#
Called whenever a module is loaded into the target.
- Parameters:
stream (lldb.SBStream) – The stream to which the hook can write output that will be reported to the user.
- handle_module_unloaded(stream: SBStream) None#
Called whenever a module is unloaded from the target.
- Parameters:
stream (lldb.SBStream) – The stream to which the hook can write output that will be reported to the user.
- abstract handle_stop(exe_ctx: SBExecutionContext, stream: SBStream) bool#
Called whenever the process stops, before control is returned to the user.
- Parameters:
exe_ctx (lldb.SBExecutionContext) – The execution context at the point of the stop.
stream (lldb.SBStream) – The stream to which the hook can write output that will be reported to the user.
- Returns:
Trueif the process should stop and control should be returned to the user,Falseif the process should keep running.- Return type:
bool