Maybe itβs a bit late to answer, but I hope this helps: It took some time to figure out how to debug ncurses applications, finally I made a very convenient way using gdbserver and tmux.
Thus, gdb I / O and applications are completely separate:
debug.sh (script that starts debugging):
#!/bin/bash tmux splitw -h -p 50 "gdbserver :12345 ./yourapplication" tmux selectp -t 0 gdb -x debug.gdb
debug.gdb (single line gdb script file for convenience):
target remote localhost:12345
Thus, the application starts on the right side, gdb on the left is waiting to click continue or any other ordinary gdb stuff :)
As soon as you exit, tmux automatically closes gdbserver (and therefore the right panel), and thatβs all :)
source share