[Dwarf-discuss] Interpretation of FBREG: implied deref of frame_base?

jeff nelson jeff.nelson
Mon Apr 18 15:38:25 GMT 2005


I'm a debugger developer on OpenVMS. One of the compilers I support is
emitting a DW_AT_base_frame attribute that contains a single operator,
DW_OP_regx. I believe this is incorrect, and that the compiler should
emit a DW_OP_bregx instead. The difference is that the regx operator
"names" the register whereas bregx resolves to the register value.

The distinction is important when evaluating the DW_OP_fbreg operator.
In the case where regx is used, the fbreg operator must implicitly
dereference the base_frame value; in the case where bregx is used, the
frame_base value must not be dereferenced.

Unfortunately, the code on which this compiler is based has been
emitting the DW_AT_frame_base attribute like this for years, so I'm
faced with inertia / precedent to overcome.

I'm looking for confirmation that my interpretation of the Dwarf spec is
correct. On the other hand, if everyone else is interpreting the spec
contrary to how I read it, then I'll make the debugger conform to the
actual implementation and will request a change to the spec to make it
clear what is expected.

Thanks.

-Jeff





More information about the Dwarf-discuss mailing list