blob: fc59c7714da3cdb5744a92a9ce42a49453a6c415 [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- CommandObjectBreakpointCommand.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_CommandObjectBreakpointCommand_h_
11#define liblldb_CommandObjectBreakpointCommand_h_
12
13// C Includes
14// C++ Includes
15
16
17// Other libraries and framework includes
18// Project includes
19
20#include "lldb/lldb-types.h"
Jim Ingham84cdc152010-06-15 19:49:27 +000021#include "lldb/Interpreter/Options.h"
Chris Lattner24943d22010-06-08 16:52:24 +000022#include "lldb/Core/InputReader.h"
23#include "lldb/Interpreter/CommandObject.h"
24#include "lldb/Interpreter/CommandReturnObject.h"
25#include "lldb/Interpreter/CommandObjectMultiword.h"
26
27
28namespace lldb_private {
29
30//-------------------------------------------------------------------------
31// CommandObjectMultiwordBreakpoint
32//-------------------------------------------------------------------------
33
34class CommandObjectBreakpointCommand : public CommandObjectMultiword
35{
36public:
Greg Clayton63094e02010-06-23 01:19:29 +000037 CommandObjectBreakpointCommand (CommandInterpreter &interpreter);
Chris Lattner24943d22010-06-08 16:52:24 +000038
39 virtual
40 ~CommandObjectBreakpointCommand ();
41
42
43 static bool
44 BreakpointOptionsCallbackFunction (void *baton,
45 StoppointCallbackContext *context,
46 lldb::user_id_t break_id,
47 lldb::user_id_t break_loc_id);
48};
49
50//-------------------------------------------------------------------------
51// CommandObjectBreakpointCommandAdd
52//-------------------------------------------------------------------------
53
54
55class CommandObjectBreakpointCommandAdd : public CommandObject
56{
57public:
58
59 CommandObjectBreakpointCommandAdd ();
60
61 virtual
62 ~CommandObjectBreakpointCommandAdd ();
63
64 virtual bool
Greg Clayton63094e02010-06-23 01:19:29 +000065 Execute (CommandInterpreter &interpreter,
66 Args& command,
Chris Lattner24943d22010-06-08 16:52:24 +000067 CommandReturnObject &result);
68
69 virtual Options *
70 GetOptions ();
71
72 void
Greg Clayton63094e02010-06-23 01:19:29 +000073 CollectDataForBreakpointCommandCallback (CommandInterpreter &interpreter,
74 BreakpointOptions *bp_options,
Chris Lattner24943d22010-06-08 16:52:24 +000075 CommandReturnObject &result);
76
77 static size_t
78 GenerateBreakpointCommandCallback (void *baton,
Greg Clayton63094e02010-06-23 01:19:29 +000079 InputReader &reader,
Chris Lattner24943d22010-06-08 16:52:24 +000080 lldb::InputReaderAction notification,
81 const char *bytes,
82 size_t bytes_len);
83
84 static bool
85 BreakpointOptionsCallbackFunction (void *baton,
86 StoppointCallbackContext *context,
87 lldb::user_id_t break_id,
88 lldb::user_id_t break_loc_id);
89
90
91 class CommandOptions : public Options
92 {
93 public:
94
95 CommandOptions ();
96
97 virtual
98 ~CommandOptions ();
99
100 virtual Error
101 SetOptionValue (int option_idx, const char *option_arg);
102
103 void
104 ResetOptionValues ();
105
106 const lldb::OptionDefinition*
107 GetDefinitions ();
108
109 // Options table: Required for subclasses of Options.
110
111 static lldb::OptionDefinition g_option_table[];
112
113 // Instance variables to hold the values for command options.
114
115 bool m_use_commands;
116 bool m_use_script_language;
117 lldb::ScriptLanguage m_script_language;
118 };
119
120private:
121 CommandOptions m_options;
122};
123
124//-------------------------------------------------------------------------
125// CommandObjectBreakpointCommandRemove
126//-------------------------------------------------------------------------
127
128class CommandObjectBreakpointCommandRemove : public CommandObject
129{
130public:
131 CommandObjectBreakpointCommandRemove ();
132
133 virtual
134 ~CommandObjectBreakpointCommandRemove ();
135
136 virtual bool
Greg Clayton63094e02010-06-23 01:19:29 +0000137 Execute (CommandInterpreter &interpreter,
138 Args& command,
Chris Lattner24943d22010-06-08 16:52:24 +0000139 CommandReturnObject &result);
140
141private:
142};
143
144//-------------------------------------------------------------------------
145// CommandObjectBreakpointCommandList
146//-------------------------------------------------------------------------
147
148class CommandObjectBreakpointCommandList : public CommandObject
149{
150public:
151 CommandObjectBreakpointCommandList ();
152
153 virtual
154 ~CommandObjectBreakpointCommandList ();
155
156 virtual bool
Greg Clayton63094e02010-06-23 01:19:29 +0000157 Execute (CommandInterpreter &interpreter,
158 Args& command,
Chris Lattner24943d22010-06-08 16:52:24 +0000159 CommandReturnObject &result);
160
161private:
162};
163
164
165} // namespace lldb_private
166
167#endif // liblldb_CommandObjectBreakpointCommand_h_