2

当我尝试从 Qt Creator 中调试我的 Qt C++ 应用程序时,它始终崩溃并显示以下错误消息:

**An unhandled win32 exception in gdb.exe**

但是,当我尝试通过双击启动相同的二进制文件时,它运行得很好。另外,我也可以像这样从命令行在 gdb 上运行我的二进制文件

C:\Users\CoolCast>c:\MinGW4.4\bin\gdb.exe C:\QuiKast\git_apps_0_1\Server\MediaSt
reamServer-build-Desktop-Debug\debug\CoolCast.exe
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: C:\QuiKast\git_apps_0_1\Server\MediaStreamServer-build-Desktop
-Debug\debug\CoolCast.exe
[New thread 2112.0x1224]
[New thread 2112.0x12c8]
[New thread 2112.0xc00]
[New thread 2112.0x1264]
[New thread 2112.0x150c]
... and so on.

我的环境和程序版本是:

Windows 7
Qt SDK 4.8.4
MinGw 4.4
GDB auto-detected under Mingw and set to C:\Mingw4.4\bin\gdb.exe
4

2 回答 2

1

更新较新版本的 gdb gdb-windows。Creator 至少需要 7.2 IIRC 版本。请检查类似的链接。 Qt Creator 2.5 中的 GDB 崩溃

于 2013-08-19T06:17:53.477 回答
0

对我来说,切换到自动检测的调试器是有效的。我正在使用c:\qtx64\mingw64\bin\g++.exe我的调试器,我得到了相同或类似的错误:the gdb process terminated unexpectedly (code 1). 然后我进入我的 MinGW 64 位套件 ( Tools->Options->Build & Run->Kits) 并单击该字段Auto-detect旁边的按钮Debugger。这将我的调试器切换到c:\qtx64\mingw64\bin\gdb.exe. 重建我的项目(可能有必要也可能没有必要)并从 Qt Creator (Qt Creator 2.7.0 ;基于 Qt 4.8.4(32 位))内部启动调试器并使其正常工作。

于 2020-09-08T19:18:14.557 回答