Author Topic: an annoying gcc bug which cause bad debugging experience is fixed in gcc trunk  (Read 5806 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
49951-4.5/4.6/4.7 Regression Debug stepping behavior regarding g++ Class destructor has changed for the worse starting at gcc 4.5.0

When debugging, it will always jump back to the variable declaration, this is so bad, and now it is fixed.

I hope some GCC suite will have this fix soon.
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I found that there are some GCC suite which already have GCC 11.  The msys2 project only have GCC 10.x version.

WinLibs - GCC+MinGW-w64 compiler for Windows
This did have GCC 11, but when I checked it, I found that its GDB don't have python support, so I can't run GDB pretty printer.

Finally, I find another one:
Guyutongxue/mingw-release: Guyutongxue personal builds of MinGW-w64
This has both GCC 11 and GDB with python support.  :)  I'm going to use this compiler suite to build wx 3.1.5 and code::blocks from source, because jumping back to the variable definition is so annoying when debugging C++.


EDIT: build wx 3.1.5 and C::B works OK with Guyutongxue/mingw-release: Guyutongxue personal builds of MinGW-w64 compiler suite.
« Last Edit: May 02, 2021, 12:46:47 pm by ollydbg »
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.