Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Creator with GCC 4.8.0 -- debugger problems
Forum Updated to NodeBB v4.3 + New Features

Qt Creator with GCC 4.8.0 -- debugger problems

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 4 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtTony
    wrote on last edited by
    #1

    I downloaded and installed Qt 5.0.1 for MinGW 4.7.2, on Windows 7. But there is a known bug in GCC 4.7.2 that causes an invalid this pointer to be passed to a virtual function under some circumstances that involve virtual and non-virtual inheritance in the same class. The details are on "this Bugzilla page":http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55171.

    So I "posted my problem here":http://stackoverflow.com/questions/15597506/gcc-4-7-2-virtual-function-bug/15722969, and decided on the basis of the replies to try compiling Qt 5.0.2 and Qt Creator 2.7.0 from source, using MinGW with the latest GCC 4.8.0.

    This may have been a reckless decision, but it succeeded up to a point. I can compile and run my large-ish project, with no known problems. But the debugger is not quite there yet. I can set breakpoints, and gdb will stop at the breakpoints and display the source. I can step through the source code. But there are several problems:

    1. The call stack is not being displayed.
    2. Assembly-language mode doesn't work. The source window remains on display, and single-stepping apears to do nothing.
    3. I can add an expression evaluator for a local variable, but it seems to go out of scope as soon as I single-step.
    4. The CPU registers are not displayed.

    Was this a sensible thing to try? Or is using Qt 5.0.2 with GCC 4.8.0 doomed to failure? After a bit of digging, I discovered two changes to GCC 4.8.0 that might have a bearing on the problem:

    1. It uses the latest DWARF Version 4 debugging format. So I tried re-compiling my whole project with the -gdwarf-2 parameter, but it didn't help.
    2. It uses, not sjlj, not dw2, but SEH (see "Structured Exception Handling":http://www.programmingunlimited.net/siteexec/content.cgi?page=mingw-seh) for exception handling. Could this be to blame?
    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Have you "filed a bug report":https://bugreports.qt-project.org/ about this issue?

      Creator has so far not been tested with GCC 4.8.0 at all AFAIK. It is on my todo list once Archlinux updates the compiler:-)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jfilstrup
        wrote on last edited by
        #3

        Try adding these flags to your project:

        -g together with -gdwarf-2

        This may fix your issue. My guess is that gcc 4.8 is outputting
        dwarf 4 when you probably have an older gdb which can read
        dwarf 2.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DimanNe
          wrote on last edited by
          #4

          bq. once Archlinux updates the compiler

          Problem is that Kubuntu already updated gcc to 4.8 for a long time ago...

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            Dimantle: So has arch... my post was from 2nd April after all. It works fine for me.

            Ubuntu does currently have a bit of trouble with gdb though: Ubuntu updated the python built into gdb to 3.x, which is -- from what I read -- not fully supported by GDB yet and does also break the pretty printers Qt Creator ships. Qt Creator 3.0 should have the pretty printers fixed though.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DimanNe
              wrote on last edited by
              #6

              bq. Qt Creator 3.0 should have the pretty printers fixed though.

              Yes, you are right, I installed QtCreator 3.0 beta today, and all debugging stuff start working

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved