[Lldb-commits] [lldb] r116062 - in /lldb/trunk: source/Commands/CommandObjectHelp.cpp test/help/TestHelp.py test/lldbtest.py test/stl/TestStdCXXDisassembly.py
Johnny Chen
johnny.chen at apple.com
Fri Oct 8 10:21:27 PDT 2010
Author: johnny
Date: Fri Oct 8 12:21:27 2010
New Revision: 116062
URL: http://llvm.org/viewvc/llvm-project?rev=116062&view=rev
Log:
o TestStdCXXDisassembly.py:
Update the expected match string.
o lldbtest.py:
Indicate when a command fails, even if there is nothing in the error stream.
o TestHelp.py:
Add a regression test case for 'help image dump symtab'.
o CommandObjectHelp.cpp:
Some of the logic branches with successful help command results were not tagged
with a Success Status. They are fixed now. This is important for Python
interaction.
Modified:
lldb/trunk/source/Commands/CommandObjectHelp.cpp
lldb/trunk/test/help/TestHelp.py
lldb/trunk/test/lldbtest.py
lldb/trunk/test/stl/TestStdCXXDisassembly.py
Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=116062&r1=116061&r2=116062&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Fri Oct 8 12:21:27 2010
@@ -121,6 +121,8 @@
if ((long_help != NULL)
&& (strlen (long_help) > 0))
output_strm.Printf ("\n%s", long_help);
+ // Mark this help command with a success status.
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else if (sub_cmd_obj->IsMultiwordObject())
{
@@ -149,6 +151,8 @@
else
m_interpreter.OutputFormattedHelpText (output_strm, "", "", sub_cmd_obj->GetHelp(), 1);
output_strm.Printf ("\nSyntax: %s\n", sub_cmd_obj->GetSyntax());
+ // Mark this help command with a success status.
+ result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
}
}
Modified: lldb/trunk/test/help/TestHelp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/help/TestHelp.py?rev=116062&r1=116061&r2=116062&view=diff
==============================================================================
--- lldb/trunk/test/help/TestHelp.py (original)
+++ lldb/trunk/test/help/TestHelp.py Fri Oct 8 12:21:27 2010
@@ -1,5 +1,5 @@
"""
-Test lldb help command.
+Test some lldb help commands.
See also CommandInterpreter::OutputFormattedHelpText().
"""
@@ -24,6 +24,12 @@
self.expect("help",
startstr = 'The following is a list of built-in, permanent debugger commands')
+ def test_help_image_dump_symtab_should_not_crash(self):
+ """Command 'help image dump symtab' should not crash lldb."""
+ self.expect("help image dump symtab",
+ substrs = ['image dump symtab',
+ 'sort-order'])
+
if __name__ == '__main__':
import atexit
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=116062&r1=116061&r2=116062&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Oct 8 12:21:27 2010
@@ -392,6 +392,7 @@
if self.res.Succeeded():
print >> sys.stderr, "output:", self.res.GetOutput()
else:
+ print >> sys.stderr, "runCmd failed!"
print >> sys.stderr, self.res.GetError()
if running:
Modified: lldb/trunk/test/stl/TestStdCXXDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/stl/TestStdCXXDisassembly.py?rev=116062&r1=116061&r2=116062&view=diff
==============================================================================
--- lldb/trunk/test/stl/TestStdCXXDisassembly.py (original)
+++ lldb/trunk/test/stl/TestStdCXXDisassembly.py Fri Oct 8 12:21:27 2010
@@ -33,7 +33,7 @@
# The process should be in a 'Stopped' state.
self.expect(repr(process), STOPPED_DUE_TO_BREAKPOINT, exe=False,
substrs = ["a.out",
- "state: Stopped"])
+ "Stopped"])
# Disassemble the functions on the call stack.
self.runCmd("thread backtrace")
More information about the lldb-commits
mailing list