How to specify location of shared libraries for core file?

2021-03-12 Thread Pablo Galindo Salgado via 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


Re: How to specify location of shared libraries for core file?

2021-03-19 Thread Pablo Galindo Salgado via 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  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
>
>


Get r_debug from a core file

2022-03-24 Thread Pablo Galindo Salgado via Elfutils-devel
Hi,

I'm trying to obtain the r_debug structure from a core file. It seems that
elfutils
is able to obtain the structure using the "dwfl_link_map_report" function,
but unfortunately
this is internal.

Is there a known way to obtain the structure using functions from the
public API?

If not, would you be willing to expose one or make dwfl_link_map_report
public?

Thanks for your consideration,

Pablo Galindo