Code::Blocks
SVN r11506
|
#include <cdb_driver.h>
Public Member Functions | |
CDB_driver (DebuggerGDB *plugin) | |
virtual | ~CDB_driver () |
virtual wxString | GetCommandLine (const wxString &debugger, const wxString &debuggee, const wxString &userArguments) |
Get the command-line to launch the debugger. More... | |
virtual wxString | GetCommandLine (const wxString &debugger, int pid, const wxString &userArguments) |
Get the command-line to launch the debugger. More... | |
virtual void | SetTarget (ProjectBuildTarget *target) |
Sets the target. More... | |
virtual void | Prepare (bool isConsole, int printElements) |
Prepares the debugging process by setting up search dirs etc. More... | |
virtual void | Start (bool breakOnEntry) |
Begin the debugging process by launching a program. More... | |
virtual void | Stop () |
Stop debugging. More... | |
virtual void | Continue () |
virtual void | Step () |
virtual void | StepInstruction () |
virtual void | StepIntoInstruction () |
virtual void | StepIn () |
virtual void | StepOut () |
virtual void | SetNextStatement (const wxString &filename, int line) |
virtual void | Backtrace () |
virtual void | Disassemble () |
virtual void | CPURegisters () |
virtual void | SwitchToFrame (size_t number) |
virtual void | SetVarValue (const wxString &var, const wxString &value) |
virtual void | MemoryDump () |
virtual void | Attach (int pid) |
Attach to process. More... | |
virtual void | Detach () |
Detach from running process. More... | |
virtual void | RunningThreads () |
void | InfoFrame () |
void | InfoDLL () |
void | InfoFiles () |
void | InfoFPU () |
void | InfoSignals () |
void | EnableCatchingThrow (bool enable) |
virtual void | SwitchThread (cb_unused size_t threadIndex) |
virtual void | AddBreakpoint (cb::shared_ptr< DebuggerBreakpoint > bp) |
Add a breakpoint. More... | |
virtual void | RemoveBreakpoint (cb::shared_ptr< DebuggerBreakpoint > bp) |
Remove a breakpoint. More... | |
virtual void | EvaluateSymbol (const wxString &symbol, const wxRect &tipRect) |
Evaluate a symbol. More... | |
virtual void | UpdateWatches (cb::shared_ptr< GDBWatch > localsWatch, cb::shared_ptr< GDBWatch > funcArgsWatch, WatchesContainer &watches) |
Update watches. More... | |
virtual void | UpdateWatch (cb::shared_ptr< GDBWatch > const &watch) |
virtual void | UpdateWatchLocalsArgs (cb::shared_ptr< GDBWatch > const &watch, bool locals) |
virtual void | ParseOutput (const wxString &output) |
Parse debugger's output. More... | |
virtual bool | IsDebuggingStarted () const |
Is debugging started. More... | |
virtual bool | UseDebugBreakProcess () |
Ask the driver if the debugger should be interrupted with DebugBreakProcess or Ctrl+C event. More... | |
Public Member Functions inherited from DebuggerDriver | |
DebuggerDriver (DebuggerGDB *plugin) | |
virtual | ~DebuggerDriver () |
void | Log (const wxString &msg) |
void | DebugLog (const wxString &msg) |
DebuggerGDB * | GetDebugger () |
virtual void | AddDirectory (const wxString &dir) |
Add a directory in search list. More... | |
virtual void | ClearDirectories () |
Clear directories search list. More... | |
virtual void | SetWorkingDirectory (const wxString &dir) |
Set the working directory. More... | |
virtual void | SetArguments (const wxString &args) |
Set the execution arguments. More... | |
bool | IsProgramStopped () const |
Is the program stopped? More... | |
void | MarkProgramStopped (bool stopped) |
bool | IsQueueBusy () const |
Is the driver processing some commands? More... | |
void | SetChildPID (long pid) |
Set child PID (debuggee's). More... | |
long | GetChildPID () const |
Get the child's (debuggee's) PID. More... | |
virtual void | SwitchThread (size_t threadIndex)=0 |
Request to switch to another thread. More... | |
wxString | GetDebuggersWorkingDirectory () const |
void | ShowFile (const wxString &file, int line) |
Show a file/line without changing the cursor. More... | |
void | QueueCommand (DebuggerCmd *dcmd, QueuePriority prio=Low) |
add a command in the queue. The DebuggerCmd will be deleted automatically when finished. More... | |
DebuggerCmd * | CurrentCommand () |
returns the currently executing command More... | |
void | RunQueue () |
runs the next command in the queue, if it is idle More... | |
void | RemoveTopCommand (bool deleteIt=true) |
removes the top command (it has finished) More... | |
const StackFrameContainer & | GetStackFrames () const |
returns the container with the current backtrace More... | |
StackFrameContainer & | GetStackFrames () |
returns the container with the current backtrace More... | |
const ThreadsContainer & | GetThreads () const |
returns the thread container with the current list of threads More... | |
ThreadsContainer & | GetThreads () |
returns the thread container with the current list of threads More... | |
const Cursor & | GetCursor () const |
Get debugger's cursor. More... | |
void | SetCursor (const Cursor &cursor) |
Set debugger's cursor. More... | |
void | ResetCurrentFrame () |
int | GetCurrentFrame () const |
int | GetUserSelectedFrame () const |
void | SetCurrentFrame (int number, bool user_selected) |
void | NotifyDebuggeeContinued () |
void | NotifyCursorChanged () |
Called by implementations to notify cursor changes. More... | |
virtual void | DetermineLanguage () |
Determine language is debugged. More... | |
Private Member Functions | |
void | DoBacktrace (bool switchToFirst) |
wxString | GetCommonCommandLine (const wxString &debugger) |
Private Attributes | |
ProjectBuildTarget * | m_Target |
bool | m_IsStarted |
Additional Inherited Members | |
Public Types inherited from DebuggerDriver | |
enum | QueuePriority { Low = 0, High } |
The priority used when adding a command in the queue. More... | |
typedef std::vector< cb::shared_ptr< cbStackFrame > > | StackFrameContainer |
typedef std::vector< cb::shared_ptr< cbThread > > | ThreadsContainer |
Protected Member Functions inherited from DebuggerDriver | |
void | ResetCursor () |
Called by implementations to reset the cursor. More... | |
Protected Attributes inherited from DebuggerDriver | |
DebuggerGDB * | m_pDBG |
wxArrayString | m_Dirs |
wxString | m_WorkingDir |
wxString | m_Args |
bool | m_ProgramIsStopped |
wxString | m_LastCursorAddress |
Cursor | m_Cursor |
long | m_ChildPID |
DebuggerCommands | m_DCmds |
bool | m_QueueBusy |
StackFrameContainer | m_backtrace |
ThreadsContainer | m_threads |
int | m_currentFrameNo |
int | m_userSelectedFrameNo |
wxString | m_FileName |
Definition at line 11 of file cdb_driver.h.
CDB_driver::CDB_driver | ( | DebuggerGDB * | plugin | ) |
Definition at line 42 of file cdb_driver.cpp.
|
virtual |
Definition at line 50 of file cdb_driver.cpp.
|
virtual |
Add a breakpoint.
bp | The breakpoint to add. |
editor | The editor this breakpoint is set (might be NULL). |
Implements DebuggerDriver.
Definition at line 257 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
Referenced by SwitchThread().
|
virtual |
|
virtual |
|
virtual |
Implements DebuggerDriver.
Definition at line 142 of file cdb_driver.cpp.
References m_IsStarted, DebuggerDriver::QueueCommand(), and DebuggerDriver::ResetCursor().
|
virtual |
Implements DebuggerDriver.
Definition at line 201 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
|
virtual |
Detach from running process.
Implements DebuggerDriver.
Definition at line 326 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
|
virtual |
Implements DebuggerDriver.
Definition at line 196 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
|
private |
Definition at line 190 of file cdb_driver.cpp.
References Manager::Get(), and DebuggerDriver::QueueCommand().
Referenced by Backtrace(), ParseOutput(), and UseDebugBreakProcess().
|
virtual |
Implements DebuggerDriver.
Definition at line 252 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
Evaluate a symbol.
symbol | The symbol to evaluate. |
tipRect | The rect to use for the tip window. |
Implements DebuggerDriver.
Definition at line 267 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
Referenced by SwitchThread().
|
virtual |
Get the command-line to launch the debugger.
Implements DebuggerDriver.
Referenced by GetCommonCommandLine().
|
virtual |
Get the command-line to launch the debugger.
Implements DebuggerDriver.
Definition at line 55 of file cdb_driver.cpp.
References _T, wxString::Format(), CompileTargetBase::GetBasePath(), GetCommandLine(), wxArrayString::GetCount(), ProjectBuildTarget::GetParentProject(), CompileTargetBase::GetTargetType(), wxFileName::IsAbsolute(), DebuggerDriver::m_Dirs, m_Target, ttConsoleOnly, and wxT.
Referenced by UseDebugBreakProcess().
|
virtual |
Implements DebuggerDriver.
Definition at line 232 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 237 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 242 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 227 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 247 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Is debugging started.
Implements DebuggerDriver.
Definition at line 416 of file cdb_driver.cpp.
References m_IsStarted.
Referenced by SwitchThread().
|
virtual |
Implements DebuggerDriver.
Definition at line 217 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Parse debugger's output.
Implements DebuggerDriver.
Definition at line 331 of file cdb_driver.cpp.
References _(), _T, cbDebuggerPlugin::BringCBToFront(), cbAssert, Cursor::changed, wxString::Clear(), DebuggerDriver::CurrentCommand(), cbDebuggerPlugin::DebugLog(), InfoWindow::Display(), DoBacktrace(), wxString::First(), Manager::Get(), GetArrayFromString(), wxArrayString::GetCount(), Manager::GetDebuggerManager(), wxRegEx::GetMatch(), DebuggerGDB::IsTemporaryBreak(), wxString::Left(), wxString::Length(), DebuggerDriver::Log(), DebuggerDriver::m_Cursor, DebuggerDriver::m_pDBG, DebuggerDriver::m_ProgramIsStopped, DebuggerDriver::m_QueueBusy, wxRegEx::Matches(), DebuggerDriver::NotifyCursorChanged(), DebuggerCmd::ParseOutput(), reBP, wxString::Remove(), DebuggerDriver::RemoveTopCommand(), rePrompt, DebuggerDriver::RunQueue(), DebuggerManager::ShowBacktraceDialog(), and wxNOT_FOUND.
Referenced by SwitchThread().
|
virtual |
Prepares the debugging process by setting up search dirs etc.
isConsole | If true, the debuggee is a console executable. |
Implements DebuggerDriver.
Definition at line 110 of file cdb_driver.cpp.
References _T, DebuggerDriver::High, DebuggerDriver::m_QueueBusy, and DebuggerDriver::QueueCommand().
|
virtual |
Remove a breakpoint.
bp | The breakpoint to remove. If NULL, all reakpoints are removed. |
Implements DebuggerDriver.
Definition at line 262 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
Referenced by SwitchThread().
|
virtual |
Implements DebuggerDriver.
Definition at line 222 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 181 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Sets the target.
Implements DebuggerDriver.
Definition at line 105 of file cdb_driver.cpp.
References m_Target.
Implements DebuggerDriver.
Definition at line 212 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Begin the debugging process by launching a program.
Implements DebuggerDriver.
Definition at line 121 of file cdb_driver.cpp.
References _T, DebuggerConfiguration::DoNotRun, DebuggerGDB::GetActiveConfigEx(), DebuggerConfiguration::GetFlag(), m_IsStarted, DebuggerDriver::m_pDBG, and DebuggerDriver::QueueCommand().
|
virtual |
Implements DebuggerDriver.
Definition at line 149 of file cdb_driver.cpp.
References _T, DebuggerDriver::QueueCommand(), and DebuggerDriver::ResetCursor().
Referenced by StepIn().
|
virtual |
Implements DebuggerDriver.
Definition at line 167 of file cdb_driver.cpp.
References _T, DebuggerDriver::QueueCommand(), DebuggerDriver::ResetCursor(), and Step().
|
virtual |
Implements DebuggerDriver.
Definition at line 157 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 162 of file cdb_driver.cpp.
References NOT_IMPLEMENTED.
|
virtual |
Implements DebuggerDriver.
Definition at line 174 of file cdb_driver.cpp.
References _T, DebuggerDriver::QueueCommand(), and DebuggerDriver::ResetCursor().
|
virtual |
Stop debugging.
Implements DebuggerDriver.
Definition at line 135 of file cdb_driver.cpp.
References _T, m_IsStarted, DebuggerDriver::QueueCommand(), and DebuggerDriver::ResetCursor().
|
inlinevirtual |
Definition at line 51 of file cdb_driver.h.
References AddBreakpoint(), EvaluateSymbol(), IsDebuggingStarted(), ParseOutput(), RemoveBreakpoint(), UpdateWatch(), UpdateWatches(), and UpdateWatchLocalsArgs().
|
virtual |
Implements DebuggerDriver.
Definition at line 206 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand(), and DebuggerDriver::ResetCursor().
|
virtual |
Implements DebuggerDriver.
Definition at line 309 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
Referenced by SwitchThread().
|
virtual |
Update watches.
doLocals | Display values of local variables. |
doArgs | Display values of function arguments. |
tree | The watches tree control. |
Implements DebuggerDriver.
Definition at line 272 of file cdb_driver.cpp.
References DebuggerDriver::QueueCommand().
Referenced by SwitchThread().
|
virtual |
Implements DebuggerDriver.
Definition at line 315 of file cdb_driver.cpp.
Referenced by SwitchThread().
|
inlinevirtual |
Ask the driver if the debugger should be interrupted with DebugBreakProcess or Ctrl+C event.
Implements DebuggerDriver.
Definition at line 63 of file cdb_driver.h.
References DoBacktrace(), and GetCommonCommandLine().
|
private |
Definition at line 71 of file cdb_driver.h.
Referenced by Continue(), IsDebuggingStarted(), Start(), and Stop().
|
private |
Definition at line 70 of file cdb_driver.h.
Referenced by GetCommonCommandLine(), and SetTarget().