Page 1 of 1

gdb pretty print not working on windows

Posted: Wed Mar 05, 2014 12:05 pm
by cubancigar11
Hi!

This is my current setup:
version: 5.4
OS: Windows 7 (32 bit)
compiler: 4.8.1 MinGW
gdb: C:\gdb2013-10-09\bin\gdb.exe (Downloaded from wiki link)
Python: 2.7.6 (C:\Python27)
Debug output pane: http://pastebin.com/R13pjT4j

I have checked 'Enable GDB Pretty Printing' and 'Enable full debugger logging'. The python code is present in Startup Commands. I have also updated the shipped gdb_printers script to the latest. Still I am unable to view the gdb pretty print. What to do?

Re: gdb pretty print not working on windows

Posted: Wed Mar 05, 2014 3:27 pm
by eranif
Do you have the python scripts under %APPDATA%\CodeLite\gdb_printers ?
If not, copy them manually from CODELITE_INSTALL_PATH\gdb_printers

If it helps you, please also submit a bug

Thanks,
Eran

Re: gdb pretty print not working on windows

Posted: Wed Mar 05, 2014 5:16 pm
by cubancigar11
Yes. I do. I will raise a bug.

Re: gdb pretty print not working on windows

Posted: Tue Apr 08, 2014 2:07 am
by cubancigar11
Okay, I got it working.

It appears there is some sort of escape problem in the codelite appdata/roaming folder. This is not specific to OS (I tested on Windows 7 and Windows 8) or username (I tested two different user names: one starting with A and the other starting with B).

The original string was (Win 8, username starting with b):

Code: Select all

 'C:\Users\brahm\AppData\Roaming\CodeLite\gdb_printers'
But somehow it gets converted to this:

Code: Select all

 'C:\\Users\x08rahm\\AppData\\Roaming\\CodeLite\\gdb_printers'
So I changed the script to use double quotes and explicitly escaped back-slashes:

Code: Select all

 "C:\\Users\\brahm\\AppData\\Roaming\\CodeLite\\gdb_printers"
And now it works.