From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6707 invoked by alias); 29 Aug 2013 16:27:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6694 invoked by uid 89); 29 Aug 2013 16:27:16 -0000 Received: from mms2.broadcom.com (HELO mms2.broadcom.com) (216.31.210.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Aug 2013 16:27:16 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RDNS_NONE autolearn=no version=3.3.2 X-HELO: mms2.broadcom.com Received: from [10.9.208.53] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Thu, 29 Aug 2013 09:20:48 -0700 X-Server-Uuid: 4500596E-606A-40F9-852D-14843D8201B2 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.1.438.0; Thu, 29 Aug 2013 09:27:04 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Thu, 29 Aug 2013 09:27:04 -0700 Received: from [10.177.73.74] (unknown [10.177.73.74]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id D3CB5F2D72; Thu, 29 Aug 2013 09:27:03 -0700 (PDT) Message-ID: <521F7656.3010305@broadcom.com> Date: Thu, 29 Aug 2013 16:27:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: gdb-patches@sourceware.org cc: "Pedro Alves" Subject: Re: PING: [PATCH] Remove deprecated_command_loop_hook References: <5215024A.9080709@broadcom.com> <52150D68.6020006@earthlink.net> <521558B5.6070909@broadcom.com> <521F26CB.3070209@broadcom.com> <521F5C08.8030904@redhat.com> In-Reply-To: <521F5C08.8030904@redhat.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00878.txt.bz2 On 29/08/2013 3:34 PM, Pedro Alves wrote: > On 08/29/2013 11:47 AM, Andrew Burgess wrote: >> Ping! >> >> I know the gdbtk patch has not yet been merged, but the patch I posted >> for them is not huge, nor should it prove controversial, it's in the >> same style as this patch for core gdb. > > I guess people were just waiting to hear if/when the gdbtk patch > had been merged. But really we don't need to wait for that. Split > out the MI part from the part that actually gets rid of > deprecated_command_loop_hook, and resend the MI bits. Once both MI > and the gdbtk patches are in, resend the deprecated_command_loop_hook > bit saying > "hey, there are no users left, let's just garbage collect this.". > >> >> + /* The version of the mi we're running. */ >> + int version; >> + > > I may be missing something, as I don't see a need for this ... Agreed. Updated patch below only removes the use of deprecated_command_loop_hook from the MI code. OK? Thanks, Andrew 2013-08-29 Andrew Burgess * mi/mi-interp.c (mi_command_loop): Change signature to match interp_command_loop_ftype. (mi1_command_loop): Remove. (mi2_command_loop): Remove. (mi3_command_loop): Remove. (mi_interpreter_resume): Remove setting of deprecated_command_loop_hook. (_initialize_mi_interp): Set mi_command_loop as the command loop callback. diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index e370a57..038132f 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -43,7 +43,7 @@ static void mi_execute_command_wrapper (const char *cmd); static void mi_execute_command_input_handler (char *cmd); -static void mi_command_loop (int mi_version); +static void mi_command_loop (void *data); /* These are hooks that we put in place while doing interpreter_exec so we can report interesting things that happened "behind the MI's @@ -52,10 +52,6 @@ static void mi_command_loop (int mi_version); static int mi_interp_query_hook (const char *ctlstr, va_list ap) ATTRIBUTE_PRINTF (1, 0); -static void mi3_command_loop (void); -static void mi2_command_loop (void); -static void mi1_command_loop (void); - static void mi_insert_notify_hooks (void); static void mi_remove_notify_hooks (void); static void mi_on_normal_stop (struct bpstats *bs, int print_frame); @@ -193,16 +189,6 @@ mi_interpreter_resume (void *data) deprecated_show_load_progress = mi_load_progress; - /* If we're _the_ interpreter, take control. */ - if (current_interp_named_p (INTERP_MI1)) - deprecated_command_loop_hook = mi1_command_loop; - else if (current_interp_named_p (INTERP_MI2)) - deprecated_command_loop_hook = mi2_command_loop; - else if (current_interp_named_p (INTERP_MI3)) - deprecated_command_loop_hook = mi3_command_loop; - else - deprecated_command_loop_hook = mi2_command_loop; - return 1; } @@ -322,25 +308,7 @@ mi_execute_command_input_handler (char *cmd) } static void -mi1_command_loop (void) -{ - mi_command_loop (1); -} - -static void -mi2_command_loop (void) -{ - mi_command_loop (2); -} - -static void -mi3_command_loop (void) -{ - mi_command_loop (3); -} - -static void -mi_command_loop (int mi_version) +mi_command_loop (void *data) { /* Turn off 8 bit strings in quoted output. Any character with the high bit set is printed using C's octal format. */ @@ -996,7 +964,8 @@ _initialize_mi_interp (void) mi_interpreter_exec, /* exec_proc */ mi_interpreter_prompt_p, /* prompt_proc_p */ mi_ui_out, /* ui_out_proc */ - mi_set_logging /* set_logging_proc */ + mi_set_logging, /* set_logging_proc */ + mi_command_loop /* command_loop_proc */ }; /* The various interpreter levels. */