From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2334 invoked by alias); 19 Jun 2012 03:16:00 -0000 Received: (qmail 2325 invoked by uid 22791); 19 Jun 2012 03:15:59 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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; Tue, 19 Jun 2012 03:15:46 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Sgouv-0000m4-6b from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 18 Jun 2012 20:15:45 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 18 Jun 2012 20:15:05 -0700 Received: from localhost.localdomain (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Mon, 18 Jun 2012 20:15:43 -0700 From: Yao Qi To: Subject: [PATCH/python] notify memory changed. Date: Tue, 19 Jun 2012 03:16:00 -0000 Message-ID: <1340075728-24870-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain 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-06/txt/msg00603.txt.bz2 When I was looking at observer 'memory_changed' and the callers of 'write_memory', I think observer 'memory_changed' should be notified after write_memory in infpy_write_memory. Regression tested on x86_64-linux native and gdbserver. OK to apply? Note that write_memory is called in many places without notifying 'memory_changed' observer, because most of these memory writes are for either inferior call or displaced stepping. gdb: 2012-06-18 Yao Qi * python/py-inferior.c (infpy_write_memory): Invoke observer_notify_memory_changed. --- gdb/python/py-inferior.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index efbf14b..bdd39b2 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -494,6 +494,7 @@ infpy_write_memory (PyObject *self, PyObject *args, PyObject *kw) break; } write_memory (addr, buffer, length); + observer_notify_memory_changed (addr, length, buffer); } GDB_PY_HANDLE_EXCEPTION (except); -- 1.7.0.4