public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs?
@ 2018-12-13 20:27 Luke Diamand
       [not found] ` <CAORpzuOC4yGnrbtYjD=kxhJ-ytfJ0tQ3+iDq1NPZ9g8jenVi0g@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Luke Diamand @ 2018-12-13 20:27 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Roland McGrath

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-06 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 20:27 dwfl_link_map_report() on a core file with sysroot? Opens the wrong solibs? Luke Diamand
     [not found] ` <CAORpzuOC4yGnrbtYjD=kxhJ-ytfJ0tQ3+iDq1NPZ9g8jenVi0g@mail.gmail.com>
2018-12-14 13:44   ` Luke Diamand
2019-01-06 21:04     ` Mark Wielaard
2019-01-06 22:04       ` Luke Diamand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).