summaryrefslogtreecommitdiff
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
parent1a39c10ccbbe9be8e92165268e06329c2ccd2649 (diff)
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):
113 113
114 # Check if not mixin 114 # Check if not mixin
115 if int(kls['desc']['type'].cast(zero_uintptr_t.type)) != 3: 115 if int(kls['desc']['type'].cast(zero_uintptr_t.type)) != 3:
116 return gdb.parse_and_eval('(void *) (((char *) {}) + {})' 116 return gdb.parse_and_eval(
117 .format(ptr, kls['data_offset'])) 117 '(void *) (((char *) {}) + _eo_sz + {})'
118 .format(ptr, kls['data_offset']))
118 else: 119 else:
119 extn_off = ptr['klass']['extn_data_off'] 120 extn_off = ptr['klass']['extn_data_off']
120 if int(extn_off) == 0: 121 if int(extn_off) == 0:
@@ -124,8 +125,9 @@ class Eo_data_get(gdb.Function):
124 while int(extn_off[i]['klass']) != 0: 125 while int(extn_off[i]['klass']) != 0:
125 kls = extn_off[i]['klass'] 126 kls = extn_off[i]['klass']
126 if kls['desc']['name'].string() == kls_name: 127 if kls['desc']['name'].string() == kls_name:
127 return gdb.parse_and_eval('(void *) (((char *) {}) + {})' 128 return gdb.parse_and_eval(
128 .format(ptr, kls['data_offset'])) 129 '(void *) (((char *) {}) + _eo_sz + {})'
130 .format(ptr, kls['data_offset']))
129 i += 1 131 i += 1
130 132
131 return null_void_ptr 133 return null_void_ptr