From: Michael Elizabeth Chastain <mec@shout.net>
To: gdb@sources.redhat.com, pdubuc@cas.org
Subject: Re: GDB and compiler version.
Date: Fri, 26 Sep 2003 21:56:00 -0000 [thread overview]
Message-ID: <200309262154.h8QLsOKv025437@duracef.shout.net> (raw)
Hi Paul,
> My question is Are there any compiler or binutils dependencies in gdb?
> Should gdb 5.3 compiled with g++ 3.3.1 work as well on code that is
> compiled with g++ 2.95.3?
Yes. gdb is an Ansi C89 program, so it behaves the same no matter
which compiler is used to build it. Occasionally there are problems
getting it to match somebody's system header files, but by and large,
if gdb compiles and links, it will run.
The only case I know is an issue with 32 versus 64 bitness
on Solaris and HP/UX. Vaguely, I recall that gdb needs to be built
with the same word size as the inferior programs that it is going
to debug. Can someone else say something specific about this?
On the other hand -- gdb's behavior is very sensitive to the compiler
that is used to build the *inferior* program. Different compilers,
and different versions of the same compiler, generate different debug
info in the executable program. So that's the compiler version
we really want to see in bug reports, and the compiler version that
you have to worry about.
> Or do I always need to use a gdb that is built with the same version of
> GCC that is used to build the programs it debugs?
Nope. gdb has a bunch of explicit C code to read all the debug info
in your program, et cetera. That C code works the same with a variety
of compilers.
Hope this helps,
Michael C
GDB QA Guy
next reply other threads:[~2003-09-26 21:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-26 21:56 Michael Elizabeth Chastain [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-09-26 18:17 Paul Dubuc
2003-09-26 18:40 ` Daniel Jacobowitz
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=200309262154.h8QLsOKv025437@duracef.shout.net \
--to=mec@shout.net \
--cc=gdb@sources.redhat.com \
--cc=pdubuc@cas.org \
/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