Code::Blocks  SVN r11506
Public Member Functions | Public Attributes | Protected Attributes | List of all members
DebuggerCmd Class Reference

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.

Collaboration diagram for DebuggerCmd:

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

DebuggerDriverm_pDriver
 the driver More...
 
bool m_LogToNormalLog
 if true, log to normal log, else the debug log More...
 

Detailed Description

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.

Remarks
This is not an abstract interface, i.e. you can create instances of it. The default implementation just logs the command's output. This way you can debug new commands.

Definition at line 49 of file debugger_defs.h.

Constructor & Destructor Documentation

◆ DebuggerCmd()

DebuggerCmd::DebuggerCmd ( DebuggerDriver driver,
const wxString cmd = _T(""),
bool  logToNormalLog = false 
)

◆ ~DebuggerCmd()

virtual DebuggerCmd::~DebuggerCmd ( )
inlinevirtual

Definition at line 53 of file debugger_defs.h.

Member Function Documentation

◆ Action()

virtual void DebuggerCmd::Action ( )
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().

◆ IsContinueCommand()

virtual bool DebuggerCmd::IsContinueCommand ( ) const
inlinevirtual

Tells if the command is a continue type command (continue, step, next and run to cursor commands should be marked as such)

Returns
true if the command is continue type command

Reimplemented in GdbCmd_AttachToProcess, and DebuggerContinueBaseCmd.

Definition at line 75 of file debugger_defs.h.

Referenced by DebuggerDriver::RunQueue().

◆ ParseOutput()

void DebuggerCmd::ParseOutput ( const wxString output)
virtual

Member Data Documentation

◆ m_Cmd

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().

◆ m_LogToNormalLog

bool DebuggerCmd::m_LogToNormalLog
protected

if true, log to normal log, else the debug log

Definition at line 80 of file debugger_defs.h.

Referenced by ParseOutput().

◆ m_pDriver

DebuggerDriver* DebuggerCmd::m_pDriver
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().


The documentation for this class was generated from the following files: