Having difficulties running GDB with Eclipse CDT on Mac OS X Mojave.
When I try to debug the project, GDB behaves chaotic: I am able to debug a few times, but then it starts stalling at the begining of the next debug session with the message "Configuring GDB".
Executable is /Users/jd/Work/myapp
.
When I list the processes ps -al
I see there are hanging processes:
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Work/myapp
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Library/Caches/gdb/bin/bash -c exec /Users/jd/Work/myapp
/Users/jd/Work/myapp
/usr/local/bin/gdb --interpreter mi2 --nx
/usr/local/bin/gdb --interpreter mi2 --nx
/usr/local/bin/gdb --interpreter mi2 --nx
/usr/local/bin/gdb --interpreter mi2 --nx
What could be the problem? Is it GDB or Bash?
Edit
The hanging myapp
processes have a TXs+
state, which, according to man ps
page means:
- T, marks a stopped process
- X, the process is being traced or debugged
- s, the process is a session leader
- "+", the process is in the foreground process group of its control terminal
The hanging ggdb
processes have a state:
- S, process that is sleeping for less than about 20 seconds (never turns to I, which means it sleeps more than 20 seconds, idle.)