diff options
author | Jim Ingham <jingham@apple.com> | 2016-11-08 20:36:40 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-11-08 20:36:40 +0000 |
commit | 6a9767c7e6983c3211e35757899fb83afb2eb807 (patch) | |
tree | d3d4fc44de0827c79099978569ee676feb81c604 /lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter | |
parent | edc183e4375ab9b5be5487035327ca14ab7c322b (diff) | |
download | bcm5719-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/embedded_interpreter')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/embedded_interpreter/TestConvenienceVariables.py | 32 |
1 files changed, 24 insertions, 8 deletions
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"]) |