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 [gcc.gnu.org].
So I posted my problem here [stackoverflow.com], 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 [programmingunlimited.net]) for exception handling. Could this be to blame?
↧