From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15895 invoked by alias); 7 Nov 2012 17:01:29 -0000 Received: (qmail 15885 invoked by uid 22791); 7 Nov 2012 17:01:28 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Nov 2012 17:01:13 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA7H0xfY012854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Nov 2012 12:01:00 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qA7H0mmQ002573; Wed, 7 Nov 2012 12:00:55 -0500 Message-ID: <509A93C0.9020009@redhat.com> Date: Wed, 07 Nov 2012 17:01:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Marc Khouzam CC: =?ISO-8859-1?Q?=27Andr=E9_P=F6nitz=27?= , "'Yao Qi'" , "'Tom Tromey'" , "'gdb-patches@sourceware.org'" Subject: Re: [RFC] MI notification on register changes References: <1350977008-28632-1-git-send-email-yao@codesourcery.com> <87lielqcba.fsf@fleche.redhat.com> <509398D8.7060104@codesourcery.com> <87zk30ot22.fsf@fleche.redhat.com> <5097941F.8080604@codesourcery.com> <874nl3n74e.fsf@fleche.redhat.com> <5098A88B.5070005@codesourcery.com> <20121106200012.GA2591@klara.mpi.htwm.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 X-SW-Source: 2012-11/txt/msg00156.txt.bz2 Marc Khouzam wrote: >> André Pönitz wrote: >> On Tue, Nov 06, 2012 at 02:04:59PM +0800, Yao Qi wrote: >>> If GDB emits a very generic notification (for register change, >>> memory change, etc), I am not sure how useful it is. It would be >>> noisy to frondend, IMO. >> >> Why? >> >> As soon as a single bit changes somewhere, the only formally correct >> response from a frontend is to re-fetch everything. > > IIUC, the notifications being proposed will only be triggered if > registers are changed by the user. This is something that the frontend > needs to be told about because the assumption is that registers/memory > are stable when the program is suspended. I don't believe a full > refresh is needed if such notifications contain the changed info. The issue is in the "contain the changed info" part. In general, we don't have such info available. So there are cases where trusting such fine-grained notifications will get you stale views. For example, in the general case, if the user changes registers/memory, we can't assume that memory/registers didn't change. Some targets even have memory-mapped registers. If GDB core shouldn't assume such things, then "registers changed" or "memory changed" notifications are in general misleading. We'd have to add notes like "note that even though we're saying only a register changed, everything else (memory, stack frame, whole stack, etc.) might have changed too, so you're better off refreshing all your views." which may be a bit silly. We may be better off not giving ourselves and the frontends rope to hang ourselves with. The related question is then, why is a full refresh an issue, if that is something the must already do after every stop, such as e.g., after each "step". As PR 7574 hints at, things like "step" are the use cases users will notice and complain the most if slow. It seems like optimizing the frontends with selecting/partial updates for some cases still leaves you with needing to optimize the full-refresh case anyway for more important cases. -- Pedro Alves