forked from OSchip/llvm-project
Add test scenario for value.GetChildAtIndex(0) where value is a pointer to a simple type.
llvm-svn: 144697
This commit is contained in:
parent
43bde96a4c
commit
2341380033
|
@ -89,6 +89,16 @@ class ValueAPITestCase(TestBase):
|
|||
print cvf.format(weekdays)
|
||||
print rdf.format(g_table)
|
||||
|
||||
# Get variable 'my_int_ptr'.
|
||||
value = frame0.FindVariable('my_int_ptr')
|
||||
self.assertTrue(value, VALID_VARIABLE)
|
||||
self.DebugSBValue(value)
|
||||
|
||||
# Get what 'my_int_ptr' points to.
|
||||
pointed = value.GetChildAtIndex(0)
|
||||
self.assertTrue(pointed, VALID_VARIABLE)
|
||||
self.DebugSBValue(pointed)
|
||||
|
||||
# Get variable 'str_ptr'.
|
||||
value = frame0.FindVariable('str_ptr')
|
||||
self.assertTrue(value, VALID_VARIABLE)
|
||||
|
|
|
@ -31,6 +31,8 @@ const char **g_table[2] = { days_of_week, weekdays };
|
|||
int main (int argc, char const *argv[])
|
||||
{
|
||||
int i;
|
||||
int *my_int_ptr = &g_my_int;
|
||||
printf("my_int_ptr points to location %p\n", my_int_ptr);
|
||||
const char **str_ptr = days_of_week;
|
||||
for (i = 0; i < 7; ++i)
|
||||
printf("%s\n", str_ptr[i]); // Break at this line
|
||||
|
|
Loading…
Reference in New Issue