[PATCH v3 33/44] gdb, dwarf, ze: add DW_OP_INTEL_regval_bits

Metzger, Markus T markus.t.metzger@intel.com
Fri Aug 1 12:31:22 GMT 2025


Hello Jan,

>On 01.08.2025 11:37, Tankut Baris Aktemur wrote:
>> --- a/include/dwarf2.def
>> +++ b/include/dwarf2.def
>> @@ -688,6 +688,10 @@ DW_OP (DW_OP_GNU_const_index, 0xfc)
>>  /* The GNU variable value extension.
>>     See http://dwarfstd.org/ShowIssue.php?issue=161109.2 . */
>>  DW_OP (DW_OP_GNU_variable_value, 0xfd)
>> +/* https://dwarfstd.org/ShowIssue.php?issue=201007.1
>> +
>> +   The DW_OP_regval_bits operation extracts a value from a register.  */
>> +DW_OP (DW_OP_INTEL_regval_bits, 0xfe)
>
>You're adding this to the GNU extensions space, which doesn't seem right,
>in particular given the name.

What would be the correct way of adding an extension?  It is, as far as I know,
only generated by the Intel Graphics Compilers, so we put INTEL in the name.

Are you asking to rename it to GNU?  Or are there separate extension spaces
per producer and we should declare it somewhere else?

>Furthermore what you link to is in state "Accepted with modification", so
>it's unclear why you couldn't simply introduce DW_OP_regval_bits itself.

It is accepted, but DWARF-6 is not out yet.  There are currently discussions
about a proposal to put location descriptions onto the DWARF stack.  If that
gets accepted, it would provide a different way of achieving the same thing,
so DW_OP_regval_bits may be removed again or may be modified.

Since it is generated by our compiler, we would still like to add it as an extension,
even if we end up generating different DWARF in a future version.

Regards,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Binutils mailing list