blob: 7e7bd61181fa8ccac1736fa737bd8014da36fd8f [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- CommandObjectBreakpoint.h -------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_CommandObjectBreakpoint_h_
11#define liblldb_CommandObjectBreakpoint_h_
12
13// C Includes
14// C++ Includes
15
16#include <utility>
17#include <vector>
18
19// Other libraries and framework includes
20// Project includes
21#include "lldb/Core/Address.h"
22#include "lldb/Interpreter/CommandObjectMultiword.h"
Jim Ingham84cdc152010-06-15 19:49:27 +000023#include "lldb/Interpreter/Options.h"
Chris Lattner24943d22010-06-08 16:52:24 +000024#include "lldb/Core/STLUtils.h"
25
26namespace lldb_private {
27
28//-------------------------------------------------------------------------
29// CommandObjectMultiwordBreakpoint
30//-------------------------------------------------------------------------
31
32class CommandObjectMultiwordBreakpoint : public CommandObjectMultiword
33{
34public:
35 CommandObjectMultiwordBreakpoint (CommandInterpreter *interpreter);
36
37 virtual
38 ~CommandObjectMultiwordBreakpoint ();
39
40 static void
41 VerifyBreakpointIDs (Args &args, Target *target, CommandReturnObject &result, BreakpointIDList *valid_ids);
42
43};
44
45//-------------------------------------------------------------------------
46// CommandObjectMultiwordBreakpointSet
47//-------------------------------------------------------------------------
48
49
50class CommandObjectBreakpointSet : public CommandObject
51{
52public:
53
54 typedef enum BreakpointSetType
55 {
56 eSetTypeInvalid,
57 eSetTypeFileAndLine,
58 eSetTypeAddress,
59 eSetTypeFunctionName,
Eli Friedmanb4a47282010-06-09 07:57:51 +000060 eSetTypeFunctionRegexp
Chris Lattner24943d22010-06-08 16:52:24 +000061 } BreakpointSetType;
62
63 CommandObjectBreakpointSet ();
64
65 virtual
66 ~CommandObjectBreakpointSet ();
67
68 virtual bool
69 Execute (Args& command,
70 CommandContext *context,
71 CommandInterpreter *interpreter,
72 CommandReturnObject &result);
73
74 virtual Options *
75 GetOptions ();
76
77 class CommandOptions : public Options
78 {
79 public:
80
81 CommandOptions ();
82
83 virtual
84 ~CommandOptions ();
85
86 virtual Error
87 SetOptionValue (int option_idx, const char *option_arg);
88
89 void
90 ResetOptionValues ();
91
92 const lldb::OptionDefinition*
93 GetDefinitions ();
94
95 // Options table: Required for subclasses of Options.
96
97 static lldb::OptionDefinition g_option_table[];
98
99 // Instance variables to hold the values for command options.
100
101 std::string m_filename;
102 unsigned int m_line_num;
103 unsigned int m_column;
104 bool m_ignore_inlines;
105 std::string m_func_name;
106 std::string m_func_regexp;
107 lldb::addr_t m_load_addr;
108 STLStringArray m_modules;
Jim Ingham3c7b5b92010-06-16 02:00:15 +0000109 int32_t m_ignore_count;
110 lldb::tid_t m_thread_id;
111 uint32_t m_thread_index;
112 std::string m_thread_name;
113 std::string m_queue_name;
114
115 };
116
117private:
118 CommandOptions m_options;
119};
120
121//-------------------------------------------------------------------------
122// CommandObjectMultiwordBreakpointConfigure
123//-------------------------------------------------------------------------
124
125
126class CommandObjectBreakpointConfigure : public CommandObject
127{
128public:
129
130 CommandObjectBreakpointConfigure ();
131
132 virtual
133 ~CommandObjectBreakpointConfigure ();
134
135 virtual bool
136 Execute (Args& command,
137 CommandContext *context,
138 CommandInterpreter *interpreter,
139 CommandReturnObject &result);
140
141 virtual Options *
142 GetOptions ();
143
144 class CommandOptions : public Options
145 {
146 public:
147
148 CommandOptions ();
149
150 virtual
151 ~CommandOptions ();
152
153 virtual Error
154 SetOptionValue (int option_idx, const char *option_arg);
155
156 void
157 ResetOptionValues ();
158
159 const lldb::OptionDefinition*
160 GetDefinitions ();
161
162 // Options table: Required for subclasses of Options.
163
164 static lldb::OptionDefinition g_option_table[];
165
166 // Instance variables to hold the values for command options.
167
168 int32_t m_ignore_count;
169 lldb::tid_t m_thread_id;
170 uint32_t m_thread_index;
171 std::string m_thread_name;
172 std::string m_queue_name;
Chris Lattner24943d22010-06-08 16:52:24 +0000173
174 };
175
176private:
177 CommandOptions m_options;
178};
179
180//-------------------------------------------------------------------------
181// CommandObjectBreakpointEnable
182//-------------------------------------------------------------------------
183
184class CommandObjectBreakpointEnable : public CommandObject
185{
186public:
187 CommandObjectBreakpointEnable ();
188
189 virtual
190 ~CommandObjectBreakpointEnable ();
191
192 virtual bool
193 Execute (Args& command,
194 CommandContext *context,
195 CommandInterpreter *interpreter,
196 CommandReturnObject &result);
197
198private:
199};
200
201//-------------------------------------------------------------------------
202// CommandObjectBreakpointDisable
203//-------------------------------------------------------------------------
204
205class CommandObjectBreakpointDisable : public CommandObject
206{
207public:
208 CommandObjectBreakpointDisable ();
209
210 virtual
211 ~CommandObjectBreakpointDisable ();
212
213 virtual bool
214 Execute (Args& command,
215 CommandContext *context,
216 CommandInterpreter *interpreter,
217 CommandReturnObject &result);
218
219private:
220};
221
222//-------------------------------------------------------------------------
223// CommandObjectBreakpointList
224//-------------------------------------------------------------------------
225
226class CommandObjectBreakpointList : public CommandObject
227{
228public:
229 CommandObjectBreakpointList ();
230
231 virtual
232 ~CommandObjectBreakpointList ();
233
234 virtual bool
235 Execute (Args& command,
236 CommandContext *context,
237 CommandInterpreter *interpreter,
238 CommandReturnObject &result);
239
240 virtual Options *
241 GetOptions ();
242
243 class CommandOptions : public Options
244 {
245 public:
246
247 CommandOptions ();
248
249 virtual
250 ~CommandOptions ();
251
252 virtual Error
253 SetOptionValue (int option_idx, const char *option_arg);
254
255 void
256 ResetOptionValues ();
257
258 const lldb::OptionDefinition *
259 GetDefinitions ();
260
261 // Options table: Required for subclasses of Options.
262
263 static lldb::OptionDefinition g_option_table[];
264
265 // Instance variables to hold the values for command options.
266
267 lldb::DescriptionLevel m_level;
268
269 bool m_internal;
270 };
271
272private:
273 CommandOptions m_options;
274};
275
276//-------------------------------------------------------------------------
277// CommandObjectBreakpointDelete
278//-------------------------------------------------------------------------
279
280class CommandObjectBreakpointDelete : public CommandObject
281{
282public:
283 CommandObjectBreakpointDelete ();
284
285 virtual
286 ~CommandObjectBreakpointDelete ();
287
288 virtual bool
289 Execute (Args& command,
290 CommandContext *context,
291 CommandInterpreter *interpreter,
292 CommandReturnObject &result);
293
294private:
295};
296
297} // namespace lldb_private
298
299#endif // liblldb_CommandObjectBreakpoint_h_