gdb pretty print not working on windows

General questions regarding the usage of CodeLite
cubancigar11
CodeLite Enthusiast
Posts: 11
Joined: Tue Mar 04, 2014 3:03 am
Genuine User: Yes
IDE Question: C++
Contact:

gdb pretty print not working on windows

Post 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?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb pretty print not working on windows

Post 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
Make sure you have read the HOW TO POST thread
cubancigar11
CodeLite Enthusiast
Posts: 11
Joined: Tue Mar 04, 2014 3:03 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb pretty print not working on windows

Post by cubancigar11 »

Yes. I do. I will raise a bug.
cubancigar11
CodeLite Enthusiast
Posts: 11
Joined: Tue Mar 04, 2014 3:03 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb pretty print not working on windows

Post 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.
Post Reply