Make Test11588 compatible with non x86/x86_64 architecture

llvm-svn: 233796
This commit is contained in:
Tamas Berghammer 2015-04-01 10:45:44 +00:00
parent 3c0d005732
commit 319c459335
1 changed files with 5 additions and 6 deletions

View File

@ -51,12 +51,11 @@ class Issue11581TestCase(TestBase):
"addr = ",
"load_address = "])
target = lldb.debugger.GetSelectedTarget()
process = target.GetProcess()
# register r14 does not exist on 32-bit architectures, it is an x86_64 extension
# let's skip this part of the test if we are in 32-bit mode
if process.GetAddressByteSize() == 8:
# register r14 is an x86_64 extension let's skip this part of the test
# if we are on a different architecture
if self.getArchitecture() == 'x86_64':
target = lldb.debugger.GetSelectedTarget()
process = target.GetProcess()
frame = process.GetSelectedThread().GetSelectedFrame()
pointer = frame.FindVariable("r14")
addr = pointer.GetValueAsUnsigned(0)