[PATCH v2 4/4] gdb/dwarf: fix reading DW_FORM_addrx with address size of 2

Simon Marchi simon.marchi@polymtl.ca
Thu Sep 24 15:59:33 GMT 2026


On 9/23/26 11:13 AM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> @@ -14658,25 +14660,34 @@ read_addr_index_1 (dwarf2_per_objfile *per_objfile, unsigned int addr_index,
> 
> Simon> +  ULONGEST entry_offset = static_cast<ULONGEST> (addr_index) * addr_size;
> 
> Since the only use is in a cast to another type, perhaps the type should
> just be ULONGEST in the signature.

I did this change.  All the callers start with a 64 address index vlaue
anyway, so we might as well just pass it as 64 bits all the way through.

Pushed with that changed, thanks.

Simon


More information about the Binutils mailing list