[PATCH] Fix bug in read_3ubyte_unaligned_inc

Mark Wielaard mark@klomp.org
Sun Oct 25 19:56:12 GMT 2020

On Sat, Oct 24, 2020 at 03:05:55PM -0600, Tom Tromey wrote:
> Mark> Clearly DW_FORM_strx3 and DW_FORM_addrx3 aren't used much
> Mark> (given that it is an index value between larger than 65536).
> I don't even really see the need for a 3-byte form.
> Anyway if it helps, gdb gets this wrong too -- gdb always uses
> little-endian, which seems wrong, but I didn't know how to write a
> real-life test case.

How about the attached? It isn't very fancy, but it would have caught
the bug you found. And might be nice in case we ever refactor the
read_unaligned code.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tests-Add-read_unaligned-testcase.patch
Type: text/x-diff
Size: 14587 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/elfutils-devel/attachments/20201025/ff335f06/attachment.bin>

More information about the Elfutils-devel mailing list