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.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117688 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectDisassemble.cpp b/source/Commands/CommandObjectDisassemble.cpp
index 30dea8a..63d8937 100644
--- a/source/Commands/CommandObjectDisassemble.cpp
+++ b/source/Commands/CommandObjectDisassemble.cpp
@@ -90,6 +90,11 @@
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 @@
{ 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 @@
}
else
{
+ // The default action is to disassemble the current frame function.
if (exe_ctx.frame)
{
SymbolContext sc(exe_ctx.frame->GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol));