From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90336 invoked by alias); 22 Jul 2016 13:28:00 -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 90327 invoked by uid 89); 22 Jul 2016 13:28:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 22 Jul 2016 13:27:49 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE5E47EA90; Fri, 22 Jul 2016 13:27:48 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-18.ams2.redhat.com [10.36.112.18]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6MDRkDW014998; Fri, 22 Jul 2016 09:27:47 -0400 Subject: Re: [RFA] PR python/13598 - add before_prompt event To: Yao Qi , Tom Tromey References: <1463806850-11001-1-git-send-email-tom@tromey.com> Cc: "gdb-patches@sourceware.org" From: Phil Muldoon Message-ID: Date: Fri, 22 Jul 2016 13:28:00 -0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00297.txt.bz2 On 22/07/16 11:01, Yao Qi wrote: > Hi Tom, > > On Sat, May 21, 2016 at 6:00 AM, Tom Tromey wrote: >> This adds an event that is emitted just before GDB presents a prompt >> to the user. This provides Python code a way to react to whatever >> changes might have been made by the previous command. For example, in >> my GUI I use this to track changes to the selected frame and reflect >> them in the UI. > > I read this patch multiple times, but don't know the motivation of adding this > event. In PR python/13598, you mentioned you want to get event when > something is changed. If so, why don't you add the python event for the changes > you are interested in? What is your use case of using python code in GDB? The use-case seems clear to me. Old workflow: gdb-prompt -> command entered -> gdb does something -> gdb finishes -> gdb displays prompt New workflow: gdb-prompt -> command entered -> gdb does something -> gdb finishes -> notifies interested observers -> gdb displays prompt I think it would be useful to know the time when GDB is done processing the event queue and before it displays the prompt and waits on user input. Cheers Phil