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
9
#include "debuggerdriver.h"
10
#include "remotedebugging.h"
11
#include <wx/dynarray.h>
16
wxString name; // STL String
17
wxString regex_str; // [^[:alnum:]_]*string[^[:alnum:]_]*
19
wxString eval_func; // Evaluate_StlString
20
wxString parse_func; // Parse_StlString
23
ScriptedType(const ScriptedType& rhs)
26
regex_str = rhs.regex_str;
27
eval_func = rhs.eval_func;
28
parse_func = rhs.parse_func;
30
regex.Compile(regex_str);
34
WX_DECLARE_OBJARRAY(ScriptedType, TypesArray);
36
class GDB_driver : public DebuggerDriver
39
GDB_driver(DebuggerGDB* plugin);
40
virtual ~GDB_driver();
42
virtual wxString GetCommandLine(const wxString& debugger, const wxString& debuggee);
43
virtual wxString GetCommandLine(const wxString& debugger, int pid);
44
virtual void Prepare(ProjectBuildTarget* target, bool isConsole);
45
virtual void Start(bool breakOnEntry);
48
virtual void Continue();
50
virtual void StepInstruction();
51
virtual void StepIn();
52
virtual void StepOut();
53
virtual void Backtrace();
54
virtual void Disassemble();
55
virtual void CPURegisters();
56
virtual void SwitchToFrame(size_t number);
57
virtual void SetVarValue(const wxString& var, const wxString& value);
58
virtual void MemoryDump();
59
virtual void Detach();
60
virtual void RunningThreads();
68
virtual void SwitchThread(size_t threadIndex);
70
virtual void AddBreakpoint(DebuggerBreakpoint* bp);
71
virtual void RemoveBreakpoint(DebuggerBreakpoint* bp);
72
virtual void EvaluateSymbol(const wxString& symbol, const wxRect& tipRect);
73
virtual void UpdateWatches(bool doLocals, bool doArgs, DebuggerTree* tree);
74
virtual void ParseOutput(const wxString& output);
75
virtual wxString GetDisassemblyFlavour(void);
77
wxString GetScriptedTypeCommand(const wxString& gdb_type, wxString& parse_func);
80
void InitializeScripting();
81
void RegisterType(const wxString& name, const wxString& regex, const wxString& eval_func, const wxString& parse_func);
82
void HandleMainBreakPoint(const wxRegEx& reBreak, wxString line);
84
// win/Cygwin platform checking
85
void DetectCygwinMount(void);
86
void CorrectCygwinPath(wxString& path);
89
RemoteDebugging* GetRemoteDebuggingInfo();
92
wxString m_CygdrivePrefix;
96
// Seems to be intended to allow step before program has started.
97
// Was always false. HC changed to take value from DebuggerGDB::m_BreakOnEntry.
100
// Seems to be used to issue a InfoProgram command, then continue
101
// True after first "Start()", until first break
102
bool m_ManualBreakOnEntry;
104
// Program is "running": after a "run" or a "start", and before "kill" or a "quit"
107
// cursor update flags
112
long m_GDBVersionMajor;
113
long m_GDBVersionMinor;
116
bool want_debug_events;
117
bool disable_debug_events;
119
// for remote debugging usage (mainly)
120
ProjectBuildTarget* m_pTarget;
124
#endif // GDB_DRIVER_H