Pierre Sarrazin <[EMAIL PROTECTED]> writes:
> > [EMAIL PROTECTED] (Pierre Sarrazin) writes:
> > > On my Pentium-based RedHat 6.2 machine, gdb 5.0 cannot print
> > > the contents of a C++ string variable. It displays this:
>
> Dixit Daniel Berlin <[EMAIL PROTECTED]> (2000-09-07 12:14):
> > This is unreproducable.
> > I print strings fine all day.
> >
> > Try -gdwarf-2, see if it helps.
>
> It helps:
>
> (gdb) p s
> $2 = {static npos = 4294967295, static nilRep = {len = 0, res = 0, ref = 1,
> selfish = false}, dat = 0x804c498 "a"}
>
> Thanks for your help.
>
> I suppose that this was a bug with the "stabs" debugging
> format that is used by default by g++.
Yup.
STABS is actually only the default on a few platforms now, most use
DWARF2, which is a good thing.
--Dan