Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- CommandObjectFrame.cpp ----------------------------------*- 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 | #include "CommandObjectFrame.h" |
| 11 | |
| 12 | // C Includes |
| 13 | // C++ Includes |
| 14 | // Other libraries and framework includes |
| 15 | // Project includes |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 16 | #include "lldb/Core/Debugger.h" |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 17 | #include "lldb/Core/Module.h" |
| 18 | #include "lldb/Core/StreamFile.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 19 | #include "lldb/Core/Timer.h" |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 20 | #include "lldb/Core/Value.h" |
| 21 | #include "lldb/Core/ValueObject.h" |
| 22 | #include "lldb/Core/ValueObjectVariable.h" |
Greg Clayton | cd54803 | 2011-02-01 01:31:41 +0000 | [diff] [blame] | 23 | #include "lldb/Host/Host.h" |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 24 | #include "lldb/Interpreter/Args.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 25 | #include "lldb/Interpreter/CommandInterpreter.h" |
| 26 | #include "lldb/Interpreter/CommandReturnObject.h" |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 27 | #include "lldb/Interpreter/Options.h" |
| 28 | #include "lldb/Symbol/ClangASTType.h" |
| 29 | #include "lldb/Symbol/ClangASTContext.h" |
| 30 | #include "lldb/Symbol/ObjectFile.h" |
| 31 | #include "lldb/Symbol/SymbolContext.h" |
| 32 | #include "lldb/Symbol/Type.h" |
| 33 | #include "lldb/Symbol/Variable.h" |
| 34 | #include "lldb/Symbol/VariableList.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 35 | #include "lldb/Target/Process.h" |
| 36 | #include "lldb/Target/StackFrame.h" |
| 37 | #include "lldb/Target/Thread.h" |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 38 | #include "lldb/Target/Target.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 39 | |
| 40 | #include "CommandObjectThread.h" |
| 41 | |
| 42 | using namespace lldb; |
| 43 | using namespace lldb_private; |
| 44 | |
| 45 | #pragma mark CommandObjectFrameInfo |
| 46 | |
| 47 | //------------------------------------------------------------------------- |
| 48 | // CommandObjectFrameInfo |
| 49 | //------------------------------------------------------------------------- |
| 50 | |
| 51 | class CommandObjectFrameInfo : public CommandObject |
| 52 | { |
| 53 | public: |
| 54 | |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 55 | CommandObjectFrameInfo (CommandInterpreter &interpreter) : |
| 56 | CommandObject (interpreter, |
| 57 | "frame info", |
| 58 | "List information about the currently selected frame in the current thread.", |
| 59 | "frame info", |
| 60 | eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 61 | { |
| 62 | } |
| 63 | |
| 64 | ~CommandObjectFrameInfo () |
| 65 | { |
| 66 | } |
| 67 | |
| 68 | bool |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 69 | Execute (Args& command, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 70 | CommandReturnObject &result) |
| 71 | { |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 72 | ExecutionContext exe_ctx(m_interpreter.GetDebugger().GetExecutionContext()); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 73 | if (exe_ctx.frame) |
| 74 | { |
Greg Clayton | a830adb | 2010-10-04 01:05:56 +0000 | [diff] [blame] | 75 | exe_ctx.frame->DumpUsingSettingsFormat (&result.GetOutputStream()); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 76 | result.GetOutputStream().EOL(); |
| 77 | result.SetStatus (eReturnStatusSuccessFinishResult); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | result.AppendError ("no current frame"); |
| 82 | result.SetStatus (eReturnStatusFailed); |
| 83 | } |
| 84 | return result.Succeeded(); |
| 85 | } |
| 86 | }; |
| 87 | |
| 88 | #pragma mark CommandObjectFrameSelect |
| 89 | |
| 90 | //------------------------------------------------------------------------- |
| 91 | // CommandObjectFrameSelect |
| 92 | //------------------------------------------------------------------------- |
| 93 | |
| 94 | class CommandObjectFrameSelect : public CommandObject |
| 95 | { |
| 96 | public: |
| 97 | |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 98 | class CommandOptions : public Options |
| 99 | { |
| 100 | public: |
| 101 | |
| 102 | CommandOptions () : |
| 103 | Options() |
| 104 | { |
| 105 | ResetOptionValues (); |
| 106 | } |
| 107 | |
| 108 | virtual |
| 109 | ~CommandOptions () |
| 110 | { |
| 111 | } |
| 112 | |
| 113 | virtual Error |
| 114 | SetOptionValue (int option_idx, const char *option_arg) |
| 115 | { |
| 116 | Error error; |
| 117 | bool success = false; |
| 118 | char short_option = (char) m_getopt_table[option_idx].val; |
| 119 | switch (short_option) |
| 120 | { |
| 121 | case 'r': |
| 122 | relative_frame_offset = Args::StringToSInt32 (option_arg, INT32_MIN, 0, &success); |
| 123 | if (!success) |
| 124 | error.SetErrorStringWithFormat ("invalid frame offset argument '%s'.\n", option_arg); |
| 125 | break; |
| 126 | |
| 127 | default: |
Benjamin Kramer | fddc25a | 2010-11-10 20:16:47 +0000 | [diff] [blame] | 128 | error.SetErrorStringWithFormat ("Invalid short option character '%c'.\n", short_option); |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 129 | break; |
| 130 | } |
| 131 | |
| 132 | return error; |
| 133 | } |
| 134 | |
| 135 | void |
| 136 | ResetOptionValues () |
| 137 | { |
| 138 | Options::ResetOptionValues(); |
| 139 | relative_frame_offset = INT32_MIN; |
| 140 | } |
| 141 | |
| 142 | const lldb::OptionDefinition* |
| 143 | GetDefinitions () |
| 144 | { |
| 145 | return g_option_table; |
| 146 | } |
| 147 | |
| 148 | // Options table: Required for subclasses of Options. |
| 149 | |
| 150 | static lldb::OptionDefinition g_option_table[]; |
| 151 | int32_t relative_frame_offset; |
| 152 | }; |
| 153 | |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 154 | CommandObjectFrameSelect (CommandInterpreter &interpreter) : |
| 155 | CommandObject (interpreter, |
| 156 | "frame select", |
| 157 | "Select a frame by index from within the current thread and make it the current frame.", |
Caroline Tice | 43b014a | 2010-10-04 22:28:36 +0000 | [diff] [blame] | 158 | NULL, |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 159 | eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 160 | { |
Caroline Tice | 43b014a | 2010-10-04 22:28:36 +0000 | [diff] [blame] | 161 | CommandArgumentEntry arg; |
| 162 | CommandArgumentData index_arg; |
| 163 | |
| 164 | // Define the first (and only) variant of this arg. |
| 165 | index_arg.arg_type = eArgTypeFrameIndex; |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 166 | index_arg.arg_repetition = eArgRepeatOptional; |
Caroline Tice | 43b014a | 2010-10-04 22:28:36 +0000 | [diff] [blame] | 167 | |
| 168 | // There is only one variant this argument could be; put it into the argument entry. |
| 169 | arg.push_back (index_arg); |
| 170 | |
| 171 | // Push the data for the first argument into the m_arguments vector. |
| 172 | m_arguments.push_back (arg); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | ~CommandObjectFrameSelect () |
| 176 | { |
| 177 | } |
| 178 | |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 179 | virtual |
| 180 | Options * |
| 181 | GetOptions () |
| 182 | { |
| 183 | return &m_options; |
| 184 | } |
| 185 | |
| 186 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 187 | bool |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 188 | Execute (Args& command, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 189 | CommandReturnObject &result) |
| 190 | { |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 191 | ExecutionContext exe_ctx (m_interpreter.GetDebugger().GetExecutionContext()); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 192 | if (exe_ctx.thread) |
| 193 | { |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 194 | const uint32_t num_frames = exe_ctx.thread->GetStackFrameCount(); |
| 195 | uint32_t frame_idx = UINT32_MAX; |
| 196 | if (m_options.relative_frame_offset != INT32_MIN) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 197 | { |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 198 | // The one and only argument is a signed relative frame index |
| 199 | frame_idx = exe_ctx.thread->GetSelectedFrameIndex (); |
| 200 | if (frame_idx == UINT32_MAX) |
| 201 | frame_idx = 0; |
| 202 | |
| 203 | if (m_options.relative_frame_offset < 0) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 204 | { |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 205 | if (frame_idx >= -m_options.relative_frame_offset) |
| 206 | frame_idx += m_options.relative_frame_offset; |
| 207 | else |
| 208 | frame_idx = 0; |
| 209 | } |
| 210 | else if (m_options.relative_frame_offset > 0) |
| 211 | { |
| 212 | if (num_frames - frame_idx > m_options.relative_frame_offset) |
| 213 | frame_idx += m_options.relative_frame_offset; |
| 214 | else |
| 215 | frame_idx = num_frames - 1; |
| 216 | } |
| 217 | } |
| 218 | else |
| 219 | { |
| 220 | if (command.GetArgumentCount() == 1) |
| 221 | { |
| 222 | const char *frame_idx_cstr = command.GetArgumentAtIndex(0); |
| 223 | frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0); |
| 224 | } |
| 225 | else |
| 226 | { |
| 227 | result.AppendError ("invalid arguments.\n"); |
| 228 | m_options.GenerateOptionUsage (m_interpreter, result.GetErrorStream(), this); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | if (frame_idx < num_frames) |
| 233 | { |
| 234 | exe_ctx.thread->SetSelectedFrameByIndex (frame_idx); |
| 235 | exe_ctx.frame = exe_ctx.thread->GetSelectedFrame ().get(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 236 | |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 237 | if (exe_ctx.frame) |
| 238 | { |
| 239 | bool already_shown = false; |
| 240 | SymbolContext frame_sc(exe_ctx.frame->GetSymbolContext(eSymbolContextLineEntry)); |
| 241 | if (m_interpreter.GetDebugger().GetUseExternalEditor() && frame_sc.line_entry.file && frame_sc.line_entry.line != 0) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 242 | { |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 243 | already_shown = Host::OpenFileInExternalEditor (frame_sc.line_entry.file, frame_sc.line_entry.line); |
| 244 | } |
Jim Ingham | 74989e8 | 2010-08-30 19:44:40 +0000 | [diff] [blame] | 245 | |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 246 | if (DisplayFrameForExecutionContext (exe_ctx.thread, |
| 247 | exe_ctx.frame, |
| 248 | m_interpreter, |
| 249 | result.GetOutputStream(), |
| 250 | true, |
| 251 | !already_shown, |
| 252 | 3, |
| 253 | 3)) |
| 254 | { |
| 255 | result.SetStatus (eReturnStatusSuccessFinishResult); |
| 256 | return result.Succeeded(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 257 | } |
| 258 | } |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 259 | } |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 260 | result.AppendErrorWithFormat ("Frame index (%u) out of range.\n", frame_idx); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 261 | } |
| 262 | else |
| 263 | { |
| 264 | result.AppendError ("no current thread"); |
| 265 | } |
| 266 | result.SetStatus (eReturnStatusFailed); |
| 267 | return false; |
| 268 | } |
Greg Clayton | c12b6b4 | 2010-10-10 22:28:11 +0000 | [diff] [blame] | 269 | protected: |
| 270 | |
| 271 | CommandOptions m_options; |
| 272 | }; |
| 273 | |
| 274 | lldb::OptionDefinition |
| 275 | CommandObjectFrameSelect::CommandOptions::g_option_table[] = |
| 276 | { |
| 277 | { LLDB_OPT_SET_1, false, "relative", 'r', required_argument, NULL, 0, eArgTypeOffset, "A relative frame index offset from the current frame index."}, |
| 278 | { 0, false, NULL, 0, 0, NULL, NULL, eArgTypeNone, NULL } |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 279 | }; |
| 280 | |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 281 | #pragma mark CommandObjectFrameVariable |
| 282 | //---------------------------------------------------------------------- |
| 283 | // List images with associated information |
| 284 | //---------------------------------------------------------------------- |
| 285 | class CommandObjectFrameVariable : public CommandObject |
| 286 | { |
| 287 | public: |
| 288 | |
| 289 | class CommandOptions : public Options |
| 290 | { |
| 291 | public: |
| 292 | |
| 293 | CommandOptions () : |
| 294 | Options() |
| 295 | { |
| 296 | ResetOptionValues (); |
| 297 | } |
| 298 | |
| 299 | virtual |
| 300 | ~CommandOptions () |
| 301 | { |
| 302 | } |
| 303 | |
| 304 | virtual Error |
| 305 | SetOptionValue (int option_idx, const char *option_arg) |
| 306 | { |
| 307 | Error error; |
| 308 | bool success; |
| 309 | char short_option = (char) m_getopt_table[option_idx].val; |
| 310 | switch (short_option) |
| 311 | { |
| 312 | case 'o': use_objc = true; break; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 313 | case 'r': use_regex = true; break; |
| 314 | case 'a': show_args = false; break; |
| 315 | case 'l': show_locals = false; break; |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 316 | case 'g': show_globals = true; break; |
Greg Clayton | b227e14 | 2010-10-13 18:56:36 +0000 | [diff] [blame] | 317 | case 't': show_types = true; break; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 318 | case 'y': show_summary = false; break; |
| 319 | case 'L': show_location= true; break; |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 320 | case 'c': show_decl = true; break; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 321 | case 'D': debug = true; break; |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 322 | case 'f': flat_output = true; break; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 323 | case 'd': |
| 324 | max_depth = Args::StringToUInt32 (option_arg, UINT32_MAX, 0, &success); |
| 325 | if (!success) |
| 326 | error.SetErrorStringWithFormat("Invalid max depth '%s'.\n", option_arg); |
| 327 | break; |
| 328 | |
| 329 | case 'p': |
| 330 | ptr_depth = Args::StringToUInt32 (option_arg, 0, 0, &success); |
| 331 | if (!success) |
| 332 | error.SetErrorStringWithFormat("Invalid pointer depth '%s'.\n", option_arg); |
| 333 | break; |
| 334 | |
| 335 | case 'G': |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 336 | globals.push_back(ConstString (option_arg)); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 337 | break; |
| 338 | |
| 339 | case 's': |
| 340 | show_scope = true; |
| 341 | break; |
| 342 | |
| 343 | default: |
| 344 | error.SetErrorStringWithFormat("Invalid short option character '%c'.\n", short_option); |
| 345 | break; |
| 346 | } |
| 347 | |
| 348 | return error; |
| 349 | } |
| 350 | |
| 351 | void |
| 352 | ResetOptionValues () |
| 353 | { |
| 354 | Options::ResetOptionValues(); |
| 355 | |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 356 | use_objc = false; |
| 357 | use_regex = false; |
| 358 | show_args = true; |
| 359 | show_locals = true; |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 360 | show_globals = false; |
Greg Clayton | b227e14 | 2010-10-13 18:56:36 +0000 | [diff] [blame] | 361 | show_types = false; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 362 | show_scope = false; |
| 363 | show_summary = true; |
| 364 | show_location = false; |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 365 | show_decl = false; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 366 | debug = false; |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 367 | flat_output = false; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 368 | max_depth = UINT32_MAX; |
| 369 | ptr_depth = 0; |
| 370 | globals.clear(); |
| 371 | } |
| 372 | |
| 373 | const lldb::OptionDefinition* |
| 374 | GetDefinitions () |
| 375 | { |
| 376 | return g_option_table; |
| 377 | } |
| 378 | |
| 379 | // Options table: Required for subclasses of Options. |
| 380 | |
| 381 | static lldb::OptionDefinition g_option_table[]; |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 382 | bool use_objc:1, |
| 383 | use_regex:1, |
| 384 | show_args:1, |
| 385 | show_locals:1, |
| 386 | show_globals:1, |
| 387 | show_types:1, |
| 388 | show_scope:1, |
| 389 | show_summary:1, |
| 390 | show_location:1, |
| 391 | show_decl:1, |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 392 | debug:1, |
| 393 | flat_output:1; |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 394 | uint32_t max_depth; // The depth to print when dumping concrete (not pointers) aggreate values |
| 395 | uint32_t ptr_depth; // The default depth that is dumped when we find pointers |
| 396 | std::vector<ConstString> globals; |
| 397 | // Instance variables to hold the values for command options. |
| 398 | }; |
| 399 | |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 400 | CommandObjectFrameVariable (CommandInterpreter &interpreter) : |
| 401 | CommandObject (interpreter, |
| 402 | "frame variable", |
Greg Clayton | fe424a9 | 2010-09-18 03:37:20 +0000 | [diff] [blame] | 403 | "Show frame variables. All argument and local variables " |
| 404 | "that are in scope will be shown when no arguments are given. " |
| 405 | "If any arguments are specified, they can be names of " |
Johnny Chen | 17a661c | 2010-10-25 23:57:26 +0000 | [diff] [blame] | 406 | "argument, local, file static and file global variables. " |
Greg Clayton | fe424a9 | 2010-09-18 03:37:20 +0000 | [diff] [blame] | 407 | "Children of aggregate variables can be specified such as " |
| 408 | "'var->child.x'.", |
Jim Ingham | a7a9c89 | 2010-12-23 02:17:54 +0000 | [diff] [blame] | 409 | NULL, |
| 410 | eFlagProcessMustBeLaunched | eFlagProcessMustBePaused) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 411 | { |
Caroline Tice | 43b014a | 2010-10-04 22:28:36 +0000 | [diff] [blame] | 412 | CommandArgumentEntry arg; |
| 413 | CommandArgumentData var_name_arg; |
| 414 | |
| 415 | // Define the first (and only) variant of this arg. |
| 416 | var_name_arg.arg_type = eArgTypeVarName; |
| 417 | var_name_arg.arg_repetition = eArgRepeatStar; |
| 418 | |
| 419 | // There is only one variant this argument could be; put it into the argument entry. |
| 420 | arg.push_back (var_name_arg); |
| 421 | |
| 422 | // Push the data for the first argument into the m_arguments vector. |
| 423 | m_arguments.push_back (arg); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 424 | } |
| 425 | |
| 426 | virtual |
| 427 | ~CommandObjectFrameVariable () |
| 428 | { |
| 429 | } |
| 430 | |
| 431 | virtual |
| 432 | Options * |
| 433 | GetOptions () |
| 434 | { |
| 435 | return &m_options; |
| 436 | } |
| 437 | |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 438 | |
| 439 | virtual bool |
| 440 | Execute |
| 441 | ( |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 442 | Args& command, |
| 443 | CommandReturnObject &result |
| 444 | ) |
| 445 | { |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 446 | ExecutionContext exe_ctx(m_interpreter.GetDebugger().GetExecutionContext()); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 447 | if (exe_ctx.frame == NULL) |
| 448 | { |
Greg Clayton | aa44805 | 2010-09-18 04:06:15 +0000 | [diff] [blame] | 449 | result.AppendError ("you must be stopped in a valid stack frame to view frame variables."); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 450 | result.SetStatus (eReturnStatusFailed); |
| 451 | return false; |
| 452 | } |
| 453 | else |
| 454 | { |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 455 | Stream &s = result.GetOutputStream(); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 456 | |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 457 | bool get_file_globals = true; |
| 458 | VariableList *variable_list = exe_ctx.frame->GetVariableList (get_file_globals); |
| 459 | |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 460 | VariableSP var_sp; |
| 461 | ValueObjectSP valobj_sp; |
| 462 | //ValueObjectList &valobj_list = exe_ctx.frame->GetValueObjectList(); |
| 463 | const char *name_cstr = NULL; |
| 464 | size_t idx; |
| 465 | if (!m_options.globals.empty()) |
| 466 | { |
| 467 | uint32_t fail_count = 0; |
| 468 | if (exe_ctx.target) |
| 469 | { |
| 470 | const size_t num_globals = m_options.globals.size(); |
| 471 | for (idx = 0; idx < num_globals; ++idx) |
| 472 | { |
| 473 | VariableList global_var_list; |
| 474 | const uint32_t num_matching_globals = exe_ctx.target->GetImages().FindGlobalVariables (m_options.globals[idx], true, UINT32_MAX, global_var_list); |
| 475 | |
| 476 | if (num_matching_globals == 0) |
| 477 | { |
| 478 | ++fail_count; |
| 479 | result.GetErrorStream().Printf ("error: can't find global variable '%s'\n", m_options.globals[idx].AsCString()); |
| 480 | } |
| 481 | else |
| 482 | { |
| 483 | for (uint32_t global_idx=0; global_idx<num_matching_globals; ++global_idx) |
| 484 | { |
| 485 | var_sp = global_var_list.GetVariableAtIndex(global_idx); |
| 486 | if (var_sp) |
| 487 | { |
Greg Clayton | 17dae08 | 2010-09-02 02:59:18 +0000 | [diff] [blame] | 488 | valobj_sp = exe_ctx.frame->GetValueObjectForFrameVariable (var_sp); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 489 | if (!valobj_sp) |
Greg Clayton | 17dae08 | 2010-09-02 02:59:18 +0000 | [diff] [blame] | 490 | valobj_sp = exe_ctx.frame->TrackGlobalVariable (var_sp); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 491 | |
| 492 | if (valobj_sp) |
| 493 | { |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 494 | if (m_options.show_decl && var_sp->GetDeclaration ().GetFile()) |
| 495 | { |
Greg Clayton | a357ecf | 2010-09-14 03:16:58 +0000 | [diff] [blame] | 496 | var_sp->GetDeclaration ().DumpStopContext (&s, false); |
| 497 | s.PutCString (": "); |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 498 | } |
| 499 | |
Greg Clayton | 66ed2fb | 2010-10-05 00:00:42 +0000 | [diff] [blame] | 500 | ValueObject::DumpValueObject (result.GetOutputStream(), |
| 501 | exe_ctx.frame, |
| 502 | valobj_sp.get(), |
| 503 | name_cstr, |
| 504 | m_options.ptr_depth, |
| 505 | 0, |
| 506 | m_options.max_depth, |
| 507 | m_options.show_types, |
| 508 | m_options.show_location, |
| 509 | m_options.use_objc, |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 510 | false, |
| 511 | m_options.flat_output); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 512 | } |
| 513 | } |
| 514 | } |
| 515 | } |
| 516 | } |
| 517 | } |
| 518 | if (fail_count) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 519 | result.SetStatus (eReturnStatusFailed); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 520 | } |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 521 | else if (variable_list) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 522 | { |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 523 | if (command.GetArgumentCount() > 0) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 524 | { |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 525 | VariableList regex_var_list; |
| 526 | |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 527 | // If we have any args to the variable command, we will make |
| 528 | // variable objects from them... |
| 529 | for (idx = 0; (name_cstr = command.GetArgumentAtIndex(idx)) != NULL; ++idx) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 530 | { |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 531 | uint32_t ptr_depth = m_options.ptr_depth; |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 532 | |
| 533 | if (m_options.use_regex) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 534 | { |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 535 | const uint32_t regex_start_index = regex_var_list.GetSize(); |
| 536 | RegularExpression regex (name_cstr); |
| 537 | if (regex.Compile(name_cstr)) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 538 | { |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 539 | size_t num_matches = 0; |
| 540 | const size_t num_new_regex_vars = variable_list->AppendVariablesIfUnique(regex, regex_var_list, num_matches); |
| 541 | if (num_new_regex_vars > 0) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 542 | { |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 543 | for (uint32_t regex_idx = regex_start_index, end_index = regex_var_list.GetSize(); |
| 544 | regex_idx < end_index; |
| 545 | ++regex_idx) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 546 | { |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 547 | var_sp = regex_var_list.GetVariableAtIndex (regex_idx); |
| 548 | if (var_sp) |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 549 | { |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 550 | valobj_sp = exe_ctx.frame->GetValueObjectForFrameVariable (var_sp); |
| 551 | if (valobj_sp) |
| 552 | { |
| 553 | if (m_options.show_decl && var_sp->GetDeclaration ().GetFile()) |
| 554 | { |
| 555 | var_sp->GetDeclaration ().DumpStopContext (&s, false); |
| 556 | s.PutCString (": "); |
| 557 | } |
| 558 | |
| 559 | ValueObject::DumpValueObject (result.GetOutputStream(), |
| 560 | exe_ctx.frame, |
| 561 | valobj_sp.get(), |
| 562 | var_sp->GetName().AsCString(), |
| 563 | m_options.ptr_depth, |
| 564 | 0, |
| 565 | m_options.max_depth, |
| 566 | m_options.show_types, |
| 567 | m_options.show_location, |
| 568 | m_options.use_objc, |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 569 | false, |
| 570 | m_options.flat_output); |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 571 | } |
| 572 | } |
| 573 | } |
| 574 | } |
| 575 | else if (num_matches == 0) |
| 576 | { |
| 577 | result.GetErrorStream().Printf ("error: no variables matched the regular expression '%s'.\n", name_cstr); |
| 578 | } |
| 579 | } |
| 580 | else |
| 581 | { |
| 582 | char regex_error[1024]; |
| 583 | if (regex.GetErrorAsCString(regex_error, sizeof(regex_error))) |
| 584 | result.GetErrorStream().Printf ("error: %s\n", regex_error); |
| 585 | else |
| 586 | result.GetErrorStream().Printf ("error: unkown regex error when compiling '%s'\n", name_cstr); |
| 587 | } |
| 588 | } |
| 589 | else |
| 590 | { |
Greg Clayton | c3b61d2 | 2010-12-15 05:08:08 +0000 | [diff] [blame] | 591 | Error error; |
Greg Clayton | c67efa4 | 2011-01-20 19:27:18 +0000 | [diff] [blame] | 592 | const uint32_t expr_path_options = StackFrame::eExpressionPathOptionCheckPtrVsMember; |
| 593 | valobj_sp = exe_ctx.frame->GetValueForVariableExpressionPath (name_cstr, expr_path_options, error); |
Greg Clayton | c3b61d2 | 2010-12-15 05:08:08 +0000 | [diff] [blame] | 594 | if (valobj_sp) |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 595 | { |
Greg Clayton | c3b61d2 | 2010-12-15 05:08:08 +0000 | [diff] [blame] | 596 | if (m_options.show_decl && var_sp->GetDeclaration ().GetFile()) |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 597 | { |
Greg Clayton | c3b61d2 | 2010-12-15 05:08:08 +0000 | [diff] [blame] | 598 | var_sp->GetDeclaration ().DumpStopContext (&s, false); |
| 599 | s.PutCString (": "); |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 600 | } |
Greg Clayton | c3b61d2 | 2010-12-15 05:08:08 +0000 | [diff] [blame] | 601 | ValueObject::DumpValueObject (result.GetOutputStream(), |
| 602 | exe_ctx.frame, |
| 603 | valobj_sp.get(), |
| 604 | valobj_sp->GetParent() ? name_cstr : NULL, |
| 605 | ptr_depth, |
| 606 | 0, |
| 607 | m_options.max_depth, |
| 608 | m_options.show_types, |
| 609 | m_options.show_location, |
| 610 | m_options.use_objc, |
| 611 | false, |
| 612 | m_options.flat_output); |
Greg Clayton | aed5881 | 2010-09-13 02:37:44 +0000 | [diff] [blame] | 613 | } |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 614 | else |
| 615 | { |
Greg Clayton | c3b61d2 | 2010-12-15 05:08:08 +0000 | [diff] [blame] | 616 | const char *error_cstr = error.AsCString(NULL); |
| 617 | if (error_cstr) |
| 618 | result.GetErrorStream().Printf("error: %s\n", error_cstr); |
| 619 | else |
| 620 | result.GetErrorStream().Printf ("error: unable to find any variable expression path that matches '%s'\n", name_cstr); |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 621 | } |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 622 | } |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 623 | } |
| 624 | } |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 625 | else |
| 626 | { |
| 627 | const uint32_t num_variables = variable_list->GetSize(); |
| 628 | |
| 629 | if (num_variables > 0) |
| 630 | { |
| 631 | for (uint32_t i=0; i<num_variables; i++) |
| 632 | { |
Greg Clayton | bdcb6ab | 2011-01-25 23:55:37 +0000 | [diff] [blame] | 633 | var_sp = variable_list->GetVariableAtIndex(i); |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 634 | bool dump_variable = true; |
| 635 | |
| 636 | switch (var_sp->GetScope()) |
| 637 | { |
| 638 | case eValueTypeVariableGlobal: |
| 639 | dump_variable = m_options.show_globals; |
| 640 | if (dump_variable && m_options.show_scope) |
| 641 | s.PutCString("GLOBAL: "); |
| 642 | break; |
| 643 | |
| 644 | case eValueTypeVariableStatic: |
| 645 | dump_variable = m_options.show_globals; |
| 646 | if (dump_variable && m_options.show_scope) |
| 647 | s.PutCString("STATIC: "); |
| 648 | break; |
| 649 | |
| 650 | case eValueTypeVariableArgument: |
| 651 | dump_variable = m_options.show_args; |
| 652 | if (dump_variable && m_options.show_scope) |
| 653 | s.PutCString(" ARG: "); |
| 654 | break; |
| 655 | |
| 656 | case eValueTypeVariableLocal: |
| 657 | dump_variable = m_options.show_locals; |
| 658 | if (dump_variable && m_options.show_scope) |
| 659 | s.PutCString(" LOCAL: "); |
| 660 | break; |
| 661 | |
| 662 | default: |
| 663 | break; |
| 664 | } |
| 665 | |
| 666 | if (dump_variable) |
| 667 | { |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 668 | |
| 669 | // Use the variable object code to make sure we are |
| 670 | // using the same APIs as the the public API will be |
| 671 | // using... |
| 672 | valobj_sp = exe_ctx.frame->GetValueObjectForFrameVariable (var_sp); |
| 673 | if (valobj_sp) |
| 674 | { |
Greg Clayton | a357ecf | 2010-09-14 03:16:58 +0000 | [diff] [blame] | 675 | // When dumping all variables, don't print any variables |
| 676 | // that are not in scope to avoid extra unneeded output |
| 677 | if (valobj_sp->IsInScope (exe_ctx.frame)) |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 678 | { |
Greg Clayton | a357ecf | 2010-09-14 03:16:58 +0000 | [diff] [blame] | 679 | if (m_options.show_decl && var_sp->GetDeclaration ().GetFile()) |
| 680 | { |
| 681 | var_sp->GetDeclaration ().DumpStopContext (&s, false); |
| 682 | s.PutCString (": "); |
| 683 | } |
Greg Clayton | 66ed2fb | 2010-10-05 00:00:42 +0000 | [diff] [blame] | 684 | ValueObject::DumpValueObject (result.GetOutputStream(), |
| 685 | exe_ctx.frame, |
| 686 | valobj_sp.get(), |
| 687 | name_cstr, |
| 688 | m_options.ptr_depth, |
| 689 | 0, |
| 690 | m_options.max_depth, |
| 691 | m_options.show_types, |
| 692 | m_options.show_location, |
| 693 | m_options.use_objc, |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 694 | false, |
| 695 | m_options.flat_output); |
Greg Clayton | a357ecf | 2010-09-14 03:16:58 +0000 | [diff] [blame] | 696 | } |
Greg Clayton | c0cf52d | 2010-09-13 03:44:33 +0000 | [diff] [blame] | 697 | } |
| 698 | } |
| 699 | } |
| 700 | } |
| 701 | } |
| 702 | result.SetStatus (eReturnStatusSuccessFinishResult); |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 703 | } |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 704 | } |
| 705 | return result.Succeeded(); |
| 706 | } |
| 707 | protected: |
| 708 | |
| 709 | CommandOptions m_options; |
| 710 | }; |
| 711 | |
| 712 | lldb::OptionDefinition |
| 713 | CommandObjectFrameVariable::CommandOptions::g_option_table[] = |
| 714 | { |
Caroline Tice | 4d6675c | 2010-10-01 19:59:14 +0000 | [diff] [blame] | 715 | { LLDB_OPT_SET_1, false, "debug", 'D', no_argument, NULL, 0, eArgTypeNone, "Enable verbose debug information."}, |
| 716 | { LLDB_OPT_SET_1, false, "depth", 'd', required_argument, NULL, 0, eArgTypeCount, "Set the max recurse depth when dumping aggregate types (default is infinity)."}, |
| 717 | { LLDB_OPT_SET_1, false, "show-globals",'g', no_argument, NULL, 0, eArgTypeNone, "Show the current frame source file global and static variables."}, |
| 718 | { LLDB_OPT_SET_1, false, "find-global",'G', required_argument, NULL, 0, eArgTypeVarName, "Find a global variable by name (which might not be in the current stack frame source file)."}, |
| 719 | { LLDB_OPT_SET_1, false, "location", 'L', no_argument, NULL, 0, eArgTypeNone, "Show variable location information."}, |
| 720 | { LLDB_OPT_SET_1, false, "show-declaration", 'c', no_argument, NULL, 0, eArgTypeNone, "Show variable declaration information (source file and line where the variable was declared)."}, |
Caroline Tice | 4d6675c | 2010-10-01 19:59:14 +0000 | [diff] [blame] | 721 | { LLDB_OPT_SET_1, false, "no-args", 'a', no_argument, NULL, 0, eArgTypeNone, "Omit function arguments."}, |
| 722 | { LLDB_OPT_SET_1, false, "no-locals", 'l', no_argument, NULL, 0, eArgTypeNone, "Omit local variables."}, |
Greg Clayton | b227e14 | 2010-10-13 18:56:36 +0000 | [diff] [blame] | 723 | { LLDB_OPT_SET_1, false, "show-types", 't', no_argument, NULL, 0, eArgTypeNone, "Show variable types when dumping values."}, |
Caroline Tice | 4d6675c | 2010-10-01 19:59:14 +0000 | [diff] [blame] | 724 | { LLDB_OPT_SET_1, false, "no-summary", 'y', no_argument, NULL, 0, eArgTypeNone, "Omit summary information."}, |
| 725 | { LLDB_OPT_SET_1, false, "scope", 's', no_argument, NULL, 0, eArgTypeNone, "Show variable scope (argument, local, global, static)."}, |
Greg Clayton | 9bd7e35 | 2010-10-28 00:56:11 +0000 | [diff] [blame] | 726 | { LLDB_OPT_SET_1, false, "objc", 'o', no_argument, NULL, 0, eArgTypeNone, "When looking up a variable by name, print as an Objective-C object."}, |
Caroline Tice | 4d6675c | 2010-10-01 19:59:14 +0000 | [diff] [blame] | 727 | { LLDB_OPT_SET_1, false, "ptr-depth", 'p', required_argument, NULL, 0, eArgTypeCount, "The number of pointers to be traversed when dumping values (default is zero)."}, |
Greg Clayton | 6bc0b5d | 2010-10-10 23:55:27 +0000 | [diff] [blame] | 728 | { LLDB_OPT_SET_1, false, "regex", 'r', no_argument, NULL, 0, eArgTypeRegularExpression, "The <variable-name> argument for name lookups are regular expressions."}, |
Greg Clayton | bf8e42b | 2010-10-14 22:52:14 +0000 | [diff] [blame] | 729 | { LLDB_OPT_SET_1, false, "flat", 'f', no_argument, NULL, 0, eArgTypeNone, "Display results in a flat format that uses expression paths for each variable or member."}, |
Caroline Tice | 4d6675c | 2010-10-01 19:59:14 +0000 | [diff] [blame] | 730 | { 0, false, NULL, 0, 0, NULL, NULL, eArgTypeNone, NULL } |
Jim Ingham | 537926c | 2010-09-02 00:18:39 +0000 | [diff] [blame] | 731 | }; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 732 | #pragma mark CommandObjectMultiwordFrame |
| 733 | |
| 734 | //------------------------------------------------------------------------- |
| 735 | // CommandObjectMultiwordFrame |
| 736 | //------------------------------------------------------------------------- |
| 737 | |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 738 | CommandObjectMultiwordFrame::CommandObjectMultiwordFrame (CommandInterpreter &interpreter) : |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 739 | CommandObjectMultiword (interpreter, |
| 740 | "frame", |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 741 | "A set of commands for operating on the current thread's frames.", |
| 742 | "frame <subcommand> [<subcommand-options>]") |
| 743 | { |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 744 | LoadSubCommand ("info", CommandObjectSP (new CommandObjectFrameInfo (interpreter))); |
| 745 | LoadSubCommand ("select", CommandObjectSP (new CommandObjectFrameSelect (interpreter))); |
| 746 | LoadSubCommand ("variable", CommandObjectSP (new CommandObjectFrameVariable (interpreter))); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 747 | } |
| 748 | |
| 749 | CommandObjectMultiwordFrame::~CommandObjectMultiwordFrame () |
| 750 | { |
| 751 | } |
| 752 | |