From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31054 invoked by alias); 21 Nov 2002 21:26:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31044 invoked from network); 21 Nov 2002 21:26:57 -0000 Received: from unknown (HELO mallaury.noc.nerim.net) (62.4.17.82) by sources.redhat.com with SMTP; 21 Nov 2002 21:26:57 -0000 Received: from nerim.fr (stcarrez.net1.nerim.net [62.212.108.40]) by mallaury.noc.nerim.net (Postfix) with ESMTP id 972FF62E22; Thu, 21 Nov 2002 22:26:53 +0100 (CET) Message-ID: <3DDD5D91.3010500@nerim.fr> Date: Thu, 21 Nov 2002 13:26:00 -0000 From: Stephane Carrez User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 To: gdb-patches@sources.redhat.com, drow@mvista.com Subject: [5.3 PATCH]: Fix TUI breaking gdb interpreters (mi) Content-Type: multipart/mixed; boundary="------------010502030309050505080301" X-SW-Source: 2002-11/txt/msg00526.txt.bz2 This is a multi-part message in MIME format. --------------010502030309050505080301 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1198 Hi! Daniel Jacobowitz wrote: > Two problems: > TUI broke the MI interface if TUI is enabled at compile time. The change > which did this does was on Sept. 10th, 2002. There's a typo in the > ChangeLog which made it hard to find... > > * tui-hooks.c (tui_event_loop): New function. > (tui_command_loop): New function to override gdb loop and make sure > uiout is set according to TUI mode. > (tui_command_loop): Install the specific TUI command hook. > > (the second tui_command_loop should have been tui_init_hook). > > You can't just override the command loop that way! MI does this > conditionally on -i=mi being specified. > > This also breaks the bit at the end of gdb/top.c to handle unknown -i= > switches. Too bad... I've committed this patch to avoid the TUI initialization when some interpreter was specified (It does not make sense to enable TUI when there such interpreter). I also fixed the ChangeLog typo. gdb -i=mi seems to work after that (at least better than without it). Stephane 2002-11-21 Stephane Carrez * tui-hooks.c (tui_init_hook): Don't enable the TUI if a specific interpreter is installed. --------------010502030309050505080301 Content-Type: text/plain; name="tui-fixes.diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tui-fixes.diffs" Content-length: 575 Index: tui-hooks.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v retrieving revision 1.7.2.1 diff -u -p -r1.7.2.1 tui-hooks.c --- tui-hooks.c 10 Sep 2002 20:00:55 -0000 1.7.2.1 +++ tui-hooks.c 21 Nov 2002 21:13:02 -0000 @@ -420,6 +420,10 @@ tui_event_loop (void) static void tui_init_hook (char *argv0) { + /* Don't enable the TUI if a specific interpreter is installed. */ + if (interpreter_p) + return; + /* Install exit handler to leave the screen in a good shape. */ atexit (tui_exit); --------------010502030309050505080301--