bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c++ strings with gdb??


From: Michael Elizabeth Chastain
Subject: Re: c++ strings with gdb??
Date: Sun, 26 May 2002 18:40:56 -0500

Hi Eric,

> I have tried the examine the memory. I got '<' when using "x/c
> 0x24340" but got "<A HREF=\"http:/" when using "x/s 0x24340".

Okay.  Now try "x/c 0x24341", "x/c 0x24342", and so on.
Or you can just hit the carriage return after the first one.

> I tried to use "cout" and "cerr" to print the content(s) of "substring"
> and I got expected '<'.

That's dicey, it doesn't work for me even with gdb 5.2.
Maybe someday it will.  :-/

> I suspect the string does not end with null char. So, gdb overshots
> when it tries to print out the contents of the string.

That's likely.  You'll have to look at the header file for the string
class and figure out the data representation.

Michael C



reply via email to

[Prev in Thread] Current Thread [Next in Thread]