Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] qDebug output problem when using gdb under windows 7
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 2 Posters 2.7k 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #1

    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?

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      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.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          [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.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            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.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                [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.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  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

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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