[Dwarf-Discuss] DW_OP_regX vs. DW_OP_bregX 0

David Anderson davea42@earthlink.net
Thu Feb 12 22:47:03 GMT 2009


Roland McGrath wrote:
>> GCC is producing nonstandard expressions.
>>     
>
> That is not in dispute.
>
>   
>> If the 0 offset happens really a lot, it could be worth doing something
>> about it.  Blessing GCC's current behavior doesn't feel right, though,
>> as it overloads DW_OP_regN to mean one thing when used by itself and 
>> another thing when embedded in a larger expression.  
>>     
>
> One could say that DW_OP_addr is overloaded in the same way.
> Alone it means "this address is the location".  Embedded it
> means "push this address on the expression stack".  The two
> (proposed) meanings for DW_OP_reg* are precisely analogous.
>
>   
Roland, I suppose  you mean  "gcc overloads DW_OP_addr
in a similar non-standard way". ?  What else could you mean?

DW_OP_addr is not overloaded in the DWARF3 spec.  Either alone or
any other way it means 'push this address on the expression stack'.
Nothing else.

At least ... AFAICT.
DavidAnderson







More information about the Dwarf-discuss mailing list