[Topic]How to use WinDbg tool debug QT APP, or other debug tools
-
you can use gdb with mingw.
http://www.gnu.org/software/gdb/ -
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 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.
-
[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.
-
[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...
-
[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
-
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 -
[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.