From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10562 invoked by alias); 26 Sep 2003 21:54:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10553 invoked from network); 26 Sep 2003 21:54:50 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 26 Sep 2003 21:54:50 -0000 Received: from duracef.shout.net (duracef.shout.net [204.253.184.12]) by concert.shout.net (8.12.10/8.12.10) with ESMTP id h8QLsO0U021914; Fri, 26 Sep 2003 16:54:24 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.10/8.12.9) with ESMTP id h8QLsOVd025438; Fri, 26 Sep 2003 16:54:24 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.10/8.12.9/Submit) id h8QLsOKv025437; Fri, 26 Sep 2003 17:54:24 -0400 Date: Fri, 26 Sep 2003 21:56:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200309262154.h8QLsOKv025437@duracef.shout.net> To: gdb@sources.redhat.com, pdubuc@cas.org Subject: Re: GDB and compiler version. X-SW-Source: 2003-09/txt/msg00333.txt.bz2 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