Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH/python] notify memory changed.
@ 2012-06-19  3:16 Yao Qi
  2012-06-19 15:14 ` Joel Brobecker
  0 siblings, 1 reply; 8+ messages in thread
From: Yao Qi @ 2012-06-19  3:16 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-22 14:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19  3:16 [PATCH/python] notify memory changed Yao Qi
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox