[Lldb-commits] [PATCH] D70303: Fix TestFormatters.py stepping too far

Diana Picus via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 15 03:59:15 PST 2019


rovka created this revision.
rovka added reviewers: omjavaid, lawrence_danna.
Herald added a subscriber: kristof.beyls.

TestFormatters.py has a sequence of three 'next' commands to get past
all the initializations in the test function. On AArch64 (and
potentially other platforms), this was one 'next' too many and we ended
up outside our frame.

This patch replaces the sequence with a 'thread until ' the line of the
return from the function, so we should stop after all the
initializations but before actually returning.


https://reviews.llvm.org/D70303

Files:
  lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py


Index: lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py
+++ lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py
@@ -231,9 +231,8 @@
                 0) == 122,
             '*a_ptr = 122')
 
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
+        ret = line_number("main.cpp", "return")
+        self.runCmd("thread until " + str(ret))
 
         self.expect("frame variable numbers",
                     substrs=['1', '2', '3', '4', '5'])


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70303.229502.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191115/95a2bf99/attachment-0001.bin>


More information about the lldb-commits mailing list