From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18466 invoked by alias); 9 Nov 2012 01:47:55 -0000 Received: (qmail 18458 invoked by uid 22791); 9 Nov 2012 01:47:54 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Nov 2012 01:47:50 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TWdhE-0002za-Ef from Yao_Qi@mentor.com ; Thu, 08 Nov 2012 17:47:48 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 8 Nov 2012 17:47:47 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Thu, 8 Nov 2012 17:47:47 -0800 Message-ID: <509C60B4.60903@codesourcery.com> Date: Fri, 09 Nov 2012 01:47:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Pedro Alves CC: Marc Khouzam , =?ISO-8859-1?Q?=27Andr=E9_?= =?ISO-8859-1?Q?P=F6nitz=27?= , '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> <509A93C0.9020009@redhat.com> In-Reply-To: <509A93C0.9020009@redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00227.txt.bz2 On 11/08/2012 01:00 AM, Pedro Alves wrote: > 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 It sounds like a 'memory model' (it is not proper here, but that is the term I can think of), a single write to register or memory may cause different effects. If we want to solve this problem in GDB side, we need a precise and accurate target description to address them below, don't we? 1) modify register FOO will update memory area 0xN ~ 0xM, and vice versa, 2) register BAR is read only, or at least some bits are. 3) this target doesn't have these special hardware features, > 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. Supposing gdb has this precise target description, gdb doesn't have to refresh everything else, otherwise gdb has to conservatively update everything like what it does nowadays. Do you agree? -- Yao