From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8055 invoked by alias); 6 Dec 2002 04:07:46 -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 8044 invoked from network); 6 Dec 2002 04:07:44 -0000 Received: from unknown (HELO godel.bioc.columbia.edu) (156.111.6.57) by sources.redhat.com with SMTP; 6 Dec 2002 04:07:44 -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 XAA27791; Thu, 5 Dec 2002 23:02:24 -0500 (EST) Message-ID: <3DF02150.AACFAEB7@columbia.edu> Date: Thu, 05 Dec 2002 20:07:00 -0000 From: Murad Nayal X-Accept-Language: en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: help: gdb and c++ strings Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00111.txt.bz2 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? thanks Murad Nayal