News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

[solved]debugger, printing huge struct hangs debugger

Started by visir, July 13, 2017, 11:34:02 AM

Previous topic - Next topic

visir

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.

visir

This link just tells me to update to the lastest gdb. Can't really update, this issue 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 this when you're bored. You guys are awesome.

visir

#2
Actually, adding it to watches helped.

Actually no, it still hangs.

oBFusCATed

With the current debugger plugin this problem cannot be solved. In the future it will probably work, but I don't know when.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

visir


ollydbg

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

visir