1 //===-- 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" 23 #include "lldb/Interpreter/Options.h" 24 #include "lldb/Core/STLUtils.h" 25 26 namespace lldb_private { 27 28 //------------------------------------------------------------------------- 29 // CommandObjectMultiwordBreakpoint 30 //------------------------------------------------------------------------- 31 32 class CommandObjectMultiwordBreakpoint : public CommandObjectMultiword 33 { 34 public: 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 // CommandObjectdBreakpointSet 47 //------------------------------------------------------------------------- 48 49 50 class CommandObjectBreakpointSet : public CommandObject 51 { 52 public: 53 54 typedef enum BreakpointSetType 55 { 56 eSetTypeInvalid, 57 eSetTypeFileAndLine, 58 eSetTypeAddress, 59 eSetTypeFunctionName, 60 eSetTypeFunctionRegexp 61 } BreakpointSetType; 62 63 CommandObjectBreakpointSet (CommandInterpreter &interpreter); 64 65 virtual 66 ~CommandObjectBreakpointSet (); 67 68 virtual bool 69 Execute (Args& command, 70 CommandReturnObject &result); 71 72 virtual Options * 73 GetOptions (); 74 75 class CommandOptions : public Options 76 { 77 public: 78 79 CommandOptions (CommandInterpreter &interpreter); 80 81 virtual 82 ~CommandOptions (); 83 84 virtual Error 85 SetOptionValue (uint32_t option_idx, const char *option_arg); 86 87 void 88 OptionParsingStarting (); 89 90 const OptionDefinition* 91 GetDefinitions (); 92 93 // Options table: Required for subclasses of Options. 94 95 static OptionDefinition g_option_table[]; 96 97 // Instance variables to hold the values for command options. 98 99 std::string m_filename; 100 uint32_t m_line_num; 101 uint32_t m_column; 102 bool m_check_inlines; 103 std::string m_func_name; 104 uint32_t m_func_name_type_mask; 105 std::string m_func_regexp; 106 STLStringArray m_modules; 107 lldb::addr_t m_load_addr; 108 uint32_t m_ignore_count; 109 lldb::tid_t m_thread_id; 110 uint32_t m_thread_index; 111 std::string m_thread_name; 112 std::string m_queue_name; 113 114 }; 115 116 private: 117 CommandOptions m_options; 118 }; 119 120 //------------------------------------------------------------------------- 121 // CommandObjectMultiwordBreakpointModify 122 //------------------------------------------------------------------------- 123 124 125 class CommandObjectBreakpointModify : public CommandObject 126 { 127 public: 128 129 CommandObjectBreakpointModify (CommandInterpreter &interpreter); 130 131 virtual 132 ~CommandObjectBreakpointModify (); 133 134 virtual bool 135 Execute (Args& command, 136 CommandReturnObject &result); 137 138 virtual Options * 139 GetOptions (); 140 141 class CommandOptions : public Options 142 { 143 public: 144 145 CommandOptions (CommandInterpreter &interpreter); 146 147 virtual 148 ~CommandOptions (); 149 150 virtual Error 151 SetOptionValue (uint32_t option_idx, const char *option_arg); 152 153 void 154 OptionParsingStarting (); 155 156 const OptionDefinition* 157 GetDefinitions (); 158 159 // Options table: Required for subclasses of Options. 160 161 static OptionDefinition g_option_table[]; 162 163 // Instance variables to hold the values for command options. 164 165 uint32_t m_ignore_count; 166 lldb::tid_t m_thread_id; 167 bool m_thread_id_passed; 168 uint32_t m_thread_index; 169 bool m_thread_index_passed; 170 std::string m_thread_name; 171 std::string m_queue_name; 172 std::string m_condition; 173 bool m_enable_passed; 174 bool m_enable_value; 175 bool m_name_passed; 176 bool m_queue_passed; 177 bool m_condition_passed; 178 179 }; 180 181 private: 182 CommandOptions m_options; 183 }; 184 185 //------------------------------------------------------------------------- 186 // CommandObjectBreakpointEnable 187 //------------------------------------------------------------------------- 188 189 class CommandObjectBreakpointEnable : public CommandObject 190 { 191 public: 192 CommandObjectBreakpointEnable (CommandInterpreter &interpreter); 193 194 virtual 195 ~CommandObjectBreakpointEnable (); 196 197 virtual bool 198 Execute (Args& command, 199 CommandReturnObject &result); 200 201 private: 202 }; 203 204 //------------------------------------------------------------------------- 205 // CommandObjectBreakpointDisable 206 //------------------------------------------------------------------------- 207 208 class CommandObjectBreakpointDisable : public CommandObject 209 { 210 public: 211 CommandObjectBreakpointDisable (CommandInterpreter &interpreter); 212 213 virtual 214 ~CommandObjectBreakpointDisable (); 215 216 virtual bool 217 Execute (Args& command, 218 CommandReturnObject &result); 219 220 private: 221 }; 222 223 //------------------------------------------------------------------------- 224 // CommandObjectBreakpointList 225 //------------------------------------------------------------------------- 226 227 class CommandObjectBreakpointList : public CommandObject 228 { 229 public: 230 CommandObjectBreakpointList (CommandInterpreter &interpreter); 231 232 virtual 233 ~CommandObjectBreakpointList (); 234 235 virtual bool 236 Execute (Args& command, 237 CommandReturnObject &result); 238 239 virtual Options * 240 GetOptions (); 241 242 class CommandOptions : public Options 243 { 244 public: 245 246 CommandOptions (CommandInterpreter &interpreter); 247 248 virtual 249 ~CommandOptions (); 250 251 virtual Error 252 SetOptionValue (uint32_t option_idx, const char *option_arg); 253 254 void 255 OptionParsingStarting (); 256 257 const OptionDefinition * 258 GetDefinitions (); 259 260 // Options table: Required for subclasses of Options. 261 262 static OptionDefinition g_option_table[]; 263 264 // Instance variables to hold the values for command options. 265 266 lldb::DescriptionLevel m_level; 267 268 bool m_internal; 269 }; 270 271 private: 272 CommandOptions m_options; 273 }; 274 275 //------------------------------------------------------------------------- 276 // CommandObjectBreakpointClear 277 //------------------------------------------------------------------------- 278 279 280 class CommandObjectBreakpointClear : public CommandObject 281 { 282 public: 283 284 typedef enum BreakpointClearType 285 { 286 eClearTypeInvalid, 287 eClearTypeFileAndLine 288 } BreakpointClearType; 289 290 CommandObjectBreakpointClear (CommandInterpreter &interpreter); 291 292 virtual 293 ~CommandObjectBreakpointClear (); 294 295 virtual bool 296 Execute (Args& command, 297 CommandReturnObject &result); 298 299 virtual Options * 300 GetOptions (); 301 302 class CommandOptions : public Options 303 { 304 public: 305 306 CommandOptions (CommandInterpreter &interpreter); 307 308 virtual 309 ~CommandOptions (); 310 311 virtual Error 312 SetOptionValue (uint32_t option_idx, const char *option_arg); 313 314 void 315 OptionParsingStarting (); 316 317 const OptionDefinition* 318 GetDefinitions (); 319 320 // Options table: Required for subclasses of Options. 321 322 static OptionDefinition g_option_table[]; 323 324 // Instance variables to hold the values for command options. 325 326 std::string m_filename; 327 uint32_t m_line_num; 328 329 }; 330 331 private: 332 CommandOptions m_options; 333 }; 334 335 //------------------------------------------------------------------------- 336 // CommandObjectBreakpointDelete 337 //------------------------------------------------------------------------- 338 339 class CommandObjectBreakpointDelete : public CommandObject 340 { 341 public: 342 CommandObjectBreakpointDelete (CommandInterpreter &interpreter); 343 344 virtual 345 ~CommandObjectBreakpointDelete (); 346 347 virtual bool 348 Execute (Args& command, 349 CommandReturnObject &result); 350 351 private: 352 }; 353 354 } // namespace lldb_private 355 356 #endif // liblldb_CommandObjectBreakpoint_h_ 357