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

Jan Beulich jbeulich@suse.com
Fri Aug 1 12:50:26 GMT 2025


On 01.08.2025 14:31, Metzger, Markus T wrote:
>> 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?

Possibly. Not sure where the DW_OP_GNU_* namespace is maintained (and entries
assigned), though.

>  Or are there separate extension spaces
> per producer and we should declare it somewhere else?

In principle the extensions are per "environment" aiui, which may or may not
be "producer".

Recently the DW_CFA_* handling was adjusted to cope with conflicting extensions.
Likely the same is needed here. Especially if the value chosen is at risk of
conflicting with something else down the road.

Jan


More information about the Binutils mailing list