summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/frame
diff options
context:
space:
mode:
authorOmair Javaid <omair.javaid@linaro.org>2015-12-14 21:41:18 +0000
committerOmair Javaid <omair.javaid@linaro.org>2015-12-14 21:41:18 +0000
commit798ea5b6ff90ac9a769abbb75f42d7fbae259cee (patch)
treef50f570c36624f249b77ee8c8683996e27d8fbf0 /lldb/packages/Python/lldbsuite/test/python_api/frame
parent23bfa7e92561710d11b1ad2c4ce43e14c00e81d9 (diff)
downloadbcm5719-llvm-798ea5b6ff90ac9a769abbb75f42d7fbae259cee.tar.gz
bcm5719-llvm-798ea5b6ff90ac9a769abbb75f42d7fbae259cee.zip
Correction in TestFrames.py test for arm targets in thumb mode
Differential revision: http://reviews.llvm.org/D15061 llvm-svn: 255547
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/frame')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
index 13d5024bad3..7cc976fc6aa 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
@@ -80,9 +80,12 @@ class FrameAPITestCase(TestBase):
gpr_reg_set = lldbutil.get_GPRs(frame)
pc_value = gpr_reg_set.GetChildMemberWithName("pc")
self.assertTrue (pc_value, "We should have a valid PC.")
- pc_value_str = pc_value.GetValue()
- self.assertTrue (pc_value_str, "We should have a valid PC string.")
- self.assertTrue (int(pc_value_str, 0) == frame.GetPC(), "PC gotten as a value should equal frame's GetPC")
+ pc_value_int = int(pc_value.GetValue(), 0)
+ # Make sure on arm targets we dont mismatch PC value on the basis of thumb bit.
+ # Frame PC will not have thumb bit set in case of a thumb instruction as PC.
+ if self.getArchitecture() in ['arm']:
+ pc_value_int &= ~1
+ self.assertTrue (pc_value_int == frame.GetPC(), "PC gotten as a value should equal frame's GetPC")
sp_value = gpr_reg_set.GetChildMemberWithName("sp")
self.assertTrue (sp_value, "We should have a valid Stack Pointer.")
self.assertTrue (int(sp_value.GetValue(), 0) == frame.GetSP(), "SP gotten as a value should equal frame's GetSP")
OpenPOWER on IntegriCloud