[Lldb-commits] [lldb] r144728 - /lldb/trunk/test/python_api/value/TestValueAPI.py

Johnny Chen johnny.chen at apple.com
Tue Nov 15 15:30:40 PST 2011


Author: johnny
Date: Tue Nov 15 17:30:39 2011
New Revision: 144728

URL: http://llvm.org/viewvc/llvm-project?rev=144728&view=rev
Log:
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.

Modified:
    lldb/trunk/test/python_api/value/TestValueAPI.py

Modified: lldb/trunk/test/python_api/value/TestValueAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/TestValueAPI.py?rev=144728&r1=144727&r2=144728&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value/TestValueAPI.py (original)
+++ lldb/trunk/test/python_api/value/TestValueAPI.py Tue Nov 15 17:30:39 2011
@@ -99,6 +99,12 @@
         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)





More information about the lldb-commits mailing list