[Ltrace-devel] Getting prototypes from debug information
Petr Machata
pmachata at redhat.com
Mon May 12 23:54:07 UTC 2014
Mark Wielaard <mjw at redhat.com> writes:
> On Mon, 2014-05-12 at 16:36 +0200, Petr Machata wrote:
>> 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.
>
> Yes, that seems correct. dwfl_report_elf does report the Dwfl_Module (or
> NULL on failure). So you can use that and dwfl_module_nextcu.
Dima, I think you should be able to verify whether the second
dwfl_nextcu iterates over the first module's data as well. While that's
probably harmless, it's a work duplication, and a better design would be
to store Dwfl_Module at struct library and use dwfl_module_nextcu as
indicated above.
Thanks,
PM
More information about the Ltrace-devel
mailing list