Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH/python] notify memory changed.
Date: Tue, 19 Jun 2012 03:16:00 -0000	[thread overview]
Message-ID: <1340075728-24870-1-git-send-email-yao@codesourcery.com> (raw)

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  <yao@codesourcery.com>

	* 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


             reply	other threads:[~2012-06-19  3:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19  3:16 Yao Qi [this message]
2012-06-19 15:14 ` Joel Brobecker
2012-06-20  3:46   ` Yao Qi
2012-06-20 14:52     ` Joel Brobecker
2012-06-21  1:54       ` Yao Qi
2012-06-21  8:52         ` Abid, Hafiz
     [not found]           ` <2883062.LPF6KAsNoT@qiyao.dyndns.org>
2012-06-22 14:36             ` Tom Tromey
2012-06-22 14:35         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340075728-24870-1-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox