6 #ifndef DEBUGGERDRIVER_H 7 #define DEBUGGERDRIVER_H 11 # include <wx/msw/wrapwin.h> 19 #define NOT_IMPLEMENTED() \ 21 DebugLog(wxString(cbC2U(__PRETTY_FUNCTION__)) + _T(": Not implemented in driver")); \ 22 Log(wxString(cbC2U(__PRETTY_FUNCTION__)) + _T(": Not implemented in driver")); \ 84 virtual void Prepare(
bool isConsole,
int printElements) = 0;
87 virtual void Start(
bool breakOnEntry) = 0;
94 virtual void Stop() = 0;
97 virtual void Step() = 0;
100 virtual void StepIn() = 0;
123 virtual void AddBreakpoint(cb::shared_ptr<DebuggerBreakpoint> bp) = 0;
141 virtual void UpdateWatches(cb::shared_ptr<GDBWatch> localsWatch, cb::shared_ptr<GDBWatch> funcArgsWatch,
143 virtual void UpdateWatch(cb::shared_ptr<GDBWatch>
const &watch) = 0;
147 virtual void Attach(
int pid) = 0;
149 virtual void Detach() = 0;
235 #endif // DEBUGGERDRIVER_H
virtual void RemoveBreakpoint(cb::shared_ptr< DebuggerBreakpoint > bp)=0
Remove a breakpoint.
void SetCursor(const Cursor &cursor)
Set debugger's cursor.
void NotifyCursorChanged()
Called by implementations to notify cursor changes.
virtual void UpdateWatchLocalsArgs(cb::shared_ptr< GDBWatch > const &watch, bool locals)=0
virtual ~DebuggerDriver()
void ShowFile(const wxString &file, int line)
Show a file/line without changing the cursor.
virtual void ParseOutput(const wxString &output)=0
Parse debugger's output.
virtual void UpdateWatches(cb::shared_ptr< GDBWatch > localsWatch, cb::shared_ptr< GDBWatch > funcArgsWatch, WatchesContainer &watches)=0
Update watches.
virtual void AddDirectory(const wxString &dir)
Add a directory in search list.
virtual void Continue()=0
void RunQueue()
runs the next command in the queue, if it is idle
std::vector< cb::shared_ptr< GDBWatch > > WatchesContainer
virtual void StepIntoInstruction()=0
wxString GetDebuggersWorkingDirectory() const
bool IsProgramStopped() const
Is the program stopped?
virtual void SetArguments(const wxString &args)
Set the execution arguments.
virtual void Start(bool breakOnEntry)=0
Begin the debugging process by launching a program.
virtual void SwitchToFrame(size_t number)=0
virtual void UpdateWatch(cb::shared_ptr< GDBWatch > const &watch)=0
StackFrameContainer m_backtrace
virtual void EvaluateSymbol(const wxString &symbol, const wxRect &tipRect)=0
Evaluate a symbol.
virtual void EnableCatchingThrow(bool enable)=0
virtual void InfoFiles()=0
QueuePriority
The priority used when adding a command in the queue.
const ThreadsContainer & GetThreads() const
returns the thread container with the current list of threads
void RemoveTopCommand(bool deleteIt=true)
removes the top command (it has finished)
virtual void SetTarget(ProjectBuildTarget *target)=0
Sets the target.
void Log(const wxString &msg)
std::vector< cb::shared_ptr< cbStackFrame > > StackFrameContainer
DebuggerGDB * GetDebugger()
const StackFrameContainer & GetStackFrames() const
returns the container with the current backtrace
virtual void SetWorkingDirectory(const wxString &dir)
Set the working directory.
virtual void DetermineLanguage()
Determine language is debugged.
virtual void SwitchThread(size_t threadIndex)=0
Request to switch to another thread.
void DebugLog(const wxString &msg)
bool IsQueueBusy() const
Is the driver processing some commands?
virtual void SetVarValue(const wxString &var, const wxString &value)=0
virtual bool IsDebuggingStarted() const =0
Is debugging started.
virtual void RunningThreads()=0
void ResetCursor()
Called by implementations to reset the cursor.
virtual void Backtrace()=0
virtual void CPURegisters()=0
void NotifyDebuggeeContinued()
void SetChildPID(long pid)
Set child PID (debuggee's).
virtual void InfoFrame()=0
virtual void AddBreakpoint(cb::shared_ptr< DebuggerBreakpoint > bp)=0
Add a breakpoint.
void QueueCommand(DebuggerCmd *dcmd, QueuePriority prio=Low)
add a command in the queue. The DebuggerCmd will be deleted automatically when finished.
std::vector< cb::shared_ptr< cbThread > > ThreadsContainer
virtual void Stop()=0
Stop debugging.
virtual void Attach(int pid)=0
Attach to process.
virtual void Detach()=0
Detach from running process.
virtual void ClearDirectories()
Clear directories search list.
virtual bool UseDebugBreakProcess()=0
Ask the driver if the debugger should be interrupted with DebugBreakProcess or Ctrl+C event...
virtual void StepInstruction()=0
ThreadsContainer m_threads
long GetChildPID() const
Get the child's (debuggee's) PID.
wxString m_LastCursorAddress
int GetCurrentFrame() const
WX_DEFINE_ARRAY(DebuggerCmd *, DebuggerCommands)
virtual void SetNextStatement(const wxString &filename, int line)=0
int m_userSelectedFrameNo
Abstract base class for compilers.
virtual void Disassemble()=0
void SetCurrentFrame(int number, bool user_selected)
virtual wxString GetCommandLine(const wxString &debugger, const wxString &debuggee, const wxString &userArguments)=0
Get the command-line to launch the debugger.
virtual void MemoryDump()=0
DebuggerDriver(DebuggerGDB *plugin)
const Cursor & GetCursor() const
Get debugger's cursor.
Represents a Code::Blocks project build target.
DebuggerCmd * CurrentCommand()
returns the currently executing command
virtual void Prepare(bool isConsole, int printElements)=0
Prepares the debugging process by setting up search dirs etc.
virtual void InfoSignals()=0
Basic interface for debugger commands.
int GetUserSelectedFrame() const
void MarkProgramStopped(bool stopped)