summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/commands
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2019-11-14 11:27:41 +0100
committerDiana Picus <diana.picus@linaro.org>2019-11-15 14:20:25 +0100
commit5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d (patch)
treebbb72bb888a2ac1d82175a0a2be6014cbc1bcf9e /lldb/packages/Python/lldbsuite/test/commands
parent9c5e0fcc23f7d739f005c4e35f57024e28da7568 (diff)
downloadbcm5719-llvm-5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d.tar.gz
bcm5719-llvm-5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d.zip
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/commands')
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py5
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp6
2 files changed, 5 insertions, 6 deletions
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 011dabce6e9..4d86ac5daa6 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 @@ class ExprFormattersTestCase(TestBase):
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 1b8ce48041f..4ca2504ff8c 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
+
}
OpenPOWER on IntegriCloud