This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] libdw: dwarf_getsrclines mark highest address as end_sequence.
- From: Petr Machata <pmachata at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 25 Mar 2013 22:22:26 +0100
- Subject: Re: [PATCH] libdw: dwarf_getsrclines mark highest address as end_sequence.
Mark Wielaard <mjw@redhat.com> writes:
> Make sure the highest address for the CU is marked as end_sequence.
> This is required by the DWARF spec, but some compilers forget and
> dwfl_module_getsrc depends on it. We could reject it as bad DWARF
> but the DWARF .debug_lines spec is much stricter than what compilers
> seem to output in practice.
For context: right now we assert when we encounter Dwarf like that, so
this is certainly better.
I'm kind of split on this, a part of me would like to reject such Dwarf.
But this is more helpful to the user, and even though this could result
in a wrong answer, that's just garbage in-garbage out principle at
works.
Thanks,
PM