From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4218 invoked by alias); 12 Feb 2003 15:36:28 -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 4211 invoked from network); 12 Feb 2003 15:36:27 -0000 Received: from unknown (HELO localhost.redhat.com) (193.41.215.82) by 172.16.49.205 with SMTP; 12 Feb 2003 15:36:27 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DC0F73D03 for ; Wed, 12 Feb 2003 16:36:28 +0100 (CET) Message-ID: <3E4A69FC.8070605@redhat.com> Date: Wed, 12 Feb 2003 15:36:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit/obish] Fix cntrl-z Content-Type: multipart/mixed; boundary="------------060502090607020700010203" X-SW-Source: 2003-02/txt/msg00285.txt.bz2 This is a multi-part message in MIME format. --------------060502090607020700010203 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 476 Hello, The attatched gets rid of the immediate problem of cntrl-z not working. When async, it calls cli_command_loop. Thanks to mark for analyzing the problem. It should eventually be called via the CLI interpreter's command loop but that can follow. This is to get over the immediate problem (and hey, while we're at it, eliminate a reference to the global command_loop_hook). committed, Andrew PS: The TUI also appears to have also suffered in the fallout :-( --------------060502090607020700010203 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 3272 2003-02-12 Andrew Cagney * event-top.c (cli_command_loop): Delete declaration. (_initialize_event_loop): Delete function setting event_loop_hook. * event-top.h (cli_command_loop): Declare. Update copyright. (EVENT_TOP_H): Define. Wrap header in #ifdef EVENT_TOP_H. * interps.c (current_interp_command_loop): When event_loop_p, call cli_command_loop. Index: event-top.c =================================================================== RCS file: /cvs/src/src/gdb/event-top.c,v retrieving revision 1.25 diff -u -r1.25 event-top.c --- event-top.c 6 Feb 2003 01:19:12 -0000 1.25 +++ event-top.c 12 Feb 2003 15:26:19 -0000 @@ -39,15 +39,12 @@ /* readline defines this. */ #undef savestring -extern void _initialize_event_loop (void); - static void rl_callback_read_char_wrapper (gdb_client_data client_data); static void command_line_handler (char *rl); static void command_line_handler_continuation (struct continuation_arg *arg); static void change_line_handler (void); static void change_annotation_level (void); static void command_handler (char *command); -void cli_command_loop (void); static void async_do_nothing (gdb_client_data arg); static void async_disconnect (gdb_client_data arg); static void async_stop_sig (gdb_client_data arg); @@ -1199,12 +1196,3 @@ delete_file_handler (input_fd); } } - -void -_initialize_event_loop (void) -{ - /* Tell gdb to use the cli_command_loop as the main loop. */ - if (event_loop_p && command_loop_hook == NULL) - command_loop_hook = cli_command_loop; -} - Index: event-top.h =================================================================== RCS file: /cvs/src/src/gdb/event-top.h,v retrieving revision 1.5 diff -u -r1.5 event-top.h --- event-top.h 6 Feb 2003 01:19:12 -0000 1.5 +++ event-top.h 12 Feb 2003 15:26:19 -0000 @@ -1,5 +1,7 @@ -/* Definitions used by GDB event-top.c. - Copyright 1999, 2001 Free Software Foundation, Inc. +/* Definitions used by event-top.c, for GDB, the GNU debugger. + + Copyright 1999, 2001, 2003 Free Software Foundation, Inc. + Written by Elena Zannoni of Cygnus Solutions. This file is part of GDB. @@ -19,6 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef EVENT_TOP_H +#define EVENT_TOP_H + /* Stack for prompts. Each prompt is composed as a prefix, a prompt and a suffix. The prompt to be displayed at any given time is the one on top of the stack. A stack is necessary because of cases in @@ -111,3 +116,7 @@ extern void (*input_handler) (char *); extern int input_fd; extern void (*after_char_processing_hook) (void); + +extern void cli_command_loop (void); + +#endif Index: interps.c =================================================================== RCS file: /cvs/src/src/gdb/interps.c,v retrieving revision 1.3 diff -u -r1.3 interps.c --- interps.c 9 Feb 2003 10:47:37 -0000 1.3 +++ interps.c 12 Feb 2003 15:26:19 -0000 @@ -275,6 +275,8 @@ else if (current_interpreter != NULL && current_interpreter->procs->command_loop_proc != NULL) current_interpreter->procs->command_loop_proc (current_interpreter->data); + else if (event_loop_p) + cli_command_loop (); else command_loop (); } --------------060502090607020700010203--