public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: GDB and compiler version.
@ 2003-09-26 21:56 Michael Elizabeth Chastain
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2003-09-26 21:56 UTC (permalink / raw)
  To: gdb, pdubuc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GDB and compiler version.
  2003-09-26 18:17 Paul Dubuc
@ 2003-09-26 18:40 ` Daniel Jacobowitz
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2003-09-26 18:40 UTC (permalink / raw)
  To: Paul Dubuc; +Cc: GDB Mailing List

On Fri, Sep 26, 2003 at 02:12:11PM -0400, Paul Dubuc wrote:
> We are using gdb with the GCC C++ compiler on Solaris.  Recently we 
> upgraded GCC
> from 2.95.3 to 3.3.1 and gdb from 5.0 to 5.3.  We also upgraded binutils 
> 2.11 to
> 2.14.
> 
> 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?  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?

It should not matter.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* GDB and compiler version.
@ 2003-09-26 18:17 Paul Dubuc
  2003-09-26 18:40 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Dubuc @ 2003-09-26 18:17 UTC (permalink / raw)
  To: GDB Mailing List

We are using gdb with the GCC C++ compiler on Solaris.  Recently we upgraded GCC
from 2.95.3 to 3.3.1 and gdb from 5.0 to 5.3.  We also upgraded binutils 2.11 to
2.14.

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?  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?

Thanks,

-- 
Paul M. Dubuc


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-26 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 21:56 GDB and compiler version Michael Elizabeth Chastain
  -- strict thread matches above, loose matches on Subject: below --
2003-09-26 18:17 Paul Dubuc
2003-09-26 18:40 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).