The DW_AT_default_value attribute on a formal_parameter DIE can be used to
express a default argument for the parameter; C++ allows this, for example.
int foo(int a, int b = 2);
int bar(int x = foo(3)); // default for x is foo(3,2)
The description of the attribute in DWARF 4 (section 4.1 it
On 09/16/2014 12:32 PM, Robinson, Paul wrote:
> Any old-timers out there who can shed light on the intent of this
> terminology? I see similar verbiage all the way back to DWARF 2.
> Thanks,
Paul, could you be more specific about where the 'similar verbiage' is?
Thanks.
DavidA.
___
DWARF v2, Section 4.1:
8. A formal parameter entry describing a formal parameter that has a
default value may have a DW_AT_default_value attribute. The value of
this attribute is a reference to the debugging information entry for a
variable or subroutine. The default value of the parameter is the
> Paul, could you be more specific about where the 'similar verbiage' is?
> Thanks.
> DavidA.
In DWARF 2, section 4.1 item 8 on p.34.
In DWARF 3, section 4.1 item 9 on p.60.
In DWARF 4, section 4.1 item 9 on p.70.
DWARF 2 did not say the attribute could be a constant; that appeared
in DWARF 3. E
Looking back through old email and DWARF drafts, I find:
The constant/variable null reference implies no default verbiage existed in
V2 (as others have noted). Al Grant (by way of David Anderson) first raised
the issue of why a reference to an otherwise unnecessary constant should be
needed to han
On 09/16/14 12:32, Robinson, Paul wrote:
The DW_AT_default_value attribute on a formal_parameter DIE can be used to
express a default argument for the parameter; C++ allows this, for example.
int foo(int a, int b = 2);
int bar(int x = foo(3)); // default for x is foo(3,2)
The descriptio
On 09/16/2014 01:50 PM, Robinson, Paul wrote:
>> Paul, could you be more specific about where the 'similar verbiage' is?
>> Thanks.
>> DavidA.
>
> In DWARF 2, section 4.1 item 8 on p.34.
> In DWARF 3, section 4.1 item 9 on p.60.
> In DWARF 4, section 4.1 item 9 on p.70.
>
My bad. Did not occur t