[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DDD and STL
From: |
Cal Erickson |
Subject: |
Re: DDD and STL |
Date: |
Wed, 22 Oct 2003 11:28:02 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2 |
All,
Back in 12/30/02.. there was a message about looking at vectors compiled
with G++. Here is a paraphrase from that message:
"I had trouble looking at the contents of C++ STL vectors with DDD
inside my subroutines. (Vectors inside main worked fine.) When
printing the element (say) v[0],
(gdb) p v[0]
I got the error message
cannot subscript something of type `vector<double,allocator<double> >'
I dumped the error message into Google, and I found the answer at
address@hidden: compiling with the -ggdb flag in place of plain -g did
the trick.
g++ -ggdb -o foo foo.cpp
Voila. Now printing v[0] shows the value of the vector element just as
if it were a C array."
I am far from a C++ expert but I thought I would offer this up as a
possible answer.
Cal Erickson
Andrew Gaylard wrote:
Ron Levine <address@hidden> wrote:
I am using:
DDD 3.3 (alphaev5-dec-osf4.0d)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (C) 1999-2001 Universität Passau, Germany.
It appears to not be able to work with STL? Is that true?
If so, what can I do so that I can use a graphical debugger?
Rick Sivernell wrote:
I have used ddd with stl, but I have not been able to see the data
within.
I personally like to see this fixed, the same with other libraries,
see the
object, not the data inside.
People,
This is on my list of features that I'd like to see too.
However, there is one big problem: I have not seen any
command-line debuggers which can display, say a vector
of strings.
This is apparently in the pipeline for gdb; until then
though, you're out of luck (unless you work on it yourselves).
Sorry,
Andrew
_______________________________________________
Ddd mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/ddd
--
===========================================================================
Cal Erickson MontaVista Software Inc.
Linux Consultant 1237 E. Arques Ave.
Phone (408) 328-0304 Sunnyvale CA 94085
Fax (408) 328-9204 web http://www.mvista.com
===========================================================================