public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* How to specify location of shared libraries for core file?
@ 2021-03-12 20:10 Pablo Galindo Salgado
  2021-03-19 16:10 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Galindo Salgado @ 2021-03-12 20:10 UTC (permalink / raw)
  To: elfutils-devel

Hi,

It is possible to specify the location of shared libraries when
reporting/attaching to a core file? The problem
I am having is that when the core is moved to another machine the location
of the shared libraries reported in
its NOTE segments (and also the r_debug and link maps) are no longer
correct and therefore when calling
dwfl_core_file_report() and dwfl_core_file_attach() it doesn't correctly
populate the location of all the modules
so symbols and backtracking cannot be done.

I tried to set up a search path using the "debuginfo_path" string in the
callbacks for dwfl_begin() but it didn't have any effect.

Could you please advise or point me in the general route of how this could
be solved?

Thanks a lot in advance!

Kind regards,
Pablo Galindo Salgado

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

* Re: How to specify location of shared libraries for core file?
  2021-03-12 20:10 How to specify location of shared libraries for core file? Pablo Galindo Salgado
@ 2021-03-19 16:10 ` Frank Ch. Eigler
  2021-03-20  0:35   ` Pablo Galindo Salgado
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2021-03-19 16:10 UTC (permalink / raw)
  To: Pablo Galindo Salgado; +Cc: elfutils-devel

Hi -

> It is possible to specify the location of shared libraries when
> reporting/attaching to a core file? The problem I am having is that
> when the core is moved to another machine [...]

Once this gdb feature is added, this should Just Work (tm) via
buildid/debuginfod indexing.  (I understand that's not a direct
answer to your question.)

https://sourceware.org/bugzilla/show_bug.cgi?id=27570

elfutils' eu-stack already handles core files with buildids,
delegating to debuginfod for fetching related content.


- FChE


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

* Re: How to specify location of shared libraries for core file?
  2021-03-19 16:10 ` Frank Ch. Eigler
@ 2021-03-20  0:35   ` Pablo Galindo Salgado
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Galindo Salgado @ 2021-03-20  0:35 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: elfutils-devel

Hi Frank,

Thanks a lot for your answer!


*> elfutils' eu-stack already handles core files with buildids,> delegating
to debuginfod for fetching related content.*

Unfortunately, I cannot use the debuginfod server for several
reasons, but I have a copy of all shared objects and the executable,
I just need to be able to tell elfutils that the path that retrieves from
the core is not correct (elfutils uses the link maps in the core, that
contain the hardcoded absolute address to the original shared objects)
and then supply my own.

Do you know if there is some easy way to provide search locations for
shared objects?

Thanks in advance,

Pablo

On Fri, 19 Mar 2021 at 16:11, Frank Ch. Eigler <fche@redhat.com> wrote:

> Hi -
>
> > It is possible to specify the location of shared libraries when
> > reporting/attaching to a core file? The problem I am having is that
> > when the core is moved to another machine [...]
>
> Once this gdb feature is added, this should Just Work (tm) via
> buildid/debuginfod indexing.  (I understand that's not a direct
> answer to your question.)
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=27570
>
> elfutils' eu-stack already handles core files with buildids,
> delegating to debuginfod for fetching related content.
>
>
> - FChE
>
>

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

end of thread, other threads:[~2021-03-20  0:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 20:10 How to specify location of shared libraries for core file? Pablo Galindo Salgado
2021-03-19 16:10 ` Frank Ch. Eigler
2021-03-20  0:35   ` Pablo Galindo Salgado

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).