summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-12-08 11:03:25 +0000
committerTom Hacohen <tom@stosb.com>2016-12-08 11:19:51 +0000
commit874071ca42d59d0870b2f7055c15d878cbdf1368 (patch)
tree719cf01cd6466887ed6e6b2653d96543966199df /data
parent055e905b84c702d746155dbd8f3b655a920a7577 (diff)
Eo gdb: Add workaround for gdb oddities.
These workarounds are required to make sure the plugin works across gdb and python versions.
Diffstat (limited to 'data')
-rw-r--r--data/eo/eo_gdb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index e02dd10..2f86fdc 100644
--- a/data/eo/eo_gdb.py
+++ b/data/eo/eo_gdb.py
@@ -66,7 +66,7 @@ class Eo_resolve(gdb.Function):
66 gdb.Function.__init__(self, 'eo_resolve') 66 gdb.Function.__init__(self, 'eo_resolve')
67 67
68 def invoke(self, arg): 68 def invoke(self, arg):
69 obj_id = int(arg.cast(zero_uintptr_t.type)) 69 obj_id = int(str(arg.cast(zero_uintptr_t.type)), 0)
70 70
71 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID 71 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID
72 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID 72 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID
@@ -124,7 +124,7 @@ class Eo_data_get(gdb.Function):
124 return null_void_ptr 124 return null_void_ptr
125 125
126 # Check if not mixin 126 # Check if not mixin
127 if int(kls['desc']['type']) != 3: 127 if int(kls['desc']['type'].cast(zero_uintptr_t.type)) != 3:
128 return gdb.parse_and_eval('(void *) (((char *) {}) + {})' 128 return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
129 .format(ptr, kls['data_offset'])) 129 .format(ptr, kls['data_offset']))
130 else: 130 else: