Eo gdb: Add workaround for gdb oddities.

These workarounds are required to make sure the plugin works across
gdb and python versions.
devs/barbieri/jenkins
Tom Hacohen 6 years ago
parent 055e905b84
commit 874071ca42
  1. 4
      data/eo/eo_gdb.py

@ -66,7 +66,7 @@ class Eo_resolve(gdb.Function):
gdb.Function.__init__(self, 'eo_resolve')
def invoke(self, arg):
obj_id = int(arg.cast(zero_uintptr_t.type))
obj_id = int(str(arg.cast(zero_uintptr_t.type)), 0)
mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID
table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID
@ -124,7 +124,7 @@ class Eo_data_get(gdb.Function):
return null_void_ptr
# Check if not mixin
if int(kls['desc']['type']) != 3:
if int(kls['desc']['type'].cast(zero_uintptr_t.type)) != 3:
return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
.format(ptr, kls['data_offset']))
else:

Loading…
Cancel
Save