Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Dmitry Samersoff <dms@samersoff.net>
To: Pierre Ossman <ossman@cendio.se>, gdb@sourceware.org
Subject: Re: Decoding stack in core file without correct libs?
Date: Thu, 13 Jul 2017 09:55:00 -0000	[thread overview]
Message-ID: <11c23f4e-f3f7-c74d-6c89-8851d2c62bbe@samersoff.net> (raw)
In-Reply-To: <197a6eed-6163-67ed-67b7-57c4298d851b@cendio.se>


[-- Attachment #1.1: Type: text/plain, Size: 1336 bytes --]

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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2017-07-13  9:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13  9:25 Pierre Ossman
2017-07-13  9:55 ` Dmitry Samersoff [this message]
2017-07-13 10:21   ` Pierre Ossman
2017-07-13 15:22 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11c23f4e-f3f7-c74d-6c89-8851d2c62bbe@samersoff.net \
    --to=dms@samersoff.net \
    --cc=gdb@sourceware.org \
    --cc=ossman@cendio.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox