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: dwfl_attach_state alternative taking Ebl?


/* [...] Architecture of DWFL
   modules is specified by ELF, ELF must remain valid during DWFL lifetime.
   Use NULL ELF to detect architecture from DWFL, the function will then detect
   it from arbitrary Dwfl_Module of DWFL.  [...]  */

So would that be an alternative for you? How do you create the Dwfl? Do
you add modules to it (how?) and when do you need to call
dwfl_attach_state?

This is what we do. We parse perf.data. perf.data may contain information about file mappings at any point, and it may take a while until the first valid one shows up. So we postpone dwfl_attach_state until we have a mapping we can resolve to a local elf file.

The code would be cleaner if we could attach_state before starting to parse. And there might be pathological cases where no valid elf file can ever be found but we can still unwind by frame pointer.

br,
Ulf


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