'Qt Debugger: The GDB process terminated
I am a freshman on Qt Designer. Recently, I've used Qt creator create my own Qt project, which has been available to serial port. However, when I tried to debug my project, it always showed my with the following message, especially when there were breaks in my projects:
Error: The GDB process teminated.
I am very depressed. I have been getting stuck for several days.
If anyone could give me some instructions, more thanks would be given!
Thank you!
Solution 1:[1]
There can be different reasons, with different solutions;
(Below will list those most commonly causing this for me.)
#1 Toolchain
It's maybe related to your toolchain, for example I experienced similar issues, where I was compiling my code with latest MingW, but Qt was built with a little older MingW compiler.
I searched everywhere for the specific MingW, that which Qt was built with, but could not find that.
The only solution for me was to rebuild Qt from scratch (and fix all build errors).
#2 Permission
Another time, I was trying to attach debugger to an App running as root.
After running IDE (and by that the debugger) as root, things started to work.
But sometimes, following below
#3was required, too.
#3 Working Directory
Apps may load dependencies based on current-working-directory, for this case:
If you want to attach-debugger to already running root App:
- We need to change the way IDE is launched, for example, open the terminal and
cdto where the App requires us to (like directory containing the executable), then launch IDE from terminal (using it's path).This may only be required when attaching to App(s) running as root, and even there not for all IDEs (but was required for QtCreator v4.x at least).
If you don't attach:
- Simply change IDE configurations, I mean, most IDEs allow you to select working-directory (like QtCreator does), first do that and then start debugging.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
