From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32563 invoked by alias); 1 Jan 2015 15:42:11 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 32549 invoked by uid 89); 1 Jan 2015 15:42:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Jan 2015 15:42:07 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NHI00H008MWJB00@a-mtaout20.012.net.il> for gdb@sourceware.org; Thu, 01 Jan 2015 17:42:05 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHI00HYE8Y4HY10@a-mtaout20.012.net.il>; Thu, 01 Jan 2015 17:42:05 +0200 (IST) Date: Thu, 01 Jan 2015 15:42:00 -0000 From: Eli Zaretskii Subject: Re: building gdb with TUI support on Windows In-reply-to: <752802600.3289238.1420115247923.JavaMail.yahoo@jws11165.mail.ir2.yahoo.com> To: Hannes Domani Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83mw62bj93.fsf@gnu.org> References: <834msbdbhb.fsf@gnu.org> <752802600.3289238.1420115247923.JavaMail.yahoo@jws11165.mail.ir2.yahoo.com> X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00003.txt.bz2 > Date: Thu, 1 Jan 2015 12:27:27 +0000 (UTC) > From: Hannes Domani > > Eli Zaretskii 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.