This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/python] notify memory changed.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]