Author Topic: Debugging a vector: How to look inside?  (Read 6764 times)

dr snuggles

  • Guest
Debugging a vector: How to look inside?
« on: April 27, 2007, 11:50:09 am »
I would like to see the content of a vector while debugging. Does anyone know how I can do this?

Preferable an unfolding button in front of the vector in the watch list. At the moment you can only see the address of the vector start, finish and last element. I use the build of 15 April 2007 with GDB 6.3 :).

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: Debugging a vector: How to look inside?
« Reply #1 on: April 30, 2007, 01:38:26 am »
Hello,

I'm not sure about having understood what's your question, because i can see all values within an array with the debugger watches, as you can see in this weird example:



Using Code::Blocks svn build rev 3888 (25/04/2007) and MinGW (gcc 3.4.5, gdb 5.2.1) under Windows XP SP2. I've not done anything special, but using the configuration by default.

Regards.
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline Russell

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Debugging a vector: How to look inside?
« Reply #2 on: April 30, 2007, 01:40:31 am »
Maybe he meant an actual C++ vector.

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: Debugging a vector: How to look inside?
« Reply #3 on: April 30, 2007, 08:10:54 am »
Mmmm yes :) Must be. My level in C++ is really poor (still learning) ... and yes. I've not been able to debug (watch) the content of a C++ vector. Hope someone can answer dr snuggles.
Those who were seen dancing were thought to be insane by those who could not hear the music

dr snuggles

  • Guest
Re: Debugging a vector: How to look inside?
« Reply #4 on: May 04, 2007, 01:37:28 pm »
Debugging a vector just like an array would be great :)

Offline rhf

  • Multiple posting newcomer
  • *
  • Posts: 123
Re: Debugging a vector: How to look inside?
« Reply #5 on: May 06, 2007, 02:35:06 pm »
I would also like that very much.

In the archives I note that about a year ago there was a lot of activity in this area. One message in particular was specifically addressing the debug handling of arrays and stl vectors. Is there any work going in this area?

Bob