This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Merged "sane" commits from mjw/dwarf_output to dwarf branch


> I removed the special DW_AT_containing_type case and just ignore all
> self referential attribute values. Although I was tempted to just remove
> it completely (since it is wrong, wrong, wrong).

IMHO it would be more wrong for dwarf_output to crash on such input.
It's well-formed at the structural level of DWARF where that code works.
Since it exists in the wild, it's only reasonable that the code handle it.
There's no reason it can't be compressed and regurgitated faithfully,
no matter how goofy it is semantically.  And it's not even hard to handle
coherently, unlike indirect self-reference.

> It is used to get at the die_info_pair of a debug_info_entry in for
> example get_die_info () from value::value_reference to access the
> reference_hash of the die that it points to.

I see.  Given the way things are organized I don't really see a better way
to do that off hand.  The underlying vector is of die_info_pair * but the
dwarf_data::value::value_reference layer doesn't know that.  It might be
more difficult to have dwarf_output::value::value_reference written such
that it can yield the original pointer directly, given how everything is
organized.  I'd probably find some way to do it with yet another template
parameter, which is technically better in terms of checkable type safety,
but unlikely to be any less confusing.


Thanks,
Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]