While we are at it, verify that 'my_int_ptr' points to 'g_my_int', using the SBTarget.ResolveLoadAddress() to get its SBAddress,

and SBAddress.GetSymbol() to get the corresponding symbol.

llvm-svn: 144728
This commit is contained in:
Johnny Chen 2011-11-15 23:30:39 +00:00
parent e891fe8d6c
commit 4c1b096743
1 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,12 @@ class ValueAPITestCase(TestBase):
self.assertTrue(pointed, VALID_VARIABLE)
self.DebugSBValue(pointed)
# While we are at it, verify that 'my_int_ptr' points to 'g_my_int'.
symbol = target.ResolveLoadAddress(int(pointed.GetLocation(), 0)).GetSymbol()
self.assertTrue(symbol)
self.expect(symbol.GetName(), exe=False,
startstr = 'g_my_int')
# Get variable 'str_ptr'.
value = frame0.FindVariable('str_ptr')
self.assertTrue(value, VALID_VARIABLE)