[PATCH] Binutils support for DWARF-5 DW_OP_addrx

Nick Clifton nickc@redhat.com
Fri Apr 29 14:21:18 GMT 2022


Hi Natarajan,

> [Public]

(Thanks for re-posting).

> Please review.

The patch introduced some new failures into the binutils testsuite.  For example
the new testprog.s source file fails to assemble on most architectures because it
contains x86_64 instructions...


> @@ -2661,9 +2665,10 @@ read_and_display_attr_value (unsigned long           attribute,
> 
>         uvalue = check_uvalue (block_start, uvalue, end);
> 
> -      if (do_loc)
> -    data = block_start + uvalue;
> -      else
> +      data = block_start + uvalue;
> +
> +      /* DW_OP_addrx has only the index and not address.  */
> +      if (!do_loc && ((unsigned)(*block_start) != DW_OP_addrx))

This looks wrong to me.  Why are you testing the first word of
the block for a DW_OP_addrx op ?  At this point the code is just
displaying the contents of the block, not interpreting them.  Plus
you do not check to see that there are enough bytes present in the
block to make up a word.

Cheers
   Nick



More information about the Binutils mailing list