From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32757 invoked by alias); 4 Apr 2005 13:39:14 -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 32374 invoked from network); 4 Apr 2005 13:39:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 4 Apr 2005 13:39:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DIRnD-0008Uy-KE; Mon, 04 Apr 2005 09:39:03 -0400 Date: Mon, 04 Apr 2005 13:39:00 -0000 From: Daniel Jacobowitz To: Stuart Brooks Cc: gdb@sources.redhat.com Subject: Re: gdb 5.3nb1 crashing when accessing elements in static libs Message-ID: <20050404133903.GB32163@nevyn.them.org> Mail-Followup-To: Stuart Brooks , gdb@sources.redhat.com References: <0f4601c538fc$30c35970$5e22a8c0@STU95> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0f4601c538fc$30c35970$5e22a8c0@STU95> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00031.txt.bz2 On Mon, Apr 04, 2005 at 11:53:39AM +0200, Stuart Brooks wrote: > Hi, > > I'm new to this list, so if this is not the right place to be posting > please let me know.... > > I am experiencing problems when interrogating a core file - as soon as I > try to access a global variable in a statically linked library or view > the internals of a class/struct declared in a static lib gdb either says > , gives garbage or segmentation faults. Details of my > system are: > > OS: Netbsd 2.0 > gdb: 5.3nb1 > compiler: g++ 3.3 > > Using the same code, gdb works fine on [Netbsd 1.5.1,gdb 4.17,g++ > 2.91.66] and [Netbsd 1.6.2,gdb 5.0nb1,g++ 2.95.3] so it looks to me like > a conflict between g++ and gdb. The libs are being compiled with -g and > without optimizations. I'm really not too sure what to do from here. Any > ideas/help would be much appreciated ... You should try a more recent version of GDB. The latest release is 6.3, and the CVS has an additional almost-year of development. > Also when trying to print out the value of a global pointer I get this: > > (gdb) p server > $5 = 134692864 Probably server has no debug information in your object. -- Daniel Jacobowitz CodeSourcery, LLC