Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75514

Creator debugger nearly unusable due to debug optimizations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.5, 5.13.1
    • 5.13.0 Beta3
    • Build System
    • None
    • Linux/X11
    • d212c179db318a20d74592b02dd57b9bb1b668ce (qt/qtbase/5.12)

    Description

      Tested using "uic" project from qtbase. Issues:

      1. Cannot set the breakpoint in a pointed line.

      To reproduce:

      Set some breakpoints in cppwriteinitialization.cpp file:
      A) line 1137: const bool isTopLevel = m_widgetChain.count() == 1;
      B) line 1393: propertyValue = autoTrCall(p->elementString());

      After running the debugger, breakpoints are moved:
      A to 1140 line: DomPropertyMap properties = propertyMap(lst);
      B to 1394 line: break;

      "A" jumps inside the if condition, so after running the debugger it doesn't stop there at all.

      2. When stepping over manually sometimes debugger steps into some method invocation.

      3. The call stack sometimes looks wrong and works wrong. It shows the right function name, but points to the wrong file. Double click jumps to the wrong file, too.

      4. In some cases I can't step into the function, it steps over.

      It looks like when I remove the -Og option from mkspecs/common/gcc-base.conf, all the above issues are gone. This was introduced in: https://codereview.qt-project.org/#/c/177019/

      Screenshots:
      debugger1 - all methods are in the same file, but debugger shows the wrong file for 2nd and 3rd file.
      debugger2 - after double click on the selected method inside call stack, it jumps to the wrong file in editor
      debugger3 - after running the debugger, the breakpoint is moved from 1393 to 1394 line, what doesn't make sense.

      Attachments

        1. debugger1.png
          debugger1.png
          16 kB
        2. debugger2.png
          debugger2.png
          147 kB
        3. debugger3.png
          debugger3.png
          32 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes