Re: [PATCH] Fix leb128 reading

2020-10-24 Thread Mark Wielaard
Hi Tom, On Fri, Oct 23, 2020 at 09:58:34PM -0600, Tom Tromey wrote: > PR 26773 points out that some sleb128 values are decoded incorrectly. > Looking into this, I found some other unusual cases as well. > > In this patch, I chose to try to handle weird leb128 encodings by > preserving their value

Re: [PATCH] Fix bug in read_3ubyte_unaligned_inc

2020-10-24 Thread Tom Tromey
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

Re: [PATCH] Fix bug in read_3ubyte_unaligned_inc

2020-10-24 Thread Mark Wielaard
On Fri, Oct 23, 2020 at 04:51:10PM -0600, Tom Tromey wrote: > The read_3ubyte_unaligned_inc macro calls read_2ubyte_unaligned, but > it should call read_3ubyte_unaligned. Eep. And read_3ubyte_unaligned is actually is tricky to get right if you want to correctly read 3-byte unsigned integers given