From: "Jacques-Olivier Goussard" <jgoussard@nuance.com>
To: <gdb@sourceware.cygnus.com>
Subject: RE: Helping GDB to find symbols
Date: Tue, 01 May 2001 06:05:00 -0000 [thread overview]
Message-ID: <NEBBKPBKLKFJPDFPMBDIEEALCCAA.jgoussard@nuance.com> (raw)
In-Reply-To: <Pine.SUN.3.91.1010501114517.29799A-100000@is>
> 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.
The symbol-file cmd may be what I need, but it's not complete: it uses the
symbols of the provided file insteed of the ones of the exec, so that you
should be able debug one lib for ex, but you lose the symbols of the rest...
I can live with that, but it would be nice to have a cmd that would just
load
as much symbol defs as possible from a set of files. For ex,
assume liba.so and libb.so contains the definitions of structures A and B.
In debug mode, gdb is able to understand
(gdb) p *(A*) <addressofaA>
(gdb) p *(B*) <addressofaB>
and display the content of address 'meaningfully'. In non debug mode, you
loose
this possibility. I just want to be able to point gdb to where it could find
the
definitions of symbol A and B, so that the 2 previous cmds will be
understood
even in non debug mode (at the best, GDB would also use them to display the
stack trace with the args to the functions disposed as in debug mode).
Does it make sense ?
Jacques-Olivier
next prev parent reply other threads:[~2001-05-01 6:05 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 [this message]
2001-05-01 11:23 ` Eli Zaretskii
2001-05-01 12:19 ` Daniel Berlin
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=NEBBKPBKLKFJPDFPMBDIEEALCCAA.jgoussard@nuance.com \
--to=jgoussard@nuance.com \
--cc=gdb@sourceware.cygnus.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