Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(x):
- sym = gdb.lookup_global_symbol(x)
- g(sym.type, x)
- def g(symtype, names):
- if (symtype.code == 3):
- for field in symtype.fields():
- g(field.type, names + '.' +field.name)
- if (symtype.code == 2):
- for index in range(symtype.range()[0], symtype.range()[1]+1):
- symarr = gdb.lookup_global_symbol(names+ '[' + str(index) + ']' )
- g(symtype.target(), names + '[' + str(index) + ']' )
- if (symtype.code == 8):
- print(names + ' = ' + str(int(gdb.parse_and_eval(names))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement