From: Sree Harsha Totakura Date: Tue, 17 Sep 2013 14:51:41 +0000 (+0000) Subject: - match according to type X-Git-Tag: initial-import-from-subversion-38251~7264 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=729eee2e184550d3d94a8a964f265f5c4ce001cc;p=oweals%2Fgnunet.git - match according to type --- diff --git a/contrib/gdb-iterate-dll.py b/contrib/gdb-iterate-dll.py index 23b4b5fc7..728747363 100644 --- a/contrib/gdb-iterate-dll.py +++ b/contrib/gdb-iterate-dll.py @@ -15,9 +15,21 @@ def iterate_dll (head, field, match, pfield): if symbol is None: print "Can't find symbol: " + head return - while not symbol: + while symbol: symbol_val = symbol.value().derefence - if match == symbol_val[field]: + field_val = symbol_val[field] + if field_val.type.code == gdb.TYPE_CODE_INT: + val = int(field_val) + res = (match == val) + if (field_val.type.code == gdb.TYPE_CODE_STRING) + or (filed_val.type.code == gdb.TYPE_CODE_ARRAY): + val = str (field_val) + res = (match == val) + if (field_val.type.code == gdb.TYPE_CODE_TYPEDEF): + val = str (field_val) + res = match in val + + if res: if pfield is None: print symbol_val else: