Author: Diana Picus Date: 2019-11-15T14:20:25+01:00 New Revision: 5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d
URL: https://github.com/llvm/llvm-project/commit/5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d DIFF: https://github.com/llvm/llvm-project/commit/5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d.diff LOG: Fix TestFormatters.py stepping too far 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. Differential Revision: https://reviews.llvm.org/D70303 Added: Modified: lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp Removed: ################################################################################ diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py index 011dabce6e9d..4d86ac5daa68 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py +++ b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py @@ -231,9 +231,8 @@ def cleanup(): 0) == 122, '*a_ptr = 122') - self.runCmd("n") - self.runCmd("n") - self.runCmd("n") + ret = line_number("main.cpp", "Done initializing") + self.runCmd("thread until " + str(ret)) self.expect("frame variable numbers", substrs=['1', '2', '3', '4', '5']) diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp index 1b8ce48041f9..4ca2504ff8cb 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp @@ -42,7 +42,7 @@ int main(int argc, char** argv) foo1.b.i = 9999; int numbers[5] = {1,2,3,4,5}; - - return 0; - + + return 0; // Done initializing + } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits