From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84477 invoked by alias); 30 Apr 2015 16:24:34 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 84460 invoked by uid 89); 30 Apr 2015 16:24:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout27.012.net.il Received: from mtaout27.012.net.il (HELO mtaout27.012.net.il) (80.179.55.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Apr 2015 16:24:32 +0000 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NNM00000NV0G700@mtaout27.012.net.il> for gdb@sourceware.org; Thu, 30 Apr 2015 19:19:36 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNM00MPKO0OE030@mtaout27.012.net.il>; Thu, 30 Apr 2015 19:19:36 +0300 (IDT) Date: Thu, 30 Apr 2015 16:24:00 -0000 From: Eli Zaretskii Subject: Re: gdb and newer versions of compilers In-reply-to: <55425191.7040103@lanl.gov> To: David Shrader Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83pp6lshxe.fsf@gnu.org> References: <55425191.7040103@lanl.gov> X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00056.txt.bz2 > Date: Thu, 30 Apr 2015 10:00:17 -0600 > From: David Shrader > > I have a user that is claiming gdb 7.2 does not work with C++ code > compiled with GCC 4.8.2. Gdb is provided by the system (RHEL 6) while > the compiler is one that I have provided. I'm still working with the > user on possible errors in their workflow with gdb, but I wanted to > investigate the limits of gdb's ability to keep working with binaries > compiled by newer compilers because I really don't know. What kind of > changes in a compiler would cause a particular version of gdb to no > longer work correctly with it? For example, I know that a change in > library format would probably require a new version of gdb, but does a > change in C++ specs require the same treatment? C++ support in GDB becomes significantly better with each new release, and 7.2 is really old. So it's quite possible that GDB 7.2 will not be good enough for C++ debugging, certainly not as good as 7.9, the latest released version. > I know that running with the latest version of gdb is a good idea to get > passed bugs and to net new features, but I'm trying to gain some sort of > intuition as to when a new version of gdb is necessary rather than just > a good idea. It is, specifically for C++ debugging. Also, newer versions of GDB support newer versions of DWARF debug info, so your user could use the "-gdwarf-4 -g3" compiler options to get better debugging information available to GDB.