Code::Blocks  SVN r11506
cbdebugger_interfaces.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef _CB_DEBUGGER_INTERFACES_H_
7 #define _CB_DEBUGGER_INTERFACES_H_
8 
9 #include <wx/string.h>
10 #include "settings.h"
11 #include "debuggermanager.h"
12 
13 class cbDebuggerPlugin;
14 class wxMenu;
15 class wxObject;
16 class wxWindow;
17 
19 {
20  public:
21  virtual ~cbBacktraceDlg();
22 
23  virtual wxWindow* GetWindow() = 0;
24 
25  virtual void Reload() = 0;
26  virtual void EnableWindow(bool enable) = 0;
27 };
28 
30 {
31  public:
32  virtual ~cbBreakpointsDlg();
33 
34  virtual wxWindow* GetWindow() = 0;
35 
36  virtual bool AddBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line) = 0;
37  virtual bool RemoveBreakpoint(cbDebuggerPlugin *plugin, const wxString& filename, int line) = 0;
38  virtual void RemoveAllBreakpoints() = 0;
39  virtual void EditBreakpoint(const wxString& filename, int line) = 0;
40  virtual void EnableBreakpoint(const wxString& filename, int line, bool enable) = 0;
41 
42  virtual void Reload() = 0;
43 };
44 
46 {
47  public:
48  virtual ~cbCPURegistersDlg();
49 
50  virtual wxWindow* GetWindow() = 0;
51 
52  virtual void Clear() = 0;
53  virtual void SetRegisterValue(const wxString& reg_name, const wxString& hexValue, const wxString& interpreted) = 0;
54  virtual void EnableWindow(bool enable) = 0;
55 };
56 
58 {
59  public:
60  virtual ~cbDisassemblyDlg();
61 
62  virtual wxWindow* GetWindow() = 0;
63 
64  virtual void Clear(const cbStackFrame& frame) = 0;
65  virtual void AddAssemblerLine(uint64_t addr, const wxString& line) = 0;
66  virtual void AddSourceLine(int lineno, const wxString& line) = 0;
67  virtual bool SetActiveAddress(uint64_t addr) = 0;
68  virtual void CenterLine(int lineno) = 0;
69  virtual void CenterCurrentLine() = 0;
70  virtual bool HasActiveAddr() = 0;
71  virtual void EnableWindow(bool enable) = 0;
72 };
73 
75 {
76  public:
77  virtual ~cbExamineMemoryDlg();
78 
79  virtual wxWindow* GetWindow() = 0;
80 
81  // used for Freeze()/Thaw() calls
82  virtual void Begin() = 0;
83  virtual void End() = 0;
84 
85  virtual void Clear() = 0;
86  virtual wxString GetBaseAddress() = 0;
87  virtual int GetBytes() = 0;
88  virtual void AddError(const wxString& err) = 0;
89  virtual void AddHexByte(const wxString& addr, const wxString& hexbyte) = 0;
90  virtual void EnableWindow(bool enable) = 0;
91  virtual void SetBaseAddress(const wxString &addr) = 0;
92 };
93 
95 {
96  public:
97  virtual ~cbThreadsDlg();
98 
99  virtual wxWindow* GetWindow() = 0;
100 
101  virtual void Reload() = 0;
102  virtual void EnableWindow(bool enable) = 0;
103 };
104 
106 {
107  public:
108  virtual ~cbWatchesDlg();
109 
110  virtual wxWindow* GetWindow() = 0;
111 
112  virtual void UpdateWatches() = 0;
113  virtual void AddWatch(cb::shared_ptr<cbWatch> watch) = 0;
114  virtual void AddSpecialWatch(cb::shared_ptr<cbWatch> watch, bool readonly) = 0;
115  virtual void RemoveWatch(cb::shared_ptr<cbWatch> watch) = 0;
116  virtual void RenameWatch(wxObject *prop, const wxString &newSymbol) = 0;
117  virtual void RefreshUI() = 0;
118 };
119 
121 {
122  public:
124 
125  virtual void OnClick(bool enable) = 0;
126  virtual bool IsEnabled() = 0;
127  virtual bool IsChecked() = 0;
128 };
129 
131 {
132  public:
133  virtual ~cbDebuggerMenuHandler();
134 
135  virtual void SetActiveDebugger(cbDebuggerPlugin *active) = 0;
136  virtual void MarkActiveTargetAsValid(bool valid) = 0;
137  virtual void RebuildMenus() = 0;
138  virtual void BuildContextMenu(wxMenu &menu, const wxString& word_at_caret, bool is_running) = 0;
139 
140  virtual bool RegisterWindowMenu(const wxString &name, const wxString &help, cbDebuggerWindowMenuItem *item) = 0;
141  virtual void UnregisterWindowMenu(const wxString &name) = 0;
142 };
143 
145 {
146  // make class non copyable
148  cbDebugInterfaceFactory& operator=(cbDebugInterfaceFactory &);
149  public:
150  cbDebugInterfaceFactory();
151  virtual ~cbDebugInterfaceFactory();
152 
153  virtual cbBacktraceDlg* CreateBacktrace() = 0;
154  virtual void DeleteBacktrace(cbBacktraceDlg *dialog) = 0;
155 
156  virtual cbBreakpointsDlg* CreateBreapoints() = 0;
157  virtual void DeleteBreakpoints(cbBreakpointsDlg *dialog) = 0;
158 
159  virtual cbCPURegistersDlg* CreateCPURegisters() = 0;
160  virtual void DeleteCPURegisters(cbCPURegistersDlg *dialog) = 0;
161 
162  virtual cbDisassemblyDlg* CreateDisassembly() = 0;
163  virtual void DeleteDisassembly(cbDisassemblyDlg *dialog) = 0;
164 
165  virtual cbExamineMemoryDlg* CreateMemory() = 0;
166  virtual void DeleteMemory(cbExamineMemoryDlg *dialog) = 0;
167 
168  virtual cbThreadsDlg* CreateThreads() = 0;
169  virtual void DeleteThreads(cbThreadsDlg *dialog) = 0;
170 
171  virtual cbWatchesDlg* CreateWatches() = 0;
172  virtual void DeleteWatches(cbWatchesDlg *dialog) = 0;
173 
177  virtual bool ShowValueTooltip(const cb::shared_ptr<cbWatch> &watch, const wxRect &rect) = 0;
178  virtual void HideValueTooltip() = 0;
179  virtual bool IsValueTooltipShown() = 0;
180  virtual void UpdateValueTooltip() = 0;
181 };
182 
183 #endif // _CB_DEBUGGER_INTERFACES_H_
184 
Base class for debugger plugins.
Definition: cbplugin.h:397
#define DLLIMPORT
Definition: settings.h:16