Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Topic]How to use WinDbg tool debug QT APP, or other debug tools
QtWS25 Last Chance

[Topic]How to use WinDbg tool debug QT APP, or other debug tools

Scheduled Pinned Locked Moved General and Desktop
13 Posts 5 Posters 10.9k Views
  • 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.
  • Y Offline
    Y Offline
    yeaiping
    wrote on 23 Mar 2011, 10:25 last edited by
    #1

    I have two question:

    1. QtCreator(MingW) don't generate "pdb" format file(but nmake can)
    2. How use WinDbg debug QT App(Not found symbol file)

    In fact, these two questions can be include one:
    How to debug qt app if app running on Windows OS(not care other platforms)

    Whether QT or other third-party(open source) offer debug tools?

    A smile is my sharp weapon (:

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hakan
      wrote on 23 Mar 2011, 11:23 last edited by
      #2

      you can use gdb with mingw.
      http://www.gnu.org/software/gdb/

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on 23 Mar 2011, 11:40 last edited by
        #3
        • WinDBG can be used to debug apps that are created by MS tool chain
        • for MinGW toolchain you need gdb

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 23 Mar 2011, 13:44 last edited by
          #4

          We support the windows debugger (CDB) in Qt Creator as well as gdb.

          Which of these is used depends on which compiler you used to create the binaries with. As you already noted mingw does produce different debugging symbols form MSVC.

          So if you want to use the windows debugger, then use the microsoft compilers. Use gdb when you want to use the mingw compiler.

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            yeaiping
            wrote on 23 Mar 2011, 14:24 last edited by
            #5

            [quote author="hakan" date="1300879403"]you can use gdb with mingw.
            http://www.gnu.org/software/gdb/
            [/quote]

            Thanks. If App running on Win, I prefer to windows debugger. cdb may do better than gdb on win os.

            A smile is my sharp weapon (:

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              yeaiping
              wrote on 23 Mar 2011, 14:31 last edited by
              #6

              [quote author="Tobias Hunger" date="1300887887"]We support the windows debugger (CDB) in Qt Creator as well as gdb.

              Which of these is used depends on which compiler you used to create the binaries with. As you already noted mingw does produce different debugging symbols form MSVC.

              So if you want to use the windows debugger, then use the microsoft compilers. Use gdb when you want to use the mingw compiler.[/quote]

              Yes. But the qt debugger worked very awful when I start debugging. Sometimes, the stack memory datas is wrong, and usually timeout and stop debugger.

              A smile is my sharp weapon (:

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on 23 Mar 2011, 14:33 last edited by
                #7

                If you want to use windows debugger on windows, you have to use windows tool chain, not mingw.

                So you have to start from scratch, installing Qt for MSVS 200X (the one you have) and use that toolchain.

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  yeaiping
                  wrote on 23 Mar 2011, 14:46 last edited by
                  #8

                  If App run crash, I can used WinDbg attached the process, and load symbol files to debug current crash process? What about cdb or gdb debug the crash app

                  A smile is my sharp weapon (:

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on 23 Mar 2011, 14:52 last edited by
                    #9

                    cdb is equal to windbg in this case.
                    Both debug only apps buiold with Microsoft cl and toolchain
                    gdb can also attach to a process (afaik) but I'm not a gdb expert.

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • Y Offline
                      Y Offline
                      yeaiping
                      wrote on 23 Mar 2011, 14:54 last edited by
                      #10

                      [quote author="Gerolf" date="1300890836"]If you want to use windows debugger on windows, you have to use windows tool chain, not mingw.

                      So you have to start from scratch, installing Qt for MSVS 200X (the one you have) and use that toolchain.[/quote]

                      Since QT creator can compile, should offer the debugger solution on windows. When the app run crash, I usually use WinDbg attached the crash process, and load symbol files. It's very easy to resolve some diffcult bugs. And sometimes use dump file...

                      A smile is my sharp weapon (:

                      1 Reply Last reply
                      0
                      • Y Offline
                        Y Offline
                        yeaiping
                        wrote on 23 Mar 2011, 14:56 last edited by
                        #11

                        [quote author="Gerolf" date="1300891937"]cdb is equal to windbg in this case.
                        Both debug only apps buiold with Microsoft cl and toolchain
                        gdb can also attach to a process (afaik) but I'm not a gdb expert.[/quote]

                        Oh, I download the gdb and debug my bad software. Thanks

                        A smile is my sharp weapon (:

                        1 Reply Last reply
                        0
                        • Y Offline
                          Y Offline
                          yeaiping
                          wrote on 23 Mar 2011, 15:31 last edited by
                          #12

                          I'm very depressed. QT Creator has "attach to running external application" option in Menu "Debug->StartDebugging", and I setup the dbg_x86.
                          But if the app crashed, I attach to the process, but no respose.
                          So I use another way: "Start application", and make the app crash, then capture the error and position. But the codes is assemble, and qtcreator suspend, no respose

                          A smile is my sharp weapon (:

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            goetz
                            wrote on 23 Mar 2011, 16:32 last edited by
                            #13

                            [quote author="yeaiping" date="1300892042"]Since QT creator can compile, should offer the debugger solution on windows. When the app run crash, I usually use WinDbg attached the crash process, and load symbol files. It's very easy to resolve some diffcult bugs. And sometimes use dump file...[/quote]

                            Good support for the windows visual studio toolchain debuggers (aka CDB) are in the works, so please stay tuned.

                            http://www.catb.org/~esr/faqs/smart-questions.html

                            1 Reply Last reply
                            0

                            9/13

                            23 Mar 2011, 14:52

                            • Login

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