summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-03-08 15:41:13 +0000
committerPavel Labath <labath@google.com>2018-03-08 15:41:13 +0000
commitb9923f049e3641ab57cd29ce90a31916740c1534 (patch)
treede1f8018fd0bd0ccdd7d34c5b5b1d3f00b2fb5eb /lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
parenta87b74f72b5985d2d6fdc4fb22b69b6a88f2de02 (diff)
downloadbcm5719-llvm-b9923f049e3641ab57cd29ce90a31916740c1534.tar.gz
bcm5719-llvm-b9923f049e3641ab57cd29ce90a31916740c1534.zip
[LLDB][PPC64] Fix single step and LldbGdbServer tests
Summary: On PPC64, the tested functions were being entered through their local entry point, while the tests expected the program to stop at the function start address, that, for PPC64, corresponds to the global entry point. To fix the issue, the test program was modified to call the functions to be tested through function pointers, which, on PPC64, force the calls through the global entry point, while not affecting the test on other platforms. Reviewers: clayborg, labath Reviewed By: labath Subscribers: alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D43768 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 327013
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index 6a56b23b064..4dbf6428b91 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -1008,9 +1008,10 @@ class GdbRemoteTestCaseBase(TestBase):
reg_info["name"] in PREFERRED_REGISTER_NAMES):
# We found a preferred register. Use it.
return reg_info["lldb_register_index"]
- if ("generic" in reg_info) and (reg_info["generic"] == "fp"):
- # A frame pointer register will do as a register to modify
- # temporarily.
+ if ("generic" in reg_info) and (reg_info["generic"] == "fp" or
+ reg_info["generic"] == "arg1"):
+ # A frame pointer or first arg register will do as a
+ # register to modify temporarily.
alternative_register_index = reg_info["lldb_register_index"]
# We didn't find a preferred register. Return whatever alternative register
OpenPOWER on IntegriCloud