From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12411 invoked by alias); 6 Dec 2002 04:23:59 -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 12402 invoked from network); 6 Dec 2002 04:23:57 -0000 Received: from unknown (HELO godel.bioc.columbia.edu) (156.111.6.57) by sources.redhat.com with SMTP; 6 Dec 2002 04:23:57 -0000 Received: from columbia.edu (localhost [127.0.0.1]) by godel.bioc.columbia.edu (SGI-8.9.3/8.9.3) with ESMTP id XAA27843; Thu, 5 Dec 2002 23:18:34 -0500 (EST) Message-ID: <3DF0251A.4EBC7708@columbia.edu> Date: Thu, 05 Dec 2002 20:23:00 -0000 From: Murad Nayal X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb@sources.redhat.com Subject: Re: help: gdb and c++ strings References: <3DF02150.AACFAEB7@columbia.edu> <20021206041612.GA2453@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00113.txt.bz2 many thanks. this will really help. is there a packaged snapshot available somewhere or do I need to get the sources from cvs? best Daniel Jacobowitz wrote: > > On Thu, Dec 05, 2002 at 11:02:24PM -0500, Murad Nayal wrote: > > > > > > Hello, > > > > I am wondering if anyone here can help me with this. I am porting code > > to linux and trying to use gdb to do the debugging. unfortunately this > > is complicated by the fact that gdb does not print c++ string variables. > > > > p s > > $1 = ( > > const basic_string,std::allocator > > > &) @0xbffff3d0: {static npos = Cannot access memory at address 0x8f4b974 > > > > I have come upon an older post to bug-gdb list that mentions this > > problem > > http://sources.redhat.com/ml/bug-gdb/2000-09/msg00012.html > > > > in response Daniel Berlin suggested that this problem might be related > > to the stabs format and that using dwarf-2 format (i.e. g++ -gdwarf-2) > > would solve it. however it was mentioned back then that for large > > programs this problem persists even when compiling with the -gdwarf-2 > > flag. this is where I am at right now. I have recompiled gdb from > > sources (5.2.1) and recompiled most of the libraries I am using > > (including the objects I am trying to debug) using the -gdwarf-2 flag. I > > am on a pentium 3 platform using g++ 3.2.1, also compiled from sources. > > I am not sure what to try next. can you help? > > You need to get a newer snapshot of GDB. This bug was fixed only a > couple of weeks ago, IIRC. >