On Thu, 13 Dec 2018 at 22:37, Roland McGrath <rol...@hack.frob.com> wrote:
>
> I think it's just missing. The hardest part is just deciding how the 
> configuration should work.

Thanks. My current attempt adds a new function call,
dwfl_set_sysroot(), which works, but feels a bit clunky. I might see
if I can just use the find_elf callback instead.


>
> On Thu, Dec 13, 2018, 12:27 Luke Diamand <l...@diamand.org wrote:
>>
>> I'm trying to get callstacks out of a core file using libdwfl where
>> the ELF files live in a sysroot (and are from a different
>> architecture, ARM).
>>
>> I'm possibly doing something stupid as I find that
>> dwfl_link_map_report() opens /lib/libpthread.so on the *host* rather
>> than the libpthread.so from my sysroot. It obviously doesn't then get
>> very far.
>>
>> I called elf_begin(), dwfl_begin() and then dwfl_core_file_report(),
>> passing in the path to the executable (in the sysroot).
>>
>> There's a comment in link_map.c around line 390 which says:
>>
>> // XXX hook for sysroot
>>
>> So inspired by this, I hacked in some code to open files relative to
>> my sysroot and it all started working.
>>
>> Am I just missing some obvious setup, or is this just missing sysroot 
>> support?
>>
>> Thanks!
>> Luke
>>
> --
>
>
> Thanks,
> Roland

Reply via email to