ofircohenn at gmail dot com
2014-12-30 18:08:54 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=17774
Bug ID: 17774
Summary: gdb on Windows TUI mode: arrow keys do not work
Product: gdb
Version: 7.8
Status: NEW
Severity: normal
Priority: P2
Component: tui
Assignee: unassigned at sourceware dot org
Reporter: ofircohenn at gmail dot com
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
Bug ID: 17774
Summary: gdb on Windows TUI mode: arrow keys do not work
Product: gdb
Version: 7.8
Status: NEW
Severity: normal
Priority: P2
Component: tui
Assignee: unassigned at sourceware dot org
Reporter: ofircohenn at gmail dot com
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
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.