aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-09-17 14:51:41 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-09-17 14:51:41 +0000
commit729eee2e184550d3d94a8a964f265f5c4ce001cc (patch)
tree10ff202a6a194903d0ab597ca3afa9f6c02bdc65 /contrib
parentf605b91f795d125009fd402dc92fdae987e3c012 (diff)
- match according to type
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gdb-iterate-dll.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/contrib/gdb-iterate-dll.py b/contrib/gdb-iterate-dll.py
index 23b4b5fc7d..7287473633 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: