From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7577 invoked by alias); 6 Aug 2010 18:31:03 -0000 Received: (qmail 7561 invoked by uid 22791); 6 Aug 2010 18:31:02 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-iw0-f169.google.com (HELO mail-iw0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Aug 2010 18:30:56 +0000 Received: by iwn10 with SMTP id 10so1863150iwn.0 for ; Fri, 06 Aug 2010 11:30:54 -0700 (PDT) Received: by 10.231.162.13 with SMTP id t13mr6316225ibx.160.1281119454517; Fri, 06 Aug 2010 11:30:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.184.12 with HTTP; Fri, 6 Aug 2010 11:30:34 -0700 (PDT) In-Reply-To: <4C5C524B.6040904@caviumnetworks.com> References: <4C5C4433.60302@gmail.com> <4C5C453D.4090704@caviumnetworks.com> <4C5C4B8A.7090303@gmail.com> <4C5C524B.6040904@caviumnetworks.com> From: Bruce Korb Date: Fri, 06 Aug 2010 18:31:00 -0000 Message-ID: Subject: Re: Bizarre GCC problem - how do I debug it? To: David Daney Cc: gcc@gcc.gnu.org, bug-gdb@gnu.org, insight@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2010-q3/txt/msg00021.txt.bz2 On Fri, Aug 6, 2010 at 11:19 AM, David Daney wr= ote: >> That seems to work. =A0There are one or two or three bugs then. >> Either gdb needs to recognize an out of sync object code > > It cannot do this as it was released before GCC-4.5. GDB and GCC communicate with each other with particular conventions. Conventions will change over time. GCC cannot really know which debugger is going to be used, so it just emits its code and debug information. GDB, on the other hand, needs to know what conventions were used when the binaries were produced. If it cannot tell, it is a GCC issue _and_ a GDB issue. If it can tell and chooses to indicate the problem by supplying bogus responses, then it is solely a GDB bug. Either way, we have a bug. >> And, of course, the insight stuff needs to incorporate the latest >> and greatest gdb. =A0(I don't use ddd because it is _completely_ non- >> intuitive.) > > My understanding is that whoever packages GCC and GDB for a particular > distribution is responsible to make sure that they work together. > > In your case it looks like that didn't happen. openSuSE seems to think that ddd is an adequate debugger. I do not. I use insight. There is no automatic update to insight and insight does not currently have a 7.x release of the underlying GDB. They are tightly bound. :( Anyway, I now know what the problem is and I am anxiously awaiting a new release of Insight -- and I recommend some protocol versioning fixes for GDB and, possibly, GCC too.