Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Murad Nayal <mn216@columbia.edu>
Cc: gdb@sources.redhat.com
Subject: Re: help: gdb and c++ strings
Date: Thu, 05 Dec 2002 20:15:00 -0000	[thread overview]
Message-ID: <20021206041612.GA2453@nevyn.them.org> (raw)
In-Reply-To: <3DF02150.AACFAEB7@columbia.edu>

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<char,std::char_traits<char>,std::allocator<char>
> > &) @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.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-12-06  4:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-05 20:07 Murad Nayal
2002-12-05 20:15 ` Daniel Jacobowitz [this message]
2002-12-05 20:23   ` Murad Nayal
2002-12-05 20:45 Michael Elizabeth Chastain
2002-12-05 22:25 ` Murad Nayal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021206041612.GA2453@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=mn216@columbia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox