summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectDisassemble.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-10-29 19:33:40 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-10-29 19:33:40 +0000
commit8ceb8ba2fbfde84c72230fd8d468ec09d340dbf8 (patch)
tree672d0435fe56dc5136e1dc4141dc24494c986d60 /lldb/source/Commands/CommandObjectDisassemble.cpp
parent6ae3fba7c8d5c9e546eb42f692545e36326453a6 (diff)
downloadbcm5719-llvm-8ceb8ba2fbfde84c72230fd8d468ec09d340dbf8.tar.gz
bcm5719-llvm-8ceb8ba2fbfde84c72230fd8d468ec09d340dbf8.zip
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectDisassemble.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp8
1 files changed, 7 insertions, 1 deletions
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));
OpenPOWER on IntegriCloud