Code::Blocks
SVN r11506
|
Basic interface for debugger commands. More...
#include <debugger_defs.h>
Inherited by CdbCmd_AddBreakpoint, CdbCmd_AddSourceDir, CdbCmd_AddSymbolFile, CdbCmd_AttachToProcess, CdbCmd_Backtrace, CdbCmd_Detach, CdbCmd_Disassembly, CdbCmd_DisassemblyInit, CdbCmd_GetPID, CdbCmd_InfoRegisters, CdbCmd_RemoveBreakpoint, CdbCmd_SetArguments, CdbCmd_SetDebuggee, CdbCmd_SwitchFrame, CdbCmd_TooltipEvaluation, CdbCmd_Watch, DbgCmd_UpdateWatchesTree, DebuggerContinueBaseCmd, DebuggerInfoCmd, GdbCmd_AddBreakpoint, GdbCmd_AddBreakpointCondition, GdbCmd_AddDataBreakpoint, GdbCmd_AddSourceDir, GdbCmd_AddSymbolFile, GdbCmd_AttachToProcess, GdbCmd_Backtrace, GdbCmd_ChangeFrame, GdbCmd_DebugLanguage, GdbCmd_Detach, GdbCmd_Disassembly, GdbCmd_DisassemblyInit, GdbCmd_ExamineMemory, GdbCmd_FindCursor, GdbCmd_FindTooltipAddress, GdbCmd_FindTooltipType, GdbCmd_FindWatchType, GdbCmd_InfoProgram, GdbCmd_InfoRegisters, GdbCmd_LocalsFuncArgs, GdbCmd_RemoteBaud, GdbCmd_RemoteTarget, GdbCmd_RemoveBreakpoint, GdbCmd_SetArguments, GdbCmd_SetCatch, GdbCmd_SetDebuggee, GdbCmd_Threads, GdbCmd_TooltipEvaluation, and GdbCmd_Watch.
Public Member Functions | |
DebuggerCmd (DebuggerDriver *driver, const wxString &cmd=_T(""), bool logToNormalLog=false) | |
virtual | ~DebuggerCmd () |
virtual void | Action () |
Executes an action. More... | |
virtual void | ParseOutput (const wxString &output) |
Parses the command's output. More... | |
virtual bool | IsContinueCommand () const |
Tells if the command is a continue type command (continue, step, next and run to cursor commands should be marked as such) More... | |
Public Attributes | |
wxString | m_Cmd |
the actual command More... | |
Protected Attributes | |
DebuggerDriver * | m_pDriver |
the driver More... | |
bool | m_LogToNormalLog |
if true, log to normal log, else the debug log More... | |
Basic interface for debugger commands.
Each command sent to the debugger, is a DebuggerCmd. It encapsulates the call and parsing of return values. The most important function is ParseOutput() inside which it must parse the commands output. It is guaranteed that the output
argument to ParseOutput() contains the full debugger response to the command given.
Definition at line 49 of file debugger_defs.h.
DebuggerCmd::DebuggerCmd | ( | DebuggerDriver * | driver, |
const wxString & | cmd = _T("") , |
||
bool | logToNormalLog = false |
||
) |
Definition at line 30 of file debugger_defs.cpp.
Referenced by CdbCmd_AttachToProcess::ParseOutput(), GdbCmd_AttachToProcess::ParseOutput(), GdbCmd_AddBreakpoint::ParseOutput(), and GdbCmd_Start::ParseOutput().
|
inlinevirtual |
Definition at line 53 of file debugger_defs.h.
|
inlinevirtual |
Executes an action.
This allows for "dummy" debugger commands to enter the commands queue. You can, for example, leave m_Cmd empty and just have Action() do something GUI-related (like the watches command does). Action() is called when the debugger command becomes current in the commands queue. It is called after sending m_Cmd to the debugger (if not empty).
Reimplemented in GdbCmd_Continue, CdbCmd_Continue, and DbgCmd_UpdateWatchesTree.
Definition at line 63 of file debugger_defs.h.
Referenced by DebuggerDriver::RunQueue().
|
inlinevirtual |
Tells if the command is a continue type command (continue, step, next and run to cursor commands should be marked as such)
Reimplemented in GdbCmd_AttachToProcess, and DebuggerContinueBaseCmd.
Definition at line 75 of file debugger_defs.h.
Referenced by DebuggerDriver::RunQueue().
|
virtual |
Parses the command's output.
The | output. This is the full output up to (and including) the prompt. |
Reimplemented in GdbCmd_DebugLanguage, GdbCmd_FindCursor, GdbCmd_StepOrNextInstruction, GdbCmd_RemoteTarget, GdbCmd_ExamineMemory, GdbCmd_DisassemblyInit, GdbCmd_Disassembly, GdbCmd_InfoRegisters, GdbCmd_Backtrace, GdbCmd_ChangeFrame, GdbCmd_LocalsFuncArgs, GdbCmd_FindTooltipType, GdbCmd_FindTooltipAddress, GdbCmd_TooltipEvaluation, GdbCmd_FindWatchType, GdbCmd_Watch, GdbCmd_Threads, GdbCmd_InfoProgram, GdbCmd_Start, GdbCmd_SetCatch, GdbCmd_RemoveBreakpoint, CdbCmd_DisassemblyInit, CdbCmd_Disassembly, GdbCmd_AddDataBreakpoint, CdbCmd_InfoRegisters, CdbCmd_SwitchFrame, GdbCmd_AddBreakpoint, CdbCmd_Backtrace, GdbCmd_AddBreakpointCondition, CdbCmd_TooltipEvaluation, GdbCmd_Detach, CdbCmd_Watch, GdbCmd_AttachToProcess, CdbCmd_RemoveBreakpoint, GdbCmd_AddSymbolFile, CdbCmd_AddBreakpoint, GdbCmd_SetDebuggee, GdbCmd_AddSourceDir, CdbCmd_Detach, CdbCmd_AttachToProcess, CdbCmd_GetPID, CdbCmd_AddSymbolFile, DebuggerInfoCmd, CdbCmd_SetDebuggee, and CdbCmd_AddSourceDir.
Definition at line 37 of file debugger_defs.cpp.
References wxString::IsEmpty(), DebuggerDriver::Log(), m_LogToNormalLog, and m_pDriver.
Referenced by CDB_driver::ParseOutput(), and GDB_driver::ParseOutput().
wxString DebuggerCmd::m_Cmd |
the actual command
Definition at line 77 of file debugger_defs.h.
Referenced by CdbCmd_AddBreakpoint::CdbCmd_AddBreakpoint(), CdbCmd_AddSourceDir::CdbCmd_AddSourceDir(), CdbCmd_AddSymbolFile::CdbCmd_AddSymbolFile(), CdbCmd_AttachToProcess::CdbCmd_AttachToProcess(), CdbCmd_Backtrace::CdbCmd_Backtrace(), CdbCmd_Detach::CdbCmd_Detach(), CdbCmd_Disassembly::CdbCmd_Disassembly(), CdbCmd_DisassemblyInit::CdbCmd_DisassemblyInit(), CdbCmd_GetPID::CdbCmd_GetPID(), CdbCmd_InfoRegisters::CdbCmd_InfoRegisters(), CdbCmd_RemoveBreakpoint::CdbCmd_RemoveBreakpoint(), CdbCmd_SetArguments::CdbCmd_SetArguments(), CdbCmd_SetDebuggee::CdbCmd_SetDebuggee(), CdbCmd_SwitchFrame::CdbCmd_SwitchFrame(), CdbCmd_TooltipEvaluation::CdbCmd_TooltipEvaluation(), CdbCmd_Watch::CdbCmd_Watch(), GdbCmd_AddBreakpoint::GdbCmd_AddBreakpoint(), GdbCmd_AddBreakpointCondition::GdbCmd_AddBreakpointCondition(), GdbCmd_AddDataBreakpoint::GdbCmd_AddDataBreakpoint(), GdbCmd_AddSourceDir::GdbCmd_AddSourceDir(), GdbCmd_AddSymbolFile::GdbCmd_AddSymbolFile(), GdbCmd_AttachToProcess::GdbCmd_AttachToProcess(), GdbCmd_Backtrace::GdbCmd_Backtrace(), GdbCmd_ChangeFrame::GdbCmd_ChangeFrame(), GdbCmd_DebugLanguage::GdbCmd_DebugLanguage(), GdbCmd_Detach::GdbCmd_Detach(), GdbCmd_Disassembly::GdbCmd_Disassembly(), GdbCmd_DisassemblyInit::GdbCmd_DisassemblyInit(), GdbCmd_ExamineMemory::GdbCmd_ExamineMemory(), GdbCmd_FindTooltipAddress::GdbCmd_FindTooltipAddress(), GdbCmd_FindTooltipType::GdbCmd_FindTooltipType(), GdbCmd_FindWatchType::GdbCmd_FindWatchType(), GdbCmd_InfoProgram::GdbCmd_InfoProgram(), GdbCmd_InfoRegisters::GdbCmd_InfoRegisters(), GdbCmd_LocalsFuncArgs::GdbCmd_LocalsFuncArgs(), GdbCmd_RemoteBaud::GdbCmd_RemoteBaud(), GdbCmd_RemoteTarget::GdbCmd_RemoteTarget(), GdbCmd_RemoveBreakpoint::GdbCmd_RemoveBreakpoint(), GdbCmd_SetArguments::GdbCmd_SetArguments(), GdbCmd_SetCatch::GdbCmd_SetCatch(), GdbCmd_SetDebuggee::GdbCmd_SetDebuggee(), GdbCmd_StepOrNextInstruction::GdbCmd_StepOrNextInstruction(), GdbCmd_Threads::GdbCmd_Threads(), GdbCmd_TooltipEvaluation::GdbCmd_TooltipEvaluation(), GdbCmd_Watch::GdbCmd_Watch(), and DebuggerDriver::RunQueue().
|
protected |
if true, log to normal log, else the debug log
Definition at line 80 of file debugger_defs.h.
Referenced by ParseOutput().
|
protected |
the driver
Definition at line 79 of file debugger_defs.h.
Referenced by CdbCmd_Continue::Action(), GdbCmd_Continue::Action(), GdbCmd_AttachToProcess::GdbCmd_AttachToProcess(), GdbCmd_FindTooltipAddress::GdbCmd_FindTooltipAddress(), GdbCmd_RemoteTarget::GdbCmd_RemoteTarget(), CdbCmd_AddSourceDir::ParseOutput(), ParseOutput(), CdbCmd_SetDebuggee::ParseOutput(), CdbCmd_AddSymbolFile::ParseOutput(), CdbCmd_GetPID::ParseOutput(), CdbCmd_AttachToProcess::ParseOutput(), CdbCmd_Detach::ParseOutput(), GdbCmd_AddSourceDir::ParseOutput(), GdbCmd_SetDebuggee::ParseOutput(), CdbCmd_AddBreakpoint::ParseOutput(), GdbCmd_AddSymbolFile::ParseOutput(), CdbCmd_RemoveBreakpoint::ParseOutput(), GdbCmd_AttachToProcess::ParseOutput(), GdbCmd_Detach::ParseOutput(), GdbCmd_AddBreakpointCondition::ParseOutput(), CdbCmd_Backtrace::ParseOutput(), GdbCmd_AddBreakpoint::ParseOutput(), CdbCmd_SwitchFrame::ParseOutput(), GdbCmd_AddDataBreakpoint::ParseOutput(), CdbCmd_DisassemblyInit::ParseOutput(), GdbCmd_RemoveBreakpoint::ParseOutput(), GdbCmd_Start::ParseOutput(), GdbCmd_InfoProgram::ParseOutput(), GdbCmd_Threads::ParseOutput(), GdbCmd_FindWatchType::ParseOutput(), GdbCmd_TooltipEvaluation::ParseOutput(), GdbCmd_FindTooltipAddress::ParseOutput(), GdbCmd_FindTooltipType::ParseOutput(), GdbCmd_ChangeFrame::ParseOutput(), GdbCmd_Backtrace::ParseOutput(), GdbCmd_DisassemblyInit::ParseOutput(), GdbCmd_RemoteTarget::ParseOutput(), GdbCmd_StepOrNextInstruction::ParseOutput(), and GdbCmd_FindCursor::ParseOutput().