summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-11-08 20:36:40 +0000
committerJim Ingham <jingham@apple.com>2016-11-08 20:36:40 +0000
commit6a9767c7e6983c3211e35757899fb83afb2eb807 (patch)
treed3d4fc44de0827c79099978569ee676feb81c604 /lldb/packages/Python/lldbsuite/test/functionalities
parentedc183e4375ab9b5be5487035327ca14ab7c322b (diff)
downloadbcm5719-llvm-6a9767c7e6983c3211e35757899fb83afb2eb807.tar.gz
bcm5719-llvm-6a9767c7e6983c3211e35757899fb83afb2eb807.zip
Clean up the stop printing header lines.
I added a "thread-stop-format" to distinguish between the form that is just the thread info (since the stop printing immediately prints the frame info) and one with more frame 0 info - which is useful for "thread list" and the like. I also added a frame.no-debug boolean to the format entities so you can print frame information differently between frames with source info and those without. This closes https://reviews.llvm.org/D26383. <rdar://problem/28273697> llvm-svn: 286288
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py32
2 files changed, 28 insertions, 12 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py b/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
index aadd664dff5..9f55f64b2be 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
@@ -190,8 +190,8 @@ class CommandLineCompletionTestCase(TestBase):
@skipIfFreeBSD # timing out on the FreeBSD buildbot
@no_debug_info_test
def test_settings_set_th(self):
- """Test that 'settings set th' completes to 'settings set thread-format'."""
- self.complete_from_to('settings set th', 'settings set thread-format')
+ """Test that 'settings set thread-f' completes to 'settings set thread-format'."""
+ self.complete_from_to('settings set thread-f', 'settings set thread-format')
@expectedFailureAll(hostoslist=["windows"], bugnumber="llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
@@ -204,9 +204,9 @@ class CommandLineCompletionTestCase(TestBase):
@skipIfFreeBSD # timing out on the FreeBSD buildbot
@no_debug_info_test
def test_settings_clear_th(self):
- """Test that 'settings clear th' completes to 'settings clear thread-format'."""
+ """Test that 'settings clear thread-f' completes to 'settings clear thread-format'."""
self.complete_from_to(
- 'settings clear th',
+ 'settings clear thread-f',
'settings clear thread-format')
@expectedFailureAll(hostoslist=["windows"], bugnumber="llvm.org/pr24679")
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py b/lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
index 604249e14cf..937ac927001 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
@@ -72,21 +72,37 @@ class ConvenienceVariablesCase(TestBase):
self.expect(child.before, exe=False, patterns=[
'SBProcess: pid = \d+, state = stopped, threads = \d, executable = a.out'])
- child.sendline('print(lldb.thread)')
+ child.sendline('print(lldb.thread.GetStopDescription(100))')
child.expect_exact(python_prompt)
- # Linux outputs decimal tid and 'name' instead of 'queue'
self.expect(
child.before,
exe=False,
patterns=[
- 'thread #1: tid = (0x[0-9a-f]+|[0-9]+), 0x[0-9a-f]+ a\.out`main\(argc=1, argv=0x[0-9a-f]+\) \+ \d+ at main\.c:%d, (name|queue) = \'.+\', stop reason = breakpoint 1\.1' %
- self.line])
+ 'breakpoint 1\.1'])
- child.sendline('print(lldb.frame)')
+ child.sendline('lldb.frame.GetLineEntry().GetLine()')
child.expect_exact(python_prompt)
+ line_number = "%d"%(self.line)
self.expect(
child.before,
exe=False,
- patterns=[
- 'frame #0: 0x[0-9a-f]+ a\.out`main\(argc=1, argv=0x[0-9a-f]+\) \+ \d+ at main\.c:%d' %
- self.line])
+ substrs=[
+ line_number])
+
+ child.sendline('lldb.frame.GetLineEntry().GetFileSpec().GetFilename()')
+ child.expect_exact(python_prompt)
+ line_number = "%d"%(self.line)
+ self.expect(
+ child.before,
+ exe=False,
+ substrs=[
+ "main.c"])
+
+ child.sendline('lldb.frame.GetFunctionName()')
+ child.expect_exact(python_prompt)
+ line_number = "%d"%(self.line)
+ self.expect(
+ child.before,
+ exe=False,
+ substrs=[
+ "main"])
OpenPOWER on IntegriCloud