aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-12-08 11:15:21 +0000
committerTom Hacohen <tom@stosb.com>2016-12-08 11:15:21 +0000
commit46d08ae4152210c8aa7a34dd1acea812f68b9bda (patch)
tree32828e9833093e649aebd316240200f2f4e3492a
parentEo gdb: Add workaround for gdb oddities. (diff)
downloadefl-1.16.tar.gz
Eo gdb: Fix data_get calculation.efl-1.16
I forgot to account for the offset from the beginning of the eo object.
-rw-r--r--data/eo/eo_gdb.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index c330dc3b6f..e403bf95fb 100644
--- a/data/eo/eo_gdb.py
+++ b/data/eo/eo_gdb.py
@@ -113,8 +113,9 @@ class Eo_data_get(gdb.Function):
# Check if not mixin
if int(kls['desc']['type'].cast(zero_uintptr_t.type)) != 3:
- return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
- .format(ptr, kls['data_offset']))
+ return gdb.parse_and_eval(
+ '(void *) (((char *) {}) + _eo_sz + {})'
+ .format(ptr, kls['data_offset']))
else:
extn_off = ptr['klass']['extn_data_off']
if int(extn_off) == 0:
@@ -124,8 +125,9 @@ class Eo_data_get(gdb.Function):
while int(extn_off[i]['klass']) != 0:
kls = extn_off[i]['klass']
if kls['desc']['name'].string() == kls_name:
- return gdb.parse_and_eval('(void *) (((char *) {}) + {})'
- .format(ptr, kls['data_offset']))
+ return gdb.parse_and_eval(
+ '(void *) (((char *) {}) + _eo_sz + {})'
+ .format(ptr, kls['data_offset']))
i += 1
return null_void_ptr