Code::Blocks Forums
User forums => Help => Topic started by: visir on July 13, 2017, 11:34:02 am
-
Looks like gdb expands all fields and subfields in any structure I'm printing. One of those is so big, it hangs debugger. Any gdb option to disable here?
It's more like a gdb question though.
-
This link (https://stackoverflow.com/questions/20933946/gdb-freezing-when-print-variables-with-tab-completion) just tells me to update to the lastest gdb. Can't really update, this issue (http://forums.codeblocks.org/index.php/topic,21974.msg149469.html#msg149469) probably wasn't solved yet. In short, downgraded to a very old version of gdb because codeblocks and recent gdb had problems with "two commands at once".
This can wait, don't hurry. Actually, watch t (https://www.youtube.com/watch?v=pDBA2_lyxJw)h (https://www.youtube.com/watch?v=P6dUCOS1bM0)i (https://www.youtube.com/watch?v=HU2ftCitvyQ)s (https://www.youtube.com/watch?v=FG6iF7fPzkU) when you're bored. You guys are awesome.
-
Actually, adding it to watches helped.
Actually no, it still hangs.
-
With the current debugger plugin this problem cannot be solved. In the future it will probably work, but I don't know when.
-
Well, I got what I paid for.
-
If I remember correctly, GDB has some option to "disable" expanding the sub-fields of a struct.
Another way of solving this problem is write a simple Pretty printer for the struct(in the pretty printer, you can print any thing you want), see GDB's document for more informations. Writing pretty printer is not hard.
-
set print elements 3
It was set to unlimited before. Now it works.
https://sourceware.org/gdb/current/onlinedocs/gdb/Print-Settings.html#Print-Settings