Re: Decoding stack in core file without correct libs?

Dmitry Samersoff <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Pierre,

You can run command (below) on your own machine:

gdb -batch --eval "info shared"  binary core 2> /dev/null |\
 sed -n -e 's/^.*Yes[^\/]*\//\//p' -e 's/^.*No[^\/]*\//\//p'  > filelist

and then do

cat filelist | zip zipme.zip -@

on client's one.

PS: this small article might be helpful.

http://www.samersoff.net/do/index.php/blog/19-articles/56-how-to-open-java-coredump-in-gdb


-Dmitry

On 07/13/2017 12:24 PM, Pierre Ossman wrote:
> Hi,
> 
> I'd like to see if there is a way to produce binaries so that gdb can
> walk the stack in a core dump even if the libraries gdb sees doesn't
> match the libraries when the core dump was generated.
> 
> My scenario is simply that we might get crashes at customer sites.
> Rather than getting some kind of remote access up an running, it would
> be easier to have them send us a core dump from the crash. We then load
> the core file together with a binary with debug symbols on our end.
> 
> Unfortunately gdb doesn't traverse the stack correctly if the crash is
> in a system library. We just get random addresses for each frame.
> 
> It's okay that we cannot get the proper symbols or local variables for
> frames that are in system libraries, but is there some way to get access
> to the frames that are in our binary?
> 
> Regards
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJZZ0OEAAoJEHEy08c4gIAByRIIAJZl8YfUyBl7bYr7zcMu/Wtb
/xHJPkoW1A6JcCz+FKeYDJXx3QbJrX202L8H/Ix+Z3EAGdjFLaJl5AHeLlgNdZPV
qF70PWZvHBGk398N589W87Tknl0TZJNwSk0OM3iRyxYs+YH3iND5FUW6pOfVR4NU
W7q1BUyd/L5YYZWJNeib8ynC7lyNG7qL1HT0R5/BwcguVGSPLV56PTBT5QJTYrhg
L2+XgPCob+idCrHDNAAwrR40bACrzzYLbzl2I7nJIfvCrnMkzP7nPEimu29rgQQd
L17GD3bL/N16LRXha83xN4jD3Rgv7If23t3Qru4nrhVELS9PF/IBGEIWDOnuirY=
=kOba
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.