When switching the TUI mode on and off (with Ctrl+x, a), gdb often gets stuck using only half the screen (so the cmd and src windows take only 1/4 of the screen each) and winheight cmd + 5
won't work.
How can I prevent or fix this?
This is apparently a problem related to readline.
Someone apparently already looked into it: http://patchwork.sourceware.org/patch/6398/ so hopefully it should be fixed in newer versions of gdb.
In the meantime, the following kludge can be used to fix the problem when it happens:
pkill -SIGWINCH gdb
I had similar issue when I was working on Windows, connecting through Putty to my server where gdb was running.
I found out that gdb took from Putty information about terminal resolution (or putty delivered it to gdb?). Unfortunately, when Putty window was maximised, the information send/received described normal (restored) window size.
To solve it I just restored putty window to normal size, manually resized it to look as maximised and maximised once again. After switching TUI off and on I could work with whole the screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With