Hi, I'm building gdb on Windows with TUI support (--enable-tui) using msys2 with MinGWx64, and the arrow keys do not respond when in TUI mode. ======== Scenario ======== 1) Start gdb --tui (from DOS, with MinGWx64 bin dir in the PATH) 2) Move focus to gdb's CLI window (Ctrl+x, o) 2) Type any command (do not press Enter yet) 3) Click on the left/right keyboard arrow keys Expected: text cursor will move to the left/right Actual: nothing happens. Moreover, the up/down keys (history lookup), do not respond either. On Linux, OTOH, it works and the arrow keys respond (Ubuntu 12.04 with sudo apt-get install gdb). ==================== Debugging the issue ==================== A shallow investigation, debugging of gdb with gdb, showed that wgetch() function (deep in the call-stack, invoked indirectly by stdin_event_handler), is blocking and doesn't return when the arrow-keys are issued. When gdb is not in TUI mode, however, getch() is called instead, returns promptly and issues the associated dispatch handler. I have a mailing list thread at "gdb at sourceware dot org": http://comments.gmane.org/gmane.comp.gdb.devel/35208 This is as far as I could get. ======================= More interesting facts ======================= 1) When you exit TUI mode (Ctrl+x, a), the arrow keys function just fine and everything works. 2) Ctrl+p works (but up arrow key doesn't) 3) Ctrl+b/Ctrl+f work (but left/right arrow keys do not) 4) Ctrl+d works (but delete doesn't). ========== Resources ========== 1) msys2 + MinGWx64 2) PDCurses (instead of ncurses) 3) .././configure --enable-tui --with-expat --build=x86_64-w64-mingw32; make 4) set PATH=C:\msys64\mingw64\bin; gdb --tui Thanks, Ofir
gdb is really at the mercy of the curses implementation here. So, I would suggest contacting the PDCurses maintainers. If there's something gdb is doing incorrectly here, then we could address that; but first we'd have to know what it is.
No response in a while.