This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: building gdb with TUI support on Windows
- From: Ofir Cohen <ofircohenn at gmail dot com>
- To: Eli Zaretskii <eliz at gnu dot org>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Fri, 2 Jan 2015 02:32:28 +0200
- Subject: Re: building gdb with TUI support on Windows
- Authentication-results: sourceware.org; auth=none
- References: <CAHOBVAcxtD5iXtunUbuHDnv-Wv5HCPRGWKzPb+4E-31KTAE0Nw at mail dot gmail dot com> <1158788672 dot 3333170 dot 1420122368468 dot JavaMail dot yahoo at jws11107 dot mail dot ir2 dot yahoo dot com> <83lhlmbj0v dot fsf at gnu dot org> <CAHOBVAfkBvhurbuMfhO8=r4Oyt4BeCjF9G_Nb+XZTHFbBz5eCg at mail dot gmail dot com> <83h9wabgfu dot fsf at gnu dot org> <9E85FD9B-532C-46CA-B658-5EC0E4A49E5C at oarcorp dot com> <83fvbubesd dot fsf at gnu dot org> <CAHOBVAcF824319G6O_LfJBYAQP3M0-LbhAV_d=SrR6jM4=0k5w at mail dot gmail dot com> <83d26ybcap dot fsf at gnu dot org>
Hi Eli,
Thank you for your response.
Retrieving the key sequence is trivial indeed.
I have submitted a bug for this:
Bug 17774 - gdb on Windows TUI mode: arrow keys do not work
https://sourceware.org/bugzilla/show_bug.cgi?id=17774
Once you get a reply from the ncurses mailing list, I would appreciate if you
could send a notification to this mail thread, as well as update the bug so
we could track and fix this.
The wgetch() not returning is a blocker for the fix (at least for PDCurses),
but sure what happens with ncurses.
Once we get the curses fix for windows, and/or the key bindings
settings for readline,
we could upstream the fix.
I am really pleased with thee responsiveness of you and Hannes,
which allowed me to get it working and save lots of time, thanks again.
- Ofir Cohen
On 1 January 2015 at 20:12, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Thu, 1 Jan 2015 19:31:43 +0200
>> From: Ofir Cohen <ofircohenn@gmail.com>
>>
>> Are these codes/magic numbers OS/console-specific?
>> e.g. "\340\163": backward-word # Ctrl-left
>
> Those are the sequences produced by the Windows console when you press
> those keys.
>
>> Could you please provide pointers that map keyboard keys to codes?
>
> I don't have the full table. I produced these few by setting a
> breakpoint in rl_getc (a function in Readline which reads the keys),
> and printing what it reads when I press a key.
>
> It is also easy to write a simple program that will display the
> sequence given a keypress.
>
> I'm quite sure you can find the information floating around, though.
> This page looks promising:
>
> http://www.quadibloc.com/comp/scan.htm
>
>> As this might get rejected / deemed meaningless to the maintainers, or
>> take a lot
>> of time, I think it would be nice if we could:
>>
>> 1. Have next releases of gdb packaged with a sample .inputrc file
>> e.g. ".windows_console_samle_inputrc"
>>
>> that provides the most commonly needed/used key-bindings.
>>
>> 2. Provide a hint about this file in the README file / somewhere obvious.
>>
>> After all, I believe I'm not the only keyboard junkie in the world ;-).
>
> But everyone uses Google ;-) So finding this discussion will be easy.
>
> The problem with providing a sample .inputrc with GDB is that this
> file is used not just by GDB, but by any application that uses the
> Readline library.