Johnny Chen | 01acfa7 | 2011-09-22 18:04:58 +0000 | [diff] [blame] | 1 | //===-- CommandObjectWatchpoint.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_CommandObjectWatchpoint_h_ |
| 11 | #define liblldb_CommandObjectWatchpoint_h_ |
| 12 | |
| 13 | // C Includes |
| 14 | // C++ Includes |
| 15 | |
| 16 | // Other libraries and framework includes |
| 17 | // Project includes |
| 18 | #include "lldb/Interpreter/CommandObjectMultiword.h" |
| 19 | #include "lldb/Interpreter/Options.h" |
| 20 | |
| 21 | namespace lldb_private { |
| 22 | |
| 23 | //------------------------------------------------------------------------- |
| 24 | // CommandObjectMultiwordWatchpoint |
| 25 | //------------------------------------------------------------------------- |
| 26 | |
| 27 | class CommandObjectMultiwordWatchpoint : public CommandObjectMultiword |
| 28 | { |
| 29 | public: |
| 30 | CommandObjectMultiwordWatchpoint (CommandInterpreter &interpreter); |
| 31 | |
| 32 | virtual |
| 33 | ~CommandObjectMultiwordWatchpoint (); |
| 34 | }; |
| 35 | |
| 36 | //------------------------------------------------------------------------- |
| 37 | // CommandObjectWatchpointList |
| 38 | //------------------------------------------------------------------------- |
| 39 | |
| 40 | class CommandObjectWatchpointList : public CommandObject |
| 41 | { |
| 42 | public: |
| 43 | CommandObjectWatchpointList (CommandInterpreter &interpreter); |
| 44 | |
| 45 | virtual |
| 46 | ~CommandObjectWatchpointList (); |
| 47 | |
| 48 | virtual bool |
| 49 | Execute (Args& command, |
| 50 | CommandReturnObject &result); |
| 51 | |
| 52 | virtual Options * |
| 53 | GetOptions (); |
| 54 | |
| 55 | class CommandOptions : public Options |
| 56 | { |
| 57 | public: |
| 58 | |
| 59 | CommandOptions (CommandInterpreter &interpreter); |
| 60 | |
| 61 | virtual |
| 62 | ~CommandOptions (); |
| 63 | |
| 64 | virtual Error |
| 65 | SetOptionValue (uint32_t option_idx, const char *option_arg); |
| 66 | |
| 67 | void |
| 68 | OptionParsingStarting (); |
| 69 | |
| 70 | const OptionDefinition * |
| 71 | GetDefinitions (); |
| 72 | |
| 73 | // Options table: Required for subclasses of Options. |
| 74 | |
| 75 | static OptionDefinition g_option_table[]; |
| 76 | |
| 77 | // Instance variables to hold the values for command options. |
| 78 | |
| 79 | lldb::DescriptionLevel m_level; |
| 80 | }; |
| 81 | |
| 82 | private: |
| 83 | CommandOptions m_options; |
| 84 | }; |
| 85 | |
| 86 | //------------------------------------------------------------------------- |
| 87 | // CommandObjectWatchpointEnable |
| 88 | //------------------------------------------------------------------------- |
| 89 | |
| 90 | class CommandObjectWatchpointEnable : public CommandObject |
| 91 | { |
| 92 | public: |
| 93 | CommandObjectWatchpointEnable (CommandInterpreter &interpreter); |
| 94 | |
| 95 | virtual |
| 96 | ~CommandObjectWatchpointEnable (); |
| 97 | |
| 98 | virtual bool |
| 99 | Execute (Args& command, |
| 100 | CommandReturnObject &result); |
| 101 | |
| 102 | private: |
| 103 | }; |
| 104 | |
| 105 | //------------------------------------------------------------------------- |
| 106 | // CommandObjectWatchpointDisable |
| 107 | //------------------------------------------------------------------------- |
| 108 | |
| 109 | class CommandObjectWatchpointDisable : public CommandObject |
| 110 | { |
| 111 | public: |
| 112 | CommandObjectWatchpointDisable (CommandInterpreter &interpreter); |
| 113 | |
| 114 | virtual |
| 115 | ~CommandObjectWatchpointDisable (); |
| 116 | |
| 117 | virtual bool |
| 118 | Execute (Args& command, |
| 119 | CommandReturnObject &result); |
| 120 | |
| 121 | private: |
| 122 | }; |
| 123 | |
| 124 | //------------------------------------------------------------------------- |
| 125 | // CommandObjectWatchpointDelete |
| 126 | //------------------------------------------------------------------------- |
| 127 | |
| 128 | class CommandObjectWatchpointDelete : public CommandObject |
| 129 | { |
| 130 | public: |
| 131 | CommandObjectWatchpointDelete (CommandInterpreter &interpreter); |
| 132 | |
| 133 | virtual |
| 134 | ~CommandObjectWatchpointDelete (); |
| 135 | |
| 136 | virtual bool |
| 137 | Execute (Args& command, |
| 138 | CommandReturnObject &result); |
| 139 | |
| 140 | private: |
| 141 | }; |
| 142 | |
Johnny Chen | e14cf4e | 2011-10-05 21:35:46 +0000 | [diff] [blame] | 143 | //------------------------------------------------------------------------- |
| 144 | // CommandObjectWatchpointIgnore |
| 145 | //------------------------------------------------------------------------- |
| 146 | |
| 147 | class CommandObjectWatchpointIgnore : public CommandObject |
| 148 | { |
| 149 | public: |
| 150 | CommandObjectWatchpointIgnore (CommandInterpreter &interpreter); |
| 151 | |
| 152 | virtual |
| 153 | ~CommandObjectWatchpointIgnore (); |
| 154 | |
| 155 | virtual bool |
| 156 | Execute (Args& command, |
| 157 | CommandReturnObject &result); |
| 158 | |
| 159 | virtual Options * |
| 160 | GetOptions (); |
| 161 | |
| 162 | class CommandOptions : public Options |
| 163 | { |
| 164 | public: |
| 165 | |
| 166 | CommandOptions (CommandInterpreter &interpreter); |
| 167 | |
| 168 | virtual |
| 169 | ~CommandOptions (); |
| 170 | |
| 171 | virtual Error |
| 172 | SetOptionValue (uint32_t option_idx, const char *option_arg); |
| 173 | |
| 174 | void |
| 175 | OptionParsingStarting (); |
| 176 | |
| 177 | const OptionDefinition * |
| 178 | GetDefinitions (); |
| 179 | |
| 180 | // Options table: Required for subclasses of Options. |
| 181 | |
| 182 | static OptionDefinition g_option_table[]; |
| 183 | |
| 184 | // Instance variables to hold the values for command options. |
| 185 | |
| 186 | uint32_t m_ignore_count; |
| 187 | }; |
| 188 | |
| 189 | private: |
| 190 | CommandOptions m_options; |
| 191 | }; |
| 192 | |
Johnny Chen | 712a628 | 2011-10-17 18:58:00 +0000 | [diff] [blame^] | 193 | //------------------------------------------------------------------------- |
| 194 | // CommandObjectWatchpointModify |
| 195 | //------------------------------------------------------------------------- |
| 196 | |
| 197 | class CommandObjectWatchpointModify : public CommandObject |
| 198 | { |
| 199 | public: |
| 200 | |
| 201 | CommandObjectWatchpointModify (CommandInterpreter &interpreter); |
| 202 | |
| 203 | virtual |
| 204 | ~CommandObjectWatchpointModify (); |
| 205 | |
| 206 | virtual bool |
| 207 | Execute (Args& command, |
| 208 | CommandReturnObject &result); |
| 209 | |
| 210 | virtual Options * |
| 211 | GetOptions (); |
| 212 | |
| 213 | class CommandOptions : public Options |
| 214 | { |
| 215 | public: |
| 216 | |
| 217 | CommandOptions (CommandInterpreter &interpreter); |
| 218 | |
| 219 | virtual |
| 220 | ~CommandOptions (); |
| 221 | |
| 222 | virtual Error |
| 223 | SetOptionValue (uint32_t option_idx, const char *option_arg); |
| 224 | |
| 225 | void |
| 226 | OptionParsingStarting (); |
| 227 | |
| 228 | const OptionDefinition* |
| 229 | GetDefinitions (); |
| 230 | |
| 231 | // Options table: Required for subclasses of Options. |
| 232 | |
| 233 | static OptionDefinition g_option_table[]; |
| 234 | |
| 235 | // Instance variables to hold the values for command options. |
| 236 | |
| 237 | std::string m_condition; |
| 238 | bool m_condition_passed; |
| 239 | }; |
| 240 | |
| 241 | private: |
| 242 | CommandOptions m_options; |
| 243 | }; |
| 244 | |
Johnny Chen | 01acfa7 | 2011-09-22 18:04:58 +0000 | [diff] [blame] | 245 | } // namespace lldb_private |
| 246 | |
| 247 | #endif // liblldb_CommandObjectWatchpoint_h_ |