gdb has a bug when select "Enable GDB Pretty Printing"

General questions regarding the usage of CodeLite
yuquan23459
CodeLite Curious
Posts: 1
Joined: Tue Dec 10, 2013 8:32 am
Genuine User: Yes
IDE Question: c++
Contact:

gdb has a bug when select "Enable GDB Pretty Printing"

Post by yuquan23459 »

Hi, I use CodeLite 5.3 + wxCrafter 1.3 in ubuntu12.04.3,and I install its through apt-add-repository, but I find a bug in debug.
In details is: I have select "Enable GDB Pretty Pringting",if my code is single a basic stl Container, such as
vector<int> vec;
it is right and i can look the values in stl.
But if my code has not one stl container, such as
typedef struct _NodeResult {
string name;
map<string, string> attrs;
} NodeResult;
vector<NodeResult> nodes;
I can not look at the attrs when I debuging.but I debug it with gdb in terminal is normally, I do not know whether is a bug or i debuging in a wrong way? This also
appearance in codelite5.2.Waiting for response, thank you!


Oh,now I am find a way to debug Multiple contain filters,that is in debuging sense through enter "p nodes" in output panel and then click "send",result appears.

And i find if i put the mouse on "nodes", it is not appear, so i think it is a bug, hope resove it in next version,thank you!!!
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

Re: gdb has a bug when select "Enable GDB Pretty Printing"

Post by petah »

I have the same problem which seems to be a bug in GDB when a variable to inspect is not directly at the top-level. Btw I too see the correct dump when debugging from GDB's command line, so maybe there is a workaround.

Some more info that'd be useful:
- what g++ version is your code built with?
- what gdb/gdbserver versions are installed?
- what gdb debug format is used? (gstabs, ggdb, etc.)
- what does gdb output if you query it with

Code: Select all

info pretty-printer 
?
- can you inspect your variable with a CL watch that specifies the complete path to it?

Eran: does CL have its own gdb prefs, i.e. distinct from what gdb outputs with

Code: Select all

info set
from the console window? If so, would diffing the two preference sets give some clues? (I know they're gigantic).

cheers,

-- p
main: Debian Jessie x64 + custom wxTrunk
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: gdb has a bug when select "Enable GDB Pretty Printing"

Post by eranif »

Hi,

The main diff is that CL is using GDB/MI and not GDB/CLI
I think its a bug in GDB - I will look further into it

Eran
Make sure you have read the HOW TO POST thread
Post Reply