tasn pushed a commit to branch efl-1.16.

http://git.enlightenment.org/core/efl.git/commit/?id=46d08ae4152210c8aa7a34dd1acea812f68b9bda

commit 46d08ae4152210c8aa7a34dd1acea812f68b9bda
Author: Tom Hacohen <t...@stosb.com>
Date:   Thu Dec 8 11:15:21 2016 +0000

    Eo gdb: Fix data_get calculation.
    
    I forgot to account for the offset from the beginning of the eo object.
---
 data/eo/eo_gdb.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/data/eo/eo_gdb.py b/data/eo/eo_gdb.py
index c330dc3..e403bf9 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

-- 


Reply via email to