From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18888 invoked by alias); 28 Sep 2012 07:36:31 -0000 Received: (qmail 18697 invoked by uid 22791); 28 Sep 2012 07:36:28 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Sep 2012 07:36:20 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MB100800U627N00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Fri, 28 Sep 2012 09:36:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MB10087GUGG31D0@a-mtaout21.012.net.il>; Fri, 28 Sep 2012 09:36:17 +0200 (IST) Date: Fri, 28 Sep 2012 07:36:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 1/2] new memory-changed MI notification. In-reply-to: <1348793347-12556-2-git-send-email-yao@codesourcery.com> To: Yao Qi Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83bogqha4t.fsf@gnu.org> References: <1348793347-12556-1-git-send-email-yao@codesourcery.com> <1348793347-12556-2-git-send-email-yao@codesourcery.com> 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-09/txt/msg00667.txt.bz2 > From: Yao Qi > Date: Fri, 28 Sep 2012 08:49:06 +0800 > > Hi, > There are usually two views in MI front-end, 'memory view' and 'code > view', which displays the contents of 'data' and 'code'. If user > modified memory in console, both views should be updated to show the > latest contents. In order to achieve this, this patch adds a new MI > notification '=memory-changed', so that MI front-ends can refresh its > 'memory view' and 'code view' once this notification arrives. Thanks. > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -57,6 +57,8 @@ py [command] > using new async records "=tsv-created" and "=tsv-deleted". > ** The start and stop of process record are now notified using new > async record "=record-started" and "=record-stopped". > + ** Memory changes are now notified using new async record > + "=memory-changed". This part is OK. > +@item =memory-changed,thread-group=@var{id},addr=@var{addr},len=@var{len}"[,type=@var{type}"] I think the quotes should be deleted; I see no sign of them in the code that produces the "type=..." part. > +Reports that bytes from @var{addr} to @var{data} + @var{len} were > +written in an inferior. The @var{id} is the identifier of the > +thread group corresponding to the affected inferior. @var{type} > +is the type of the section written to, @code{code}; it exists only > +when the type of the section is known. If @var{type} can only be "code", then I suggest to say ...[,type=code] explicitly. Btw, why "code"? If this is the name of the section, it should be ".text", not code. > --- a/gdb/doc/observer.texi > +++ b/gdb/doc/observer.texi > @@ -230,9 +230,9 @@ The inferior @var{inf} has been removed from the list of inferiors. > This method is called immediately before freeing @var{inf}. > @end deftypefun > > -@deftypefun void memory_changed (CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data}) > +@deftypefun void memory_changed (struct inferior *@var{inferior}, CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data}) > Bytes from @var{data} to @var{data} + @var{len} have been written > -to the current inferior at @var{addr}. > +to the @var{inferior} at @var{addr}. > @end deftypefun This part is OK. Thanks.