[Lldb-commits] [lldb] r117688 - in /lldb/trunk: source/Commands/CommandObjectDisassemble.cpp test/foundation/TestFoundationDisassembly.py
Johnny Chen
johnny.chen at apple.com
Fri Oct 29 12:33:41 PDT 2010
Author: johnny
Date: Fri Oct 29 14:33:40 2010
New Revision: 117688
URL: http://llvm.org/viewvc/llvm-project?rev=117688&view=rev
Log:
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.
Modified:
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/test/foundation/TestFoundationDisassembly.py
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=117688&r1=117687&r2=117688&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Fri Oct 29 14:33:40 2010
@@ -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));
Modified: lldb/trunk/test/foundation/TestFoundationDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/foundation/TestFoundationDisassembly.py?rev=117688&r1=117687&r2=117688&view=diff
==============================================================================
--- lldb/trunk/test/foundation/TestFoundationDisassembly.py (original)
+++ lldb/trunk/test/foundation/TestFoundationDisassembly.py Fri Oct 29 14:33:40 2010
@@ -92,7 +92,7 @@
substrs = ["Foundation`+[NSString stringWithFormat:]"])
# Do the disassemble for the currently stopped function.
- self.runCmd("disassemble")
+ self.runCmd("disassemble -f")
self.runCmd("process continue")
@@ -101,7 +101,7 @@
substrs = ["a.out`-[MyString initWithNSString:]"])
# Do the disassemble for the currently stopped function.
- self.runCmd("disassemble")
+ self.runCmd("disassemble -f")
self.runCmd("process continue")
@@ -110,7 +110,7 @@
substrs = ["a.out`-[MyString description]"])
# Do the disassemble for the currently stopped function.
- self.runCmd("disassemble")
+ self.runCmd("disassemble -f")
self.runCmd("process continue")
@@ -119,7 +119,7 @@
substrs = ["Foundation`-[NSAutoreleasePool release]"])
# Do the disassemble for the currently stopped function.
- self.runCmd("disassemble")
+ self.runCmd("disassemble -f")
if __name__ == '__main__':
More information about the lldb-commits
mailing list