Code::Blocks  SVN r11506
cdb_driver.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef CDB_DRIVER_H
7 #define CDB_DRIVER_H
8 
9 #include "debuggerdriver.h"
10 
11 class CDB_driver : public DebuggerDriver
12 {
13  public:
14  CDB_driver(DebuggerGDB* plugin);
15  virtual ~CDB_driver();
16 
17  virtual wxString GetCommandLine(const wxString& debugger,
18  const wxString& debuggee,
19  const wxString &userArguments);
20  virtual wxString GetCommandLine(const wxString& debugger, int pid, const wxString &userArguments);
21  virtual void SetTarget(ProjectBuildTarget* target);
22  virtual void Prepare(bool isConsole, int printElements);
23  virtual void Start(bool breakOnEntry);
24  virtual void Stop();
25 
26  virtual void Continue();
27  virtual void Step();
28  virtual void StepInstruction();
29  virtual void StepIntoInstruction();
30  virtual void StepIn();
31  virtual void StepOut();
32  virtual void SetNextStatement(const wxString& filename, int line);
33  virtual void Backtrace();
34  virtual void Disassemble();
35  virtual void CPURegisters();
36  virtual void SwitchToFrame(size_t number);
37  virtual void SetVarValue(const wxString& var, const wxString& value);
38  virtual void MemoryDump();
39  virtual void Attach(int pid);
40  virtual void Detach();
41  virtual void RunningThreads();
42 
43  void InfoFrame();
44  void InfoDLL();
45  void InfoFiles();
46  void InfoFPU();
47  void InfoSignals();
48 
49  void EnableCatchingThrow(bool enable);
50 
51  virtual void SwitchThread(cb_unused size_t threadIndex){} // not implemented
52 
53  virtual void AddBreakpoint(cb::shared_ptr<DebuggerBreakpoint> bp);
54  virtual void RemoveBreakpoint(cb::shared_ptr<DebuggerBreakpoint> bp);
55  virtual void EvaluateSymbol(const wxString& symbol, const wxRect& tipRect);
56  virtual void UpdateWatches(cb::shared_ptr<GDBWatch> localsWatch, cb::shared_ptr<GDBWatch> funcArgsWatch,
57  WatchesContainer &watches);
58  virtual void UpdateWatch(cb::shared_ptr<GDBWatch> const &watch);
59  virtual void UpdateWatchLocalsArgs(cb::shared_ptr<GDBWatch> const &watch, bool locals);
60  virtual void ParseOutput(const wxString& output);
61  virtual bool IsDebuggingStarted() const;
62 #ifdef __WXMSW__
63  virtual bool UseDebugBreakProcess() { return true; }
64 #endif
65  protected:
66  private:
67  void DoBacktrace(bool switchToFirst);
68  wxString GetCommonCommandLine(const wxString& debugger);
69  private:
72 };
73 
74 #endif // CDB_DRIVER_H
virtual void Backtrace()
Definition: cdb_driver.cpp:186
virtual void StepOut()
Definition: cdb_driver.cpp:174
virtual void Attach(int pid)
Attach to process.
Definition: cdb_driver.cpp:321
virtual void Stop()
Stop debugging.
Definition: cdb_driver.cpp:135
virtual void AddBreakpoint(cb::shared_ptr< DebuggerBreakpoint > bp)
Add a breakpoint.
Definition: cdb_driver.cpp:257
void InfoSignals()
Definition: cdb_driver.cpp:247
virtual void RunningThreads()
Definition: cdb_driver.cpp:222
virtual void SetNextStatement(const wxString &filename, int line)
Definition: cdb_driver.cpp:181
virtual void EvaluateSymbol(const wxString &symbol, const wxRect &tipRect)
Evaluate a symbol.
Definition: cdb_driver.cpp:267
virtual void CPURegisters()
Definition: cdb_driver.cpp:201
std::vector< cb::shared_ptr< GDBWatch > > WatchesContainer
void InfoFPU()
Definition: cdb_driver.cpp:242
void InfoFiles()
Definition: cdb_driver.cpp:237
virtual void ParseOutput(const wxString &output)
Parse debugger&#39;s output.
Definition: cdb_driver.cpp:331
virtual void SetTarget(ProjectBuildTarget *target)
Sets the target.
Definition: cdb_driver.cpp:105
void EnableCatchingThrow(bool enable)
Definition: cdb_driver.cpp:252
virtual bool UseDebugBreakProcess()
Ask the driver if the debugger should be interrupted with DebugBreakProcess or Ctrl+C event...
Definition: cdb_driver.h:63
virtual void Start(bool breakOnEntry)
Begin the debugging process by launching a program.
Definition: cdb_driver.cpp:121
virtual ~CDB_driver()
Definition: cdb_driver.cpp:50
virtual void SwitchToFrame(size_t number)
Definition: cdb_driver.cpp:206
virtual void Detach()
Detach from running process.
Definition: cdb_driver.cpp:326
void DoBacktrace(bool switchToFirst)
Definition: cdb_driver.cpp:190
virtual void StepInstruction()
Definition: cdb_driver.cpp:157
virtual void UpdateWatch(cb::shared_ptr< GDBWatch > const &watch)
Definition: cdb_driver.cpp:309
virtual void Disassemble()
Definition: cdb_driver.cpp:196
void InfoDLL()
Definition: cdb_driver.cpp:232
virtual void SetVarValue(const wxString &var, const wxString &value)
Definition: cdb_driver.cpp:212
virtual void StepIntoInstruction()
Definition: cdb_driver.cpp:162
virtual void UpdateWatches(cb::shared_ptr< GDBWatch > localsWatch, cb::shared_ptr< GDBWatch > funcArgsWatch, WatchesContainer &watches)
Update watches.
Definition: cdb_driver.cpp:272
wxString GetCommonCommandLine(const wxString &debugger)
Definition: cdb_driver.cpp:55
virtual void UpdateWatchLocalsArgs(cb::shared_ptr< GDBWatch > const &watch, bool locals)
Definition: cdb_driver.cpp:315
CDB_driver(DebuggerGDB *plugin)
Definition: cdb_driver.cpp:42
virtual void Step()
Definition: cdb_driver.cpp:149
bool m_IsStarted
Definition: cdb_driver.h:71
virtual wxString GetCommandLine(const wxString &debugger, const wxString &debuggee, const wxString &userArguments)
Get the command-line to launch the debugger.
virtual void MemoryDump()
Definition: cdb_driver.cpp:217
void InfoFrame()
Definition: cdb_driver.cpp:227
virtual void StepIn()
Definition: cdb_driver.cpp:167
Represents a Code::Blocks project build target.
ProjectBuildTarget * m_Target
Definition: cdb_driver.h:70
virtual void Continue()
Definition: cdb_driver.cpp:142
virtual void Prepare(bool isConsole, int printElements)
Prepares the debugging process by setting up search dirs etc.
Definition: cdb_driver.cpp:110
virtual bool IsDebuggingStarted() const
Is debugging started.
Definition: cdb_driver.cpp:416
virtual void RemoveBreakpoint(cb::shared_ptr< DebuggerBreakpoint > bp)
Remove a breakpoint.
Definition: cdb_driver.cpp:262
virtual void SwitchThread(cb_unused size_t threadIndex)
Definition: cdb_driver.h:51