From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13987 invoked by alias); 27 Apr 2009 06:03:45 -0000 Received: (qmail 13946 invoked by uid 22791); 27 Apr 2009 06:03:38 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Apr 2009 06:03:34 +0000 Received: from spaceape11.eur.corp.google.com (spaceape11.eur.corp.google.com [172.28.16.145]) by smtp-out.google.com with ESMTP id n3R63VYs000414 for ; Sun, 26 Apr 2009 23:03:31 -0700 Received: from qw-out-1920.google.com (qwj9.prod.google.com [10.241.195.73]) by spaceape11.eur.corp.google.com with ESMTP id n3R63TOZ018871 for ; Sun, 26 Apr 2009 23:03:29 -0700 Received: by qw-out-1920.google.com with SMTP id 9so1889744qwj.50 for ; Sun, 26 Apr 2009 23:03:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.80.21 with SMTP id r21mr2111030qck.80.1240812209198; Sun, 26 Apr 2009 23:03:29 -0700 (PDT) In-Reply-To: <49F53FD6.5040209@redpinesignals.com> References: <49F53FD6.5040209@redpinesignals.com> Date: Mon, 27 Apr 2009 06:30:00 -0000 Message-ID: <8ac60eac0904262303q4f5b430ak5a14ba34f3dedd7f@mail.gmail.com> Subject: Re: gcc - gdb compatibility issue From: Paul Pluzhnikov To: sumanth Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2009-04/txt/msg00199.txt.bz2 On Sun, Apr 26, 2009 at 10:17 PM, sumanth wrote: > I am using gcc-4.3.3 and gdb 5.3 version. That's a rather new GCC and rather old GDB. > I have problems in =A0debugging my =A0binaries (a.out) =A0concerned to lo= cal > variable's address location. What kind of problems? Did you compile with -O, -O2, or -O3? Debugging optimized code is always problematic: the compiler may not have assigned address for a local variable at all. > Is there any gcc-gdb compatibility issue here. If so how can I generate t= he > correct debugging information and use it. Start by compiling with '-g -O0'. If that doesn't work, try current GDB built from CVS Head. If that still doesn't work, show us your compile line, and output from 'gcc --version'. Cheers, --=20 Paul Pluzhnikov