summaryrefslogtreecommitdiffstats
path: root/lldb/test/help/TestHelp.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-07-14 22:20:12 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-07-14 22:20:12 +0000
commit331eff3995c16e2080222b61063122aa9021e404 (patch)
treeb44363b9e4a7c981b419fd9558acc4253d30df8d /lldb/test/help/TestHelp.py
parentcbd3bb27d7fcfcfbb0e06f8cf6114976d9548ede (diff)
downloadbcm5719-llvm-331eff3995c16e2080222b61063122aa9021e404.tar.gz
bcm5719-llvm-331eff3995c16e2080222b61063122aa9021e404.zip
Fixed a crasher where entering 'help disasm' on the command line would crash lldb.
The reasom of the crash is because of a missing entry in the argument table corresponding to eArgTypeUnsignedInteger. Add such entry and modify the call site of the crash to go through a fail-fast API to retrieve the argument table. Add a regression test to TestHelp.py. llvm-svn: 135206
Diffstat (limited to 'lldb/test/help/TestHelp.py')
-rw-r--r--lldb/test/help/TestHelp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/test/help/TestHelp.py b/lldb/test/help/TestHelp.py
index 999fa40e2fc..2430a2ea098 100644
--- a/lldb/test/help/TestHelp.py
+++ b/lldb/test/help/TestHelp.py
@@ -61,6 +61,11 @@ class HelpCommandTestCase(TestBase):
self.expect("version",
patterns = ['LLDB-' + (version_str if version_str else '[0-9]+')])
+ def test_help_should_not_crash_lldb(self):
+ """Command 'help disasm' should not crash lldb."""
+ self.runCmd("help disasm", check=False)
+ self.runCmd("help unsigned-integer")
+
def test_help_should_not_hang_emacsshell(self):
"""Command 'settings set term-width 0' should not hang the help command."""
self.runCmd("settings set term-width 0")
OpenPOWER on IntegriCloud