forked from enlightenment/efl
Eo gdb: Add workaround for gdb oddities.
These workarounds are required to make sure the plugin works across gdb and python versions.
This commit is contained in:
parent
055e905b84
commit
874071ca42
|
@ -66,7 +66,7 @@ class Eo_resolve(gdb.Function):
|
||||||
gdb.Function.__init__(self, 'eo_resolve')
|
gdb.Function.__init__(self, 'eo_resolve')
|
||||||
|
|
||||||
def invoke(self, arg):
|
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
|
mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID
|
||||||
table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_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
|
return null_void_ptr
|
||||||
|
|
||||||
# Check if not mixin
|
# 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 *) {}) + {})'
|
return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
|
||||||
.format(ptr, kls['data_offset']))
|
.format(ptr, kls['data_offset']))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue