]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf.c (print_ops): Ajust DW_OP_skip and DW_OP_bra targets calculation.
authorMark Wielaard <mjw@redhat.com>
Fri, 16 Nov 2012 11:25:04 +0000 (12:25 +0100)
committerMark Wielaard <mjw@redhat.com>
Fri, 16 Nov 2012 11:25:04 +0000 (12:25 +0100)
The 2-byte constant is the number of bytes of the DWARF expression to skip
forward or backward from the current operation, beginning after the 2-byte
constant.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/readelf.c

index 9d6fbe3c3d968efbc3a1f60441004e4e86fa1ee1..9f0c525acfdc00666eeda569526aa03bd6c6f332 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-16  Mark Wielaard  <mjw@redhat.com>
+
+       * readelf.c (print_ops): DW_OP_skip and DW_OP_bra targets are
+       calculated beginning after the operand and 2-byte constant.
+
 2012-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
index 1801c1c5c44f096e062ee3a11bcfb77c2ffeb7b8..7f6f31c6e32c7bb667335e30ad619bd934c4df51 100644 (file)
@@ -3802,7 +3802,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
          NEED (2);
          printf ("%*s[%4" PRIuMAX "] %s %" PRIuMAX "\n",
                  indent, "", (uintmax_t) offset, op_name,
-                 (uintmax_t) (offset + read_2sbyte_unaligned (dbg, data)));
+                 (uintmax_t) (offset + read_2sbyte_unaligned (dbg, data) + 3));
          CONSUME (2);
          data += 2;
          offset += 3;