]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix bug in read_3ubyte_unaligned_inc
authorTom Tromey <tom@tromey.com>
Fri, 23 Oct 2020 22:51:10 +0000 (16:51 -0600)
committerMark Wielaard <mark@klomp.org>
Sat, 24 Oct 2020 19:07:11 +0000 (21:07 +0200)
The read_3ubyte_unaligned_inc macro calls read_2ubyte_unaligned, but
it should call read_3ubyte_unaligned.

Signed-off-by: Tom Tromey <tom@tromey.com>
libdw/ChangeLog
libdw/memory-access.h

index 8b0b583a1ba60510b3b3885547082e97e4434ce1..1ac4e8a97b39ea90a27bb04b4569e6a1a500643a 100644 (file)
@@ -1,3 +1,8 @@
+2020-10-23  Tom Tromey  <tom@tromey.com>
+
+       * memory-access.h (read_3ubyte_unaligned_inc): Call
+       read_3ubyte_unaligned.
+
 2020-09-03  Mark Wielaard  <mark@klomp.org>
 
        * dwarf.h: Add DW_CFA_AARCH64_negate_ra_state.
index a39ad6d294804d2b99874a056d02de70a79103bc..14436a714b80c1e656502ad72359db2d664b481f 100644 (file)
@@ -363,7 +363,7 @@ read_3ubyte_unaligned (Dwarf *dbg, const unsigned char *p)
 
 
 #define read_3ubyte_unaligned_inc(Dbg, Addr) \
-  ({ uint32_t t_ = read_2ubyte_unaligned (Dbg, Addr);                        \
+  ({ uint32_t t_ = read_3ubyte_unaligned (Dbg, Addr);                        \
      Addr = (__typeof (Addr)) (((uintptr_t) (Addr)) + 3);                    \
      t_; })