Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 165dda1

Browse files
committedDec 14, 2015
Correction in TestFrames.py test for arm targets in thumb mode
Differential revision: http://reviews.llvm.org/D15061 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@255547 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b21dc5a commit 165dda1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎packages/Python/lldbsuite/test/python_api/frame/TestFrames.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ def test_get_arg_vals_for_call_stack(self):
8080
gpr_reg_set = lldbutil.get_GPRs(frame)
8181
pc_value = gpr_reg_set.GetChildMemberWithName("pc")
8282
self.assertTrue (pc_value, "We should have a valid PC.")
83-
pc_value_str = pc_value.GetValue()
84-
self.assertTrue (pc_value_str, "We should have a valid PC string.")
85-
self.assertTrue (int(pc_value_str, 0) == frame.GetPC(), "PC gotten as a value should equal frame's GetPC")
83+
pc_value_int = int(pc_value.GetValue(), 0)
84+
# Make sure on arm targets we dont mismatch PC value on the basis of thumb bit.
85+
# Frame PC will not have thumb bit set in case of a thumb instruction as PC.
86+
if self.getArchitecture() in ['arm']:
87+
pc_value_int &= ~1
88+
self.assertTrue (pc_value_int == frame.GetPC(), "PC gotten as a value should equal frame's GetPC")
8689
sp_value = gpr_reg_set.GetChildMemberWithName("sp")
8790
self.assertTrue (sp_value, "We should have a valid Stack Pointer.")
8891
self.assertTrue (int(sp_value.GetValue(), 0) == frame.GetSP(), "SP gotten as a value should equal frame's GetSP")

0 commit comments

Comments
 (0)
This repository has been archived.