News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Watching std::string in debugger causes segfault?!?

Started by ascholer, February 27, 2013, 05:04:54 AM

Previous topic - Next topic

ollydbg

Quote from: elimcodmartinez on February 06, 2014, 10:10:01 AM
I'm afraid it still (nearly) happens for long strings. Seen in 13.12 for Windows using Cygwin 32bits debugger.
Sometimes it regains control but may stay unresponsive for several seconds.
Hi, elimcodmartinez and others, I finally found that the segment issue was caused by a gdb bug, see details in this link: FYI: GDB has a big bug to support MinGW GCC (4.7.x and later)

I'm using MinGW gdb, not sure how cygwin gdb works on this issue.
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.