[Dwarf-Discuss] Lexical block address ranges when nesting
davea42 at earthlink.net
Fri Nov 7 08:49:52 PST 2008
Martin Day wrote:
> Section 3.4 of the dwarf3 spec says :
> "The lexical block entry may have either a DW_AT_low_pc and DW_AT_high_pc
> pair of attributes or a DW_AT_ranges attribute whose values encode the
> contiguous or non-contiguous address ranges, respectively, of the machine
> instructions generated for the lexical block (see Section 2.17)."
> We're compiling C/C++ using DW_AT_ranges. Should the ranges specified for a
> lexical block include the ranges of all nested (child) lexical blocks or
> should it only be the address ranges of instructions generated for that
> lexical block as the quote above seems to imply or is it undefined and
> implementation dependant?
As I recall it: we could not come to consensus on either interpretation,
so the wording was left vague.
Someone will correct me if I'm wrong, I trust...
Given various compilers use DW_AT_ranges now it would be useful to know
what approaches the implementors actually took (and why).
More information about the Dwarf-Discuss