Inside STL queues, etc...
-
- CodeLite Curious
- Posts: 2
- Joined: Thu Nov 06, 2008 11:01 pm
- Contact:
Inside STL queues, etc...
How can I look inside a queue/vector/etc. inside the debugger? Is it not possible to look in local variables and see what objects (and relevant data) are inside a container?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Inside STL queues, etc...
Well, this is actually a gdb limitation and nothing I can do about it. If you find a way to do this on command line, let me know
and I will incorporate it into CodeLite
Eran
and I will incorporate it into CodeLite
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 69
- Joined: Fri Oct 24, 2008 10:29 pm
- Contact:
Re: Inside STL queues, etc...
This might help:
http://www.stanford.edu/~afn/gdb_stl_utils/
(Just found it via Google. I haven't tried it.)
http://www.stanford.edu/~afn/gdb_stl_utils/
(Just found it via Google. I haven't tried it.)
-
- CodeLite Veteran
- Posts: 69
- Joined: Fri Oct 24, 2008 10:29 pm
- Contact:
Re: Inside STL queues, etc...
This looks like a more recent attempt:
http://www.yolinux.com/TUTORIALS/src/db ... s-1.03.txt
Works with g++ 4.3.
Example of use here:
http://www.yolinux.com/TUTORIALS/GDB-Commands.html
Scroll down to "De-Referencing STL Containers".
http://www.yolinux.com/TUTORIALS/src/db ... s-1.03.txt
Works with g++ 4.3.
Example of use here:
http://www.yolinux.com/TUTORIALS/GDB-Commands.html
Scroll down to "De-Referencing STL Containers".
-
- CodeLite Curious
- Posts: 2
- Joined: Thu Nov 06, 2008 11:01 pm
- Contact:
Re: Inside STL queues, etc...
Thanks for the responses, eranif, sdolim. That looks good! Is it possible to use it in CodeLite?sdolim wrote:This looks like a more recent attempt:
http://www.yolinux.com/TUTORIALS/src/db ... s-1.03.txt
Works with g++ 4.3.
Example of use here:
http://www.yolinux.com/TUTORIALS/GDB-Commands.html
Scroll down to "De-Referencing STL Containers".
I also have another question: auto-complete (in a class, for example) only seems to work for variables in the local scope. If I have a variable as part of a class (which should be global within the class) and try to access it in a method, auto-complete doesn't seem to work?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Inside STL queues, etc...
Well, it does, for me at least.namnori wrote:I also have another question: auto-complete (in a class, for example) only seems to work for variables in the local scope. If I have a variable as part of a class (which should be global within the class) and try to access it in a method, auto-complete doesn't seem to work?
Can you provide an example for such case (matbe you find a rare case where it does not) ?
Have u tried:
- Saving your file
- retagging the project
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 69
- Joined: Fri Oct 24, 2008 10:29 pm
- Contact:
Re: Inside STL queues, etc...
Right now I think you would have to use it manually. Source the script in your .gdbinit file, and use the gdb console in the Output pane to enter the commands yourself. Eran can correct me if I'm wrong.namnori wrote:That looks good! Is it possible to use it in CodeLite?