From: Daniel Berlin <dan@www.cgsoftware.com>
To: Jacques-Olivier Goussard <jgoussard@nuance.com>
Cc: <gdb@sourceware.cygnus.com>
Subject: RE: Helping GDB to find symbols
Date: Tue, 01 May 2001 12:19:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0105011517080.26757-100000@www.cgsoftware.com> (raw)
In-Reply-To: <NEBBKPBKLKFJPDFPMBDIEEALCCAA.jgoussard@nuance.com>
On Tue, 1 May 2001, Jacques-Olivier Goussard wrote:
>
>
> > From: Eli Zaretskii [ mailto:eliz@is.elta.co.il ]
> > On Mon, 30 Apr 2001, Jacques-Olivier Goussard wrote:
> >
> > > > Doesn't it work to say "gdb yourprog core", where `yourprog' is the
> > > > unstripped binary and `core' is the core file you get from your
> > > > customers?
> > > No. I guess it gets mixed up in the addresses and offsets. The
> > stacktrace
> > > for example is quite different when I switched to the non-debug to
> > > debug binaries (exec and dynamic libraries).
> >
> > Hmm? I don't understand how is this possible: all the addresses in a
> > stripped program should be exactly like in an unstripped one.
> > Otherwise, you won't be able to debug the core dump which originated
> > from an unstripped program.
> >
> > Am I missing something?
> >
> > What is your object file format and debug info format, btw?
>
> I do not think the addresses are the same in stripped and unstripped: just
> run
> nm on the same library for debug and non-debug build and you'll see the
> symbols are not at the same address.
This is incorrect.
In fact, it's a law in gcc that using -g shouldn't change the code
generation. They won't accept patches that violate this.
So the symbol addresses are the same.
If they aren't for you, you must be compiling the non-debug build with
optimization, and the debug build without optimization, or something of
the sort.
gdb ./debug-file core should work fine, even if the core is generated
from the non-debug versio.
I do it all the tie.
--Dan
next prev parent reply other threads:[~2001-05-01 12:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-30 9:16 Jacques-Olivier Goussard
2001-04-30 9:24 ` Eli Zaretskii
2001-04-30 9:32 ` Jacques-Olivier Goussard
2001-05-01 1:44 ` Eli Zaretskii
2001-05-01 6:05 ` Jacques-Olivier Goussard
2001-05-01 11:23 ` Eli Zaretskii
2001-05-01 12:19 ` Daniel Berlin [this message]
2001-05-01 9:54 ` Daniel Berlin
2001-04-30 9:39 ` Andrew Cagney
2001-05-01 1:44 ` Eli Zaretskii
2001-05-01 9:41 ` Andrew Cagney
2001-05-01 6:20 Nicolas.Thery
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=Pine.LNX.4.33.0105011517080.26757-100000@www.cgsoftware.com \
--to=dan@www.cgsoftware.com \
--cc=gdb@sourceware.cygnus.com \
--cc=jgoussard@nuance.com \
/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