[Solved] qDebug output problem when using gdb under windows 7



  • Since yesterday I am facing an issue with qDebug output when debugging with GDB. The output contains lot of "funny" characters such as in a binary output. However, it apparently is only the output of some of my modules. The output of other modules looks still fine.
    When starting with ctrl+R the same debug exe without recompilation, the output is still normal as it should be.

    This is on windows 7 64 bit with MinGW 4.8 Qt 5.1.0

    I am using this Qt installation already for some time, but noticed that problem only yesterday.

    Several "standard" reboots of windows and also several rebuilds of the whole application including all libs did not cure the problem.

    Anyone an idea why this problem occurs?



  • Was my fault for sure.
    This application has its own Qt message handler implementation based "on this description":http://qt-project.org/doc/qt-4.8/qtglobal.html#qInstallMsgHandler which uses "const char *" for the message.
    The migration to Qt 5.1.0 required an update since the syntax changed to a different parameter list based on QString. The conversion from "QString" to "const char *" I have used triggered the issue.


  • Lifetime Qt Champion

    Hi,

    Shouldn't this trigger at least a compiler warning ? I even wonder if it should do more...



  • [quote author="SGaist" date="1378152663"]Hi,

    Shouldn't this trigger at least a compiler warning ? I even wonder if it should do more...[/quote]

    Could well be. The migration to Qt 5.1.0 respectively the change of compiler version brought me a large number of warnings, which I still have to fight :-(

    I am actually using the application and all is fine. Only in the debugger suddenly the problems are popping up. This threw me off a bit.



  • Just checked it out.
    @
    const char * msg0 = msg.toStdString ().c_str();
    @
    No compiler warning on this one, but causing the problem with GDB. The compiler settings should be the standard ones AFAIK.


  • Lifetime Qt Champion

    Is it me or is the gdb integration suffering a bit with Qt 5 ? IIRC there have been several thread's related to gdb problems



  • [quote author="SGaist" date="1378238911"]Is it me or is the gdb integration suffering a bit with Qt 5 ? IIRC there have been several thread's related to gdb problems[/quote]

    This is always hard to tell. Newbies entering the forum and as soon as they have the libs under control they are not visible until the next issue pops up again. There is only a handful of people being continuously in the forum for 2-3 years. The most active contributors seem to have left the forum with the introduction of Qt 5.

    The other question really is, what is causing the problems ultimately. With Qt5.1 a new MinGW compiler version have been introduced. I do not know about GDB and its version.


  • Lifetime Qt Champion

    Qt 5's too much fun to allow time on the forum ;)

    I wonder if there is a something like a protocol that could be used to test/validate an installation using gdb


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.