[Dwarf-Discuss] Default values
Tue Jan 8 07:20:09 GMT 2008
I have a question about a part of the spec that seems unclear to me.
Section 4.1, numbered para 9 describes DW_AT_default_value, which can
refer to a "subroutine" to compute the default value to pass. In this
case, does the term "subroutine" refer to a function in the user's
program that the debugger can invoke? What arguments should the
debugger pass? Is the subroutine required to accept no arguments?
Does this mean that in order to describe the C++ declarations:
extern float d;
extern float foo (float x = d * 2);
the producer would need to emit machine code into the user's program,
generate a die describing that code, and have x's DW_AT_default_value
attribute refer to that die?
Or, did this mean to say "DWARF procedure", as described in section
5.16, instead of "subroutine"? If that's the case, then we have a
situation in the existing spec where DWARF expressions compute values
of potentially arbitrary type.
But I have doubts about either reading.
More information about the Dwarf-discuss