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: Eli Zaretskii <eliz at gnu dot org>
- To: Hannes Domani <ssbssa at yahoo dot de>
- Cc: gdb at sourceware dot org
- Date: Thu, 01 Jan 2015 17:42:00 +0200
- Subject: Re: building gdb with TUI support on Windows
- Authentication-results: sourceware.org; auth=none
- References: <834msbdbhb dot fsf at gnu dot org> <752802600 dot 3289238 dot 1420115247923 dot JavaMail dot yahoo at jws11165 dot mail dot ir2 dot yahoo dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 1 Jan 2015 12:27:27 +0000 (UTC)
> From: Hannes Domani <ssbssa@yahoo.de>
>
> Eli Zaretskii <eliz@gnu.org> schrieb am 17:34 Mittwoch, 31.Dezember 2014:
> > > For special keys, getch() has to be called multiple times and it returns
> > > part of the an escape sequence each call (e.g. 0xe0 + 'K' for left arrow).
> > >
> > > When keypad is enabled, wgetch() returns a single integer (e.g. KEY_LEFT).
> > > When disabled, it should return the escape sequence as getch() does.
> >
> > Sorry, I'm missing something here. AFAIK, "gdb -tui" doesn't call
> > 'getch', it calls 'wgetch'. Are you saying that when keypad is
> > disabled, GDB (or readline) somehow _expect_ to see escape sequences?
> > If not, I don't see why would the curses library need to start sending
> > escape sequences in that mode, it could simply continue sending single
> > keys, as it does in the keypad mode. What am I missing?
>
> Isn't that the whole point of the keypad option?
> At least that's how I understood this documentation:
> http://linux.die.net/man/3/keypad
That's just a man page from ncurses (which was what I read to learn
about the function), and it doesn't in any way preclude the
possibility that wgetch still returns single keys, rather than the
full escape sequence.
Put another way, if after the call to 'keypad', wgetch still returns a
single value, "gdb -tui" should still work. The problem could only
happen if wgetch returns ERR or doesn't return anything.
Anyway, I asked on the ncurses list about this, let's see what they
reply.