Page 1 of 1

Using GDB pretty printer

Posted: Wed Oct 16, 2013 4:48 pm
by jfouche
Hello Eran,

I'd like to try GDB pretty printers on CL 5.2 Win XP.

I checked "Enable GDB pretty printing", and added python 2.7 to the path.
I created a very simple test :

Code: Select all

#include <iostream>
#include <list>
#include <cstdlib>

int main(int argc, char **argv)
{
	std::list<int> myList;
	myList.push_back(7);
	myList.push_back(3);
	myList.push_back(1);
	
	std::cout << "DONE";
	
	return EXIT_SUCCESS;
}
I added a breakpoint on the cout line. I'm trying to see the "myList" variable as defined in libstdxxx/v6/printers.py, but don't know how to enable this kind of watch...

EDIT : If I missed something, it could be cool to update http://codelite.org/LiteEditor/Debugging to add this information (a new pretty printing ยง for example).

Re: Using GDB pretty printer

Posted: Wed Oct 16, 2013 4:55 pm
by eranif
Hi,

If you are using the default gdb that comes with codelite , you can't do that.
You need a custom gdb with python enabled.
This is the one I am using ( a version of it at least ):
https://sourceforge.net/projects/gdbmin ... p/download

Courtesy of ollygdb from codeblocks forum:
http://forums.codeblocks.org/index.php/ ... 301.0.html

Eran

Re: Using GDB pretty printer

Posted: Wed Oct 16, 2013 5:24 pm
by jfouche
Thanks for your answer, and ofc OllyDbg for its release.
It rocks :)