Page 1 of 1

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

Posted: Tue Dec 10, 2013 8:53 am
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!!!

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

Posted: Sat Dec 21, 2013 4:16 am
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).


-- p

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

Posted: Sat Dec 21, 2013 9:19 am
by eranif

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