1import lldb 2 3def foo_SummaryProvider(valobj, dict): 4 a = valobj.GetChildMemberWithName('a') 5 a_ptr = valobj.GetChildMemberWithName('a_ptr') 6 bar = valobj.GetChildMemberWithName('b') 7 i = bar.GetChildMemberWithName('i') 8 i_ptr = bar.GetChildMemberWithName('i_ptr') 9 b_ref = bar.GetChildMemberWithName('b_ref') 10 b_ref_ptr = b_ref.AddressOf() 11 b_ref = b_ref_ptr.Dereference() 12 h = b_ref.GetChildMemberWithName('h') 13 k = b_ref.GetChildMemberWithName('k') 14 return 'a = ' + str(a.GetValueAsUnsigned(0)) + ', a_ptr = ' + \ 15 str(a_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(a_ptr.Dereference().GetValueAsUnsigned(0)) + \ 16 ', i = ' + str(i.GetValueAsUnsigned(0)) + \ 17 ', i_ptr = ' + str(i_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(i_ptr.Dereference().GetValueAsUnsigned(0)) + \ 18 ', b_ref = ' + str(b_ref.GetValueAsUnsigned(0)) + \ 19 ', h = ' + str(h.GetValueAsUnsigned(0)) + ' , k = ' + str(k.GetValueAsUnsigned(0)) 20 21def foo_SummaryProvider3(valobj, dict, options): 22 if not isinstance(options, lldb.SBTypeSummaryOptions): 23 raise Exception() 24 return foo_SummaryProvider(valobj, dict) + ", WITH_OPTS"