From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11321 invoked by alias); 15 Oct 2012 19:03:02 -0000 Received: (qmail 11297 invoked by uid 22791); 15 Oct 2012 19:03:01 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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; Mon, 15 Oct 2012 19:02:55 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9FJ2sH5028951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Oct 2012 15:02:54 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9FJ2quV014623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 15 Oct 2012 15:02:53 -0400 From: Tom Tromey To: Yao Qi Cc: Subject: Re: [PATCH 1/2] new memory-changed MI notification. References: <1348793347-12556-1-git-send-email-yao@codesourcery.com> <1348793347-12556-2-git-send-email-yao@codesourcery.com> <87obkqt6ck.fsf@fleche.redhat.com> <5073D5B5.2060208@codesourcery.com> Date: Mon, 15 Oct 2012 19:03:00 -0000 In-Reply-To: <5073D5B5.2060208@codesourcery.com> (Yao Qi's message of "Tue, 9 Oct 2012 15:43:49 +0800") Message-ID: <87y5j7a78j.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-10/txt/msg00233.txt.bz2 >>>>> "Yao" == Yao Qi writes: Tom> Usually I think it would be preferable to have a flag correspond to a Tom> notification and not a command; but this would not work so well if a Tom> command needed to suppress two different messages. (Though if that Tom> happens then maybe we should have a slightly different approach based on Tom> bitmasks.) Yao> I agree with you that one flag should correspond to a notification. I Yao> revised my patch a little bit to get rid of suppression flag Yao> 'var_assign'. Funny -- your previous message got me to agree that the bitmask approach is overkill :) Yao> 2012-10-09 Yao Qi Yao> * breakpoint.c (invalidate_bp_value_on_memory_change): Add one Yao> more parameter 'inferior'. Yao> * corefile.c (write_memory_with_notification): Caller update. Yao> * mi/mi-cmd-var.c: Include "mi-main.h". Yao> (mi_cmd_var_assign): Set mi_suppress_notification.data_write_memory Yao> to 1 and restore it later. Yao> * mi/mi-cmds.c (mi_cmd mi_cmds): Update for "data-write-memory" Yao> and "data-write-memory-bytes. Yao> * mi/mi-interp.c: Include objfiles.h. Yao> (mi_interpreter_init): Call observer_attach_memory_changed. Yao> (mi_memory_changed): New. Yao> * mi/mi-main.h (struct mi_suppress_notification) : Yao> New field. Either version of the patch is ok. Check in whichever one you prefer. Tom