|
LLDB mainline
|
#include <Target.h>
Public Member Functions | |
| ~HookCommandLine () override=default | |
| void | SetTriggerMask (uint32_t mask) |
| Replace the trigger mask. mask is a bitwise OR of TriggerBit values. | |
| void | AddTrigger (uint32_t trigger) |
| Add a trigger to the mask. trigger is a single TriggerBit value. | |
| void | RemoveTrigger (uint32_t trigger) |
| Remove a trigger from the mask. trigger is a single TriggerBit value. | |
| StringList & | GetCommands () |
| Return the list of commands that this hook runs. | |
| void | SetActionFromString (const std::string &string) |
| Populate the command list by splitting a single string on newlines. | |
| void | SetActionFromStrings (const std::vector< std::string > &strings) |
| Populate the command list from a vector of individual command strings. | |
| void | GetDescription (Stream &s, lldb::DescriptionLevel level) const override |
| void | HandleModuleLoaded (lldb::StreamSP output) override |
| void | HandleModuleUnloaded (lldb::StreamSP output) override |
| StopHook::StopHookResult | HandleStop (ExecutionContext &exe_ctx, lldb::StreamSP output) override |
| Called when the process stops. | |
| Public Member Functions inherited from lldb_private::Target::Hook | |
| Hook (const Hook &rhs) | |
| virtual | ~Hook ()=default |
| HookKind | GetHookKind () const |
| lldb::TargetSP & | GetTarget () |
| bool | IsEnabled () |
| void | SetIsEnabled (bool enabled) |
| uint32_t | GetTriggerMask () const |
| Return the bitmask of triggers this hook responds to. | |
| bool | FiresOn (uint32_t trigger) const |
| Return true if this hook fires on the given trigger. | |
| void | SetSCSpecifier (SymbolContextSpecifier *specifier) |
| Set the symbol context specifier. The hook takes ownership. | |
| SymbolContextSpecifier * | GetSCSpecifier () |
| bool | ExecutionContextPasses (const ExecutionContext &exe_ctx) |
| Check if the execution context passes the specifier and thread spec filters. | |
| void | SetThreadSpecifier (ThreadSpec *specifier) |
| Set the thread specifier. The hook takes ownership. | |
| ThreadSpec * | GetThreadSpecifier () |
| void | SetRunAtInitialStop (bool at_initial_stop) |
| bool | GetRunAtInitialStop () const |
| void | SetAutoContinue (bool auto_continue) |
| bool | GetAutoContinue () const |
| void | SetSuppressOutput (bool suppress_output) |
| bool | GetSuppressOutput () const |
| Public Member Functions inherited from lldb_private::UserID | |
| UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
| Construct with optional user ID. | |
| ~UserID ()=default | |
| Destructor. | |
| void | Clear () |
| Clears the object state. | |
| lldb::user_id_t | GetID () const |
| Get accessor for the user ID. | |
| void | SetID (lldb::user_id_t uid) |
| Set accessor for the user ID. | |
Private Member Functions | |
| HookCommandLine (lldb::TargetSP target_sp, lldb::user_id_t uid) | |
Private Attributes | |
| StringList | m_commands |
Friends | |
| class | Target |
Additional Inherited Members | |
| Public Types inherited from lldb_private::Target::Hook | |
| enum class | HookKind : uint32_t { CommandBased = 0 , ScriptBased } |
| enum | TriggerBit : uint32_t { kModulesLoaded = (1u << 0) , kModulesUnloaded = (1u << 1) , kProcessStop = (1u << 2) } |
| Individual trigger bits. Combine with bitwise OR to form a trigger mask. More... | |
| Protected Member Functions inherited from lldb_private::Target::Hook | |
| void | GetFilterDescription (Stream &s, lldb::DescriptionLevel level) const |
| Print the filter portion of the description (AutoContinue, Specifier, ThreadSpec). | |
| Hook (lldb::TargetSP target_sp, lldb::user_id_t uid, HookKind kind) | |
| Protected Attributes inherited from lldb_private::Target::Hook | |
| lldb::TargetSP | m_target_sp |
| HookKind | m_kind |
| bool | m_enabled = true |
| uint32_t | m_trigger_mask = 0 |
| lldb::SymbolContextSpecifierSP | m_sc_specifier_sp |
| std::unique_ptr< ThreadSpec > | m_thread_spec_up |
| bool | m_at_initial_stop = true |
| bool | m_auto_continue = false |
| bool | m_suppress_output = false |
| Protected Attributes inherited from lldb_private::UserID | |
| lldb::user_id_t | m_uid |
| The user ID that uniquely identifies an object. | |
|
overridedefault |
|
inlineprivate |
Definition at line 1810 of file Target.h.
References lldb_private::Target::Hook::CommandBased, and lldb_private::Target::Hook::Hook().
|
inline |
Add a trigger to the mask. trigger is a single TriggerBit value.
Definition at line 1787 of file Target.h.
References lldb_private::Target::Hook::m_trigger_mask.
|
inline |
Return the list of commands that this hook runs.
Definition at line 1793 of file Target.h.
References m_commands.
Referenced by HandleModuleLoaded(), HandleStop(), SetActionFromString(), and SetActionFromStrings().
|
overridevirtual |
Reimplemented from lldb_private::Target::Hook.
Definition at line 4422 of file Target.cpp.
References lldb::eDescriptionLevelBrief, lldb_private::Target::Hook::GetDescription(), lldb_private::Target::Hook::GetFilterDescription(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_commands, lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().
|
overridevirtual |
Reimplemented from lldb_private::Target::Hook.
Definition at line 4459 of file Target.cpp.
References lldb_private::Target::Debugger, lldb_private::Debugger::GetAsyncExecution(), lldb_private::Debugger::GetCommandInterpreter(), GetCommands(), lldb_private::Target::Hook::GetTarget(), lldb_private::CommandInterpreter::HandleCommands(), m_commands, lldb_private::CommandInterpreterRunOptions::SetAddToHistory(), lldb_private::Debugger::SetAsyncExecution(), lldb_private::ExecutionContext::SetContext(), lldb_private::CommandInterpreterRunOptions::SetEchoCommands(), lldb_private::CommandReturnObject::SetImmediateOutputStream(), lldb_private::CommandReturnObject::SetInteractive(), lldb_private::CommandInterpreterRunOptions::SetPrintErrors(), lldb_private::CommandInterpreterRunOptions::SetPrintResults(), lldb_private::CommandInterpreterRunOptions::SetStopOnContinue(), and lldb_private::CommandInterpreterRunOptions::SetStopOnError().
Referenced by HandleModuleUnloaded().
|
overridevirtual |
Reimplemented from lldb_private::Target::Hook.
Definition at line 4493 of file Target.cpp.
References HandleModuleLoaded().
|
overridevirtual |
Called when the process stops.
Returns a StopHookResult indicating whether the process should remain stopped or continue.
Reimplemented from lldb_private::Target::Hook.
Definition at line 4499 of file Target.cpp.
References lldb_private::Target::StopHook::AlreadyContinued, lldb_private::Target::Debugger, lldb::eReturnStatusSuccessContinuingNoResult, lldb::eReturnStatusSuccessContinuingResult, lldb_private::Debugger::GetAsyncExecution(), lldb_private::Debugger::GetCommandInterpreter(), GetCommands(), lldb_private::Target::GetDebugger(), lldb_private::CommandReturnObject::GetStatus(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::CommandInterpreter::HandleCommands(), lldb_private::Target::StopHook::KeepStopped, m_commands, lldb_private::CommandInterpreterRunOptions::SetAddToHistory(), lldb_private::Debugger::SetAsyncExecution(), lldb_private::CommandInterpreterRunOptions::SetEchoCommands(), lldb_private::CommandReturnObject::SetImmediateOutputStream(), lldb_private::CommandReturnObject::SetInteractive(), lldb_private::CommandInterpreterRunOptions::SetPrintErrors(), lldb_private::CommandInterpreterRunOptions::SetPrintResults(), lldb_private::CommandInterpreterRunOptions::SetStopOnContinue(), and lldb_private::CommandInterpreterRunOptions::SetStopOnError().
|
inline |
Remove a trigger from the mask. trigger is a single TriggerBit value.
Definition at line 1790 of file Target.h.
References lldb_private::Target::Hook::m_trigger_mask.
| void Target::HookCommandLine::SetActionFromString | ( | const std::string & | string | ) |
Populate the command list by splitting a single string on newlines.
Definition at line 4449 of file Target.cpp.
References GetCommands().
| void Target::HookCommandLine::SetActionFromStrings | ( | const std::vector< std::string > & | strings | ) |
Populate the command list from a vector of individual command strings.
Definition at line 4453 of file Target.cpp.
References GetCommands().
|
inline |
Replace the trigger mask. mask is a bitwise OR of TriggerBit values.
Definition at line 1784 of file Target.h.
References lldb_private::Target::Hook::m_trigger_mask.
|
friend |
|
private |
Definition at line 1808 of file Target.h.
Referenced by GetCommands(), GetDescription(), HandleModuleLoaded(), and HandleStop().