From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2022 invoked by alias); 12 Nov 2013 19:58:25 -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 2012 invoked by uid 89); 12 Nov 2013 19:58:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2013 19:58:23 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rACJwG8A016432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Nov 2013 14:58:16 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rACJwETj001037; Tue, 12 Nov 2013 14:58:15 -0500 Message-ID: <52828856.9070904@redhat.com> Date: Tue, 12 Nov 2013 20:53:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [PATCH v4 9/9] enable target-async References: <1382464769-2465-1-git-send-email-tromey@redhat.com> <1382464769-2465-10-git-send-email-tromey@redhat.com> In-Reply-To: <1382464769-2465-10-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-11/txt/msg00326.txt.bz2 Hi Tom, still not a full review, but I thought I'd send out a couple comments as I have them. On 10/22/2013 06:59 PM, Tom Tromey wrote: > /* Never display the default GDB prompt in MI case. */ > > static int > mi_interpreter_prompt_p (void *data) > { Looks quite odd for a predicate function to actually have side effects. I guess this is the hack you mentioned? I think this is missing a comment explaining what is going on. It's not obvious at all to me. > + if (!interp_quiet_p (NULL)) > + { > + if (!target_is_async_p () > + || (!sync_execution > + && (!target_async_permitted > + || iterate_over_threads (thread_command_not_mi, > + NULL) == NULL))) > + { > + fputs_unfiltered ("(gdb) \n", raw_stdout); > + gdb_flush (raw_stdout); > + } > + } > + > return 0; > } > @@ -1837,7 +1851,7 @@ mi_cmd_list_target_features (char *command, char **argv, int argc) > struct ui_out *uiout = current_uiout; > > cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); > - if (target_can_async_p ()) > + if (mi_target_can_async_p ()) > ui_out_field_string (uiout, NULL, "async"); > if (target_can_execute_reverse) > ui_out_field_string (uiout, NULL, "reverse"); Hmm, not sure this is right. This supposedly returns the set of supported features. But mi_target_can_async_p returns false until the frontend enables target-async. So this change creates a sort of chicken and egg situation. > --- a/gdb/testsuite/gdb.mi/mi-cli.exp > +++ b/gdb/testsuite/gdb.mi/mi-cli.exp > @@ -134,20 +134,7 @@ mi_gdb_test "500-stack-select-frame 0" \ > {500\^done} \ > "-stack-select-frame 0" > > -# When a CLI command is entered in MI session, the respose is different in > -# sync and async modes. In sync mode normal_stop is called when current > -# interpreter is CLI. So: > -# - print_stop_reason prints stop reason in CLI uiout, and we don't show it > -# in MI > -# - The stop position is printed, and appears in MI 'console' channel. > -# > -# In async mode the stop event is processed when we're back to MI interpreter, > -# so the stop reason is printed into MI uiout an. > -if {$async} { > - set reason "end-stepping-range" > -} else { > - set reason "" > -} > +set reason "end-stepping-range" I'm a little confused by this one. Isn't it still necessary for targets that don't do async? -- Pedro Alves