[Ltrace-devel] Getting prototypes from debug information

Petr Machata pmachata at redhat.com
Mon May 12 14:36:59 UTC 2014


Mark Wielaard <mjw at redhat.com> writes:

> On Sun, 2014-05-11 at 23:12 +0200, Petr Machata wrote:
>> My mistake, I thought we have a Dwfl per process, but we have one per
>> library.  Having it stored at process would perhaps fit better with the
>> overall design of Dwfl, but I guess there's no bug as things stand now.
>
> We do have one Dwfl per process for the unwinder support. It is in
> struct process and setup once for each leader in proc_add_library if it
> doesn't exist yet and if it already exists then proc_add_library will
> just add the new Elf to the Dwfl. As far as I understand the new code
> this Dwfl is then set as the dwfl of struct library too.

I see it now.  So correct me if I'm wrong, but that means that after the
first dwfl_report_elf, dwfl_nextcu would iterate over just that one
module.  However after second dwfl_report_elf, dwfl_nextcu would again
iterate over the first module, as well as the second module.

If that's correct, then I believe what we should store at struct library
is Dwfl_Module, not Dwfl itself.

Thanks,
PM



More information about the Ltrace-devel mailing list