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: Stack overflow in dwarf_getsrclines


kklic@redhat.com (Karel Klíč) writes:

> Mark Wielaard <mjw@redhat.com> writes:
>> On Mon, 2011-06-13 at 15:20 +0200, Karel Klíč wrote:
>>> I have solved the issue by avoiding the dwarf_getsrcfiles call.
>> What are you using now instead?
>
> I use just libelf. As I need only a small fraction of DWARF data, the
> code extracting it directly is straightforward (and was easy to finish
> as libdw is well written and so is the DWARF specification).
>
> I tried to use libdw, but my use case doesn't match it well. libdw is
> focused on helping the users of DWARF data (--> hiding details such as
> offsets behind interfaces), and I only need to get some headers and
> offsets. Information I was really interested in was not exposed.

Hmm, a lot of this code is already present in dwarflint, including the
(much more stringent than libdw's) consistency checks.  It probably
makes little sense to write this as a dwarflint pass, but this
cut'n'paste job is annoying, too.

I wonder what to do about it.  Is this sort of inspection something that
you will often end up having to write?  I guess I might bend dwarflint a
bit to make it more library-ish.

PM

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