Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- CommandObjectDisassemble.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 "CommandObjectDisassemble.h" |
| 11 | |
| 12 | // C Includes |
| 13 | // C++ Includes |
| 14 | // Other libraries and framework includes |
| 15 | // Project includes |
| 16 | #include "lldb/Core/AddressRange.h" |
Jim Ingham | 84cdc15 | 2010-06-15 19:49:27 +0000 | [diff] [blame] | 17 | #include "lldb/Interpreter/Args.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 18 | #include "lldb/Interpreter/CommandCompletions.h" |
| 19 | #include "lldb/Interpreter/CommandInterpreter.h" |
| 20 | #include "lldb/Interpreter/CommandReturnObject.h" |
| 21 | #include "lldb/Core/Disassembler.h" |
Jim Ingham | 84cdc15 | 2010-06-15 19:49:27 +0000 | [diff] [blame] | 22 | #include "lldb/Interpreter/Options.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 23 | #include "lldb/Core/SourceManager.h" |
| 24 | #include "lldb/Target/StackFrame.h" |
| 25 | #include "lldb/Symbol/Symbol.h" |
| 26 | #include "lldb/Target/Process.h" |
| 27 | #include "lldb/Target/Target.h" |
| 28 | |
| 29 | #define DEFAULT_DISASM_BYTE_SIZE 32 |
| 30 | |
| 31 | using namespace lldb; |
| 32 | using namespace lldb_private; |
| 33 | |
| 34 | CommandObjectDisassemble::CommandOptions::CommandOptions () : |
| 35 | Options(), |
| 36 | m_func_name(), |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 37 | m_start_addr(), |
| 38 | m_end_addr () |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 39 | { |
| 40 | ResetOptionValues(); |
| 41 | } |
| 42 | |
| 43 | CommandObjectDisassemble::CommandOptions::~CommandOptions () |
| 44 | { |
| 45 | } |
| 46 | |
| 47 | Error |
| 48 | CommandObjectDisassemble::CommandOptions::SetOptionValue (int option_idx, const char *option_arg) |
| 49 | { |
| 50 | Error error; |
| 51 | |
| 52 | char short_option = (char) m_getopt_table[option_idx].val; |
| 53 | |
| 54 | switch (short_option) |
| 55 | { |
| 56 | case 'm': |
| 57 | show_mixed = true; |
| 58 | break; |
| 59 | |
| 60 | case 'c': |
| 61 | num_lines_context = Args::StringToUInt32(option_arg, 0, 0); |
| 62 | break; |
| 63 | |
| 64 | case 'b': |
| 65 | show_bytes = true; |
| 66 | break; |
| 67 | |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 68 | case 's': |
| 69 | m_start_addr = Args::StringToUInt64(optarg, LLDB_INVALID_ADDRESS, 0); |
| 70 | if (m_start_addr == LLDB_INVALID_ADDRESS) |
| 71 | m_start_addr = Args::StringToUInt64(optarg, LLDB_INVALID_ADDRESS, 16); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 72 | |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 73 | if (m_start_addr == LLDB_INVALID_ADDRESS) |
| 74 | error.SetErrorStringWithFormat ("Invalid start address string '%s'.\n", optarg); |
| 75 | break; |
| 76 | case 'e': |
| 77 | m_end_addr = Args::StringToUInt64(optarg, LLDB_INVALID_ADDRESS, 0); |
| 78 | if (m_end_addr == LLDB_INVALID_ADDRESS) |
| 79 | m_end_addr = Args::StringToUInt64(optarg, LLDB_INVALID_ADDRESS, 16); |
| 80 | |
| 81 | if (m_end_addr == LLDB_INVALID_ADDRESS) |
| 82 | error.SetErrorStringWithFormat ("Invalid end address string '%s'.\n", optarg); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 83 | break; |
| 84 | |
| 85 | case 'n': |
| 86 | m_func_name = option_arg; |
| 87 | break; |
| 88 | |
| 89 | case 'r': |
| 90 | raw = true; |
| 91 | break; |
| 92 | |
| 93 | default: |
| 94 | error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option); |
| 95 | break; |
| 96 | } |
| 97 | |
| 98 | return error; |
| 99 | } |
| 100 | |
| 101 | void |
| 102 | CommandObjectDisassemble::CommandOptions::ResetOptionValues () |
| 103 | { |
| 104 | Options::ResetOptionValues(); |
| 105 | show_mixed = false; |
| 106 | show_bytes = false; |
| 107 | num_lines_context = 0; |
| 108 | m_func_name.clear(); |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 109 | m_start_addr = LLDB_INVALID_ADDRESS; |
| 110 | m_end_addr = LLDB_INVALID_ADDRESS; |
Sean Callanan | 944be70 | 2010-06-17 00:32:05 +0000 | [diff] [blame] | 111 | raw = false; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | const lldb::OptionDefinition* |
| 115 | CommandObjectDisassemble::CommandOptions::GetDefinitions () |
| 116 | { |
| 117 | return g_option_table; |
| 118 | } |
| 119 | |
| 120 | lldb::OptionDefinition |
| 121 | CommandObjectDisassemble::CommandOptions::g_option_table[] = |
| 122 | { |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 123 | { LLDB_OPT_SET_ALL, false, "bytes", 'b', no_argument, NULL, 0, NULL, "Show opcode bytes when disassembling."}, |
| 124 | { LLDB_OPT_SET_ALL, false, "context", 'c', required_argument, NULL, 0, "<num-lines>", "Number of context lines of source to show."}, |
| 125 | { LLDB_OPT_SET_ALL, false, "mixed", 'm', no_argument, NULL, 0, NULL, "Enable mixed source and assembly display."}, |
| 126 | { LLDB_OPT_SET_ALL, false, "raw", 'r', no_argument, NULL, 0, NULL, "Print raw disassembly with no symbol information."}, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 127 | |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 128 | { LLDB_OPT_SET_1, true, "start-address", 's', required_argument, NULL, 0, "<start-address>", "Address to start disassembling."}, |
| 129 | { LLDB_OPT_SET_1, false, "end-address", 'e', required_argument, NULL, 0, "<end-address>", "Address to start disassembling."}, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 130 | |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 131 | { LLDB_OPT_SET_2, true, "name", 'n', required_argument, NULL, CommandCompletions::eSymbolCompletion, "<function-name>", "Disassemble entire contents of the given function name."}, |
| 132 | |
| 133 | { LLDB_OPT_SET_3, false, "current-frame", 'f', no_argument, NULL, 0, "<current-frame>", "Disassemble entire contents of the current frame's function."}, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 134 | |
| 135 | { 0, false, NULL, 0, 0, NULL, 0, NULL, NULL } |
| 136 | }; |
| 137 | |
| 138 | |
| 139 | |
| 140 | //------------------------------------------------------------------------- |
| 141 | // CommandObjectDisassemble |
| 142 | //------------------------------------------------------------------------- |
| 143 | |
| 144 | CommandObjectDisassemble::CommandObjectDisassemble () : |
| 145 | CommandObject ("disassemble", |
| 146 | "Disassemble bytes in the current function or anywhere in the inferior program.", |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 147 | "disassemble [<cmd-options>]") |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 148 | { |
| 149 | } |
| 150 | |
| 151 | CommandObjectDisassemble::~CommandObjectDisassemble() |
| 152 | { |
| 153 | } |
| 154 | |
| 155 | void |
| 156 | CommandObjectDisassemble::Disassemble |
| 157 | ( |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 158 | CommandInterpreter &interpreter, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 159 | CommandReturnObject &result, |
| 160 | Disassembler *disassembler, |
| 161 | const SymbolContextList &sc_list |
| 162 | ) |
| 163 | { |
| 164 | const size_t count = sc_list.GetSize(); |
| 165 | SymbolContext sc; |
| 166 | AddressRange range; |
| 167 | for (size_t i=0; i<count; ++i) |
| 168 | { |
| 169 | if (sc_list.GetContextAtIndex(i, sc) == false) |
| 170 | break; |
| 171 | if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, range)) |
| 172 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 173 | lldb::addr_t addr = range.GetBaseAddress().GetLoadAddress(interpreter.GetDebugger().GetExecutionContext().process); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 174 | if (addr != LLDB_INVALID_ADDRESS) |
| 175 | { |
| 176 | lldb::addr_t end_addr = addr + range.GetByteSize(); |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 177 | Disassemble (interpreter, result, disassembler, addr, end_addr); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 178 | } |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | void |
| 184 | CommandObjectDisassemble::Disassemble |
| 185 | ( |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 186 | CommandInterpreter &interpreter, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 187 | CommandReturnObject &result, |
| 188 | Disassembler *disassembler, |
| 189 | lldb::addr_t addr, |
| 190 | lldb::addr_t end_addr |
| 191 | ) |
| 192 | { |
| 193 | if (addr == LLDB_INVALID_ADDRESS) |
| 194 | return; |
| 195 | |
| 196 | if (end_addr == LLDB_INVALID_ADDRESS || addr >= end_addr) |
| 197 | end_addr = addr + DEFAULT_DISASM_BYTE_SIZE; |
| 198 | |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 199 | ExecutionContext exe_ctx (interpreter.GetDebugger().GetExecutionContext()); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 200 | DataExtractor data; |
| 201 | size_t bytes_disassembled = disassembler->ParseInstructions (&exe_ctx, eAddressTypeLoad, addr, end_addr - addr, data); |
| 202 | if (bytes_disassembled == 0) |
| 203 | { |
| 204 | // Nothing got disassembled... |
| 205 | } |
| 206 | else |
| 207 | { |
| 208 | // We got some things disassembled... |
| 209 | size_t num_instructions = disassembler->GetInstructionList().GetSize(); |
| 210 | uint32_t offset = 0; |
| 211 | Stream &output_stream = result.GetOutputStream(); |
| 212 | SymbolContext sc; |
| 213 | SymbolContext prev_sc; |
| 214 | AddressRange sc_range; |
| 215 | if (m_options.show_mixed) |
| 216 | output_stream.IndentMore (); |
| 217 | |
| 218 | for (size_t i=0; i<num_instructions; ++i) |
| 219 | { |
| 220 | Disassembler::Instruction *inst = disassembler->GetInstructionList().GetInstructionAtIndex (i); |
| 221 | if (inst) |
| 222 | { |
| 223 | lldb::addr_t curr_addr = addr + offset; |
| 224 | if (m_options.show_mixed) |
| 225 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 226 | Process *process = interpreter.GetDebugger().GetExecutionContext().process; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 227 | if (!sc_range.ContainsLoadAddress (curr_addr, process)) |
| 228 | { |
| 229 | prev_sc = sc; |
| 230 | Address curr_so_addr; |
| 231 | if (process && process->ResolveLoadAddress (curr_addr, curr_so_addr)) |
| 232 | { |
| 233 | if (curr_so_addr.GetSection()) |
| 234 | { |
| 235 | Module *module = curr_so_addr.GetSection()->GetModule(); |
| 236 | uint32_t resolved_mask = module->ResolveSymbolContextForAddress(curr_so_addr, eSymbolContextEverything, sc); |
| 237 | if (resolved_mask) |
| 238 | { |
| 239 | sc.GetAddressRange (eSymbolContextEverything, sc_range); |
| 240 | if (sc != prev_sc) |
| 241 | { |
| 242 | if (offset != 0) |
| 243 | output_stream.EOL(); |
| 244 | |
| 245 | sc.DumpStopContext(&output_stream, process, curr_so_addr); |
| 246 | output_stream.EOL(); |
| 247 | if (sc.comp_unit && sc.line_entry.IsValid()) |
| 248 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 249 | interpreter.GetDebugger().GetSourceManager().DisplaySourceLinesWithLineNumbers ( |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 250 | sc.line_entry.file, |
| 251 | sc.line_entry.line, |
| 252 | m_options.num_lines_context, |
| 253 | m_options.num_lines_context, |
| 254 | m_options.num_lines_context ? "->" : "", |
| 255 | &output_stream); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | if (m_options.show_mixed) |
| 264 | output_stream.IndentMore (); |
| 265 | output_stream.Indent(); |
| 266 | size_t inst_byte_size = inst->GetByteSize(); |
| 267 | inst->Dump(&output_stream, curr_addr, m_options.show_bytes ? &data : NULL, offset, exe_ctx, m_options.raw); |
| 268 | output_stream.EOL(); |
| 269 | offset += inst_byte_size; |
| 270 | if (m_options.show_mixed) |
| 271 | output_stream.IndentLess (); |
| 272 | } |
| 273 | else |
| 274 | { |
| 275 | break; |
| 276 | } |
| 277 | } |
| 278 | if (m_options.show_mixed) |
| 279 | output_stream.IndentLess (); |
| 280 | |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | bool |
| 285 | CommandObjectDisassemble::Execute |
| 286 | ( |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 287 | CommandInterpreter &interpreter, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 288 | Args& command, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 289 | CommandReturnObject &result |
| 290 | ) |
| 291 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 292 | Target *target = interpreter.GetDebugger().GetCurrentTarget().get(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 293 | if (target == NULL) |
| 294 | { |
| 295 | result.AppendError ("invalid target, set executable file using 'file' command"); |
| 296 | result.SetStatus (eReturnStatusFailed); |
| 297 | return false; |
| 298 | } |
| 299 | |
| 300 | ArchSpec arch(target->GetArchitecture()); |
| 301 | if (!arch.IsValid()) |
| 302 | { |
| 303 | result.AppendError ("target needs valid architecure in order to be able to disassemble"); |
| 304 | result.SetStatus (eReturnStatusFailed); |
| 305 | return false; |
| 306 | } |
| 307 | |
| 308 | Disassembler *disassembler = Disassembler::FindPlugin(arch); |
| 309 | |
| 310 | if (disassembler == NULL) |
| 311 | { |
| 312 | result.AppendErrorWithFormat ("Unable to find Disassembler plug-in for %s architecture.\n", arch.AsCString()); |
| 313 | result.SetStatus (eReturnStatusFailed); |
| 314 | return false; |
| 315 | } |
| 316 | |
| 317 | result.SetStatus (eReturnStatusSuccessFinishResult); |
| 318 | |
| 319 | lldb::addr_t addr = LLDB_INVALID_ADDRESS; |
| 320 | lldb::addr_t end_addr = LLDB_INVALID_ADDRESS; |
| 321 | ConstString name; |
| 322 | const size_t argc = command.GetArgumentCount(); |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 323 | if (argc != 0) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 324 | { |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 325 | result.AppendErrorWithFormat ("\"disassemble\" doesn't take any arguments.\n"); |
| 326 | result.SetStatus (eReturnStatusFailed); |
| 327 | return false; |
| 328 | } |
| 329 | |
| 330 | if (m_options.m_start_addr != LLDB_INVALID_ADDRESS) |
| 331 | { |
| 332 | addr = m_options.m_start_addr; |
| 333 | if (m_options.m_end_addr != LLDB_INVALID_ADDRESS) |
| 334 | { |
| 335 | end_addr = m_options.m_end_addr; |
| 336 | if (end_addr < addr) |
| 337 | { |
| 338 | result.AppendErrorWithFormat ("End address before start address.\n"); |
| 339 | result.SetStatus (eReturnStatusFailed); |
| 340 | return false; |
| 341 | } |
| 342 | } |
| 343 | else |
| 344 | end_addr = addr + DEFAULT_DISASM_BYTE_SIZE; |
| 345 | } |
| 346 | else if (!m_options.m_func_name.empty()) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 347 | { |
| 348 | ConstString tmpname(m_options.m_func_name.c_str()); |
| 349 | name = tmpname; |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 350 | } |
| 351 | else |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 352 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 353 | ExecutionContext exe_ctx(interpreter.GetDebugger().GetExecutionContext()); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 354 | if (exe_ctx.frame) |
| 355 | { |
| 356 | SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol)); |
| 357 | if (sc.function) |
| 358 | { |
| 359 | addr = sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress(exe_ctx.process); |
| 360 | if (addr != LLDB_INVALID_ADDRESS) |
| 361 | end_addr = addr + sc.function->GetAddressRange().GetByteSize(); |
| 362 | } |
| 363 | else if (sc.symbol && sc.symbol->GetAddressRangePtr()) |
| 364 | { |
| 365 | addr = sc.symbol->GetAddressRangePtr()->GetBaseAddress().GetLoadAddress(exe_ctx.process); |
| 366 | if (addr != LLDB_INVALID_ADDRESS) |
| 367 | { |
| 368 | end_addr = addr + sc.symbol->GetAddressRangePtr()->GetByteSize(); |
| 369 | if (addr == end_addr) |
| 370 | end_addr += DEFAULT_DISASM_BYTE_SIZE; |
| 371 | } |
| 372 | } |
| 373 | else |
| 374 | { |
| 375 | addr = exe_ctx.frame->GetPC().GetLoadAddress(exe_ctx.process); |
| 376 | if (addr != LLDB_INVALID_ADDRESS) |
| 377 | end_addr = addr + DEFAULT_DISASM_BYTE_SIZE; |
| 378 | } |
| 379 | } |
| 380 | else |
| 381 | { |
| 382 | result.AppendError ("invalid frame"); |
| 383 | result.SetStatus (eReturnStatusFailed); |
| 384 | return false; |
| 385 | } |
| 386 | } |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 387 | |
| 388 | if (!name.IsEmpty()) |
| 389 | { |
| 390 | SymbolContextList sc_list; |
| 391 | |
Greg Clayton | 12bec71 | 2010-06-28 21:30:43 +0000 | [diff] [blame] | 392 | if (target->GetImages().FindFunctions(name, |
| 393 | eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, |
| 394 | sc_list)) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 395 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 396 | Disassemble (interpreter, result, disassembler, sc_list); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 397 | } |
| 398 | else if (target->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list)) |
| 399 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 400 | Disassemble (interpreter, result, disassembler, sc_list); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 401 | } |
| 402 | else |
| 403 | { |
| 404 | result.AppendErrorWithFormat ("Unable to find symbol with name '%s'.\n", name.GetCString()); |
| 405 | result.SetStatus (eReturnStatusFailed); |
| 406 | return false; |
| 407 | } |
| 408 | } |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 409 | else |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 410 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 411 | Disassemble (interpreter, result, disassembler, addr, end_addr); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 412 | } |
| 413 | |
Jim Ingham | 34e9a98 | 2010-06-15 18:47:14 +0000 | [diff] [blame] | 414 | return result.Succeeded(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 415 | } |