From 8ceb8ba2fbfde84c72230fd8d468ec09d340dbf8 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Fri, 29 Oct 2010 19:33:40 +0000 Subject: The r117616 check in broken these two test cases: 1. FoundationDisassembleTestCase.test_simple_disasm_with_dsym; and 2. FoundationDisassembleTestCase.test_simple_disasm_with_dwarf the reason being the test was issuing 'disassemble' command to disassemble the current frame function when stopped. The 'disassemble' command worked previously but it was a result of bad option specification. Fix the disassemble command so that it will require 'disassemble -f' for disassembly of the current frame function. llvm-svn: 117688 --- lldb/source/Commands/CommandObjectDisassemble.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectDisassemble.cpp') diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp index 30dea8a0da5..63d893708a2 100644 --- a/lldb/source/Commands/CommandObjectDisassemble.cpp +++ b/lldb/source/Commands/CommandObjectDisassemble.cpp @@ -90,6 +90,11 @@ CommandObjectDisassemble::CommandOptions::SetOptionValue (int option_idx, const raw = true; break; + case 'f': + // The default action is to disassemble the function for the current frame. + // There's no need to set any flag. + break; + default: error.SetErrorStringWithFormat("Unrecognized short option '%c'.\n", short_option); break; @@ -130,7 +135,7 @@ CommandObjectDisassemble::CommandOptions::g_option_table[] = { LLDB_OPT_SET_2, true, "name", 'n', required_argument, NULL, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, "Disassemble entire contents of the given function name."}, -//{ LLDB_OPT_SET_3, false, "current-frame", 'f', no_argument, NULL, 0, eArgTypeNone, "Disassemble entire contents of the current frame's function."}, +{ LLDB_OPT_SET_3, true, "current-frame", 'f', no_argument, NULL, 0, eArgTypeNone, "Disassemble entire contents of the current frame's function."}, { 0, false, NULL, 0, 0, NULL, 0, eArgTypeNone, NULL } }; @@ -244,6 +249,7 @@ CommandObjectDisassemble::Execute } else { + // The default action is to disassemble the current frame function. if (exe_ctx.frame) { SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol)); -- cgit v1.2.3