CommandObjectBreakpoint.h revision b4a4728ce4abd61a2d5be9ae925e1a81d56e4b5d
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/Core/Options.h" 24#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, 60 eSetTypeFunctionRegexp 61 } 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; 109 110 }; 111 112private: 113 CommandOptions m_options; 114}; 115 116//------------------------------------------------------------------------- 117// CommandObjectBreakpointEnable 118//------------------------------------------------------------------------- 119 120class CommandObjectBreakpointEnable : public CommandObject 121{ 122public: 123 CommandObjectBreakpointEnable (); 124 125 virtual 126 ~CommandObjectBreakpointEnable (); 127 128 virtual bool 129 Execute (Args& command, 130 CommandContext *context, 131 CommandInterpreter *interpreter, 132 CommandReturnObject &result); 133 134private: 135}; 136 137//------------------------------------------------------------------------- 138// CommandObjectBreakpointDisable 139//------------------------------------------------------------------------- 140 141class CommandObjectBreakpointDisable : public CommandObject 142{ 143public: 144 CommandObjectBreakpointDisable (); 145 146 virtual 147 ~CommandObjectBreakpointDisable (); 148 149 virtual bool 150 Execute (Args& command, 151 CommandContext *context, 152 CommandInterpreter *interpreter, 153 CommandReturnObject &result); 154 155private: 156}; 157 158//------------------------------------------------------------------------- 159// CommandObjectBreakpointList 160//------------------------------------------------------------------------- 161 162class CommandObjectBreakpointList : public CommandObject 163{ 164public: 165 CommandObjectBreakpointList (); 166 167 virtual 168 ~CommandObjectBreakpointList (); 169 170 virtual bool 171 Execute (Args& command, 172 CommandContext *context, 173 CommandInterpreter *interpreter, 174 CommandReturnObject &result); 175 176 virtual Options * 177 GetOptions (); 178 179 class CommandOptions : public Options 180 { 181 public: 182 183 CommandOptions (); 184 185 virtual 186 ~CommandOptions (); 187 188 virtual Error 189 SetOptionValue (int option_idx, const char *option_arg); 190 191 void 192 ResetOptionValues (); 193 194 const lldb::OptionDefinition * 195 GetDefinitions (); 196 197 // Options table: Required for subclasses of Options. 198 199 static lldb::OptionDefinition g_option_table[]; 200 201 // Instance variables to hold the values for command options. 202 203 lldb::DescriptionLevel m_level; 204 205 bool m_internal; 206 }; 207 208private: 209 CommandOptions m_options; 210}; 211 212//------------------------------------------------------------------------- 213// CommandObjectBreakpointDelete 214//------------------------------------------------------------------------- 215 216class CommandObjectBreakpointDelete : public CommandObject 217{ 218public: 219 CommandObjectBreakpointDelete (); 220 221 virtual 222 ~CommandObjectBreakpointDelete (); 223 224 virtual bool 225 Execute (Args& command, 226 CommandContext *context, 227 CommandInterpreter *interpreter, 228 CommandReturnObject &result); 229 230private: 231}; 232 233} // namespace lldb_private 234 235#endif // liblldb_CommandObjectBreakpoint_h_ 236