diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-12-02 19:29:42 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-12-02 19:29:42 +0000 |
commit | 8cebebb9a2f399f50f4284797528fb952dd80576 (patch) | |
tree | cd32b630d8e1e76b9b9aa0f89001a9e343d37945 /gdb | |
parent | 9c0ae74d4f8b06846a12154d50daf387b73e077c (diff) | |
download | gdb-8cebebb9a2f399f50f4284797528fb952dd80576.zip gdb-8cebebb9a2f399f50f4284797528fb952dd80576.tar.gz gdb-8cebebb9a2f399f50f4284797528fb952dd80576.tar.bz2 |
gdb/ChangeLog:
2009-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
* ada-lang.c (ada_value_assign): Use observer_notify_memory_changed.
* valops.c (value_assign): Likewise.
* defs.h (deprecated_memory_changed_hook): Remove.
* top.c (deprecated_memory_changed_hook): Likewise.
* interps.c (clear_interpreter_hooks): Adjust.
gdb/gdbtk/ChangeLog:
2009-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
* generic/gdbtk-hooks.c (gdbtk_memory_changed): Adjust.
(gdbtk_add_hooks): Adjust.
gdb/doc/ChangeLog:
2009-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
* observer.texi: New memory_changed observer.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/ada-lang.c | 5 | ||||
-rw-r--r-- | gdb/defs.h | 1 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/observer.texi | 5 | ||||
-rw-r--r-- | gdb/interps.c | 1 | ||||
-rw-r--r-- | gdb/top.c | 3 | ||||
-rw-r--r-- | gdb/valops.c | 4 |
8 files changed, 21 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2bce667..6319afe 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2009-12-02 Paul Pluzhnikov <ppluzhnikov@google.com> + + * ada-lang.c (ada_value_assign): Use observer_notify_memory_changed. + * valops.c (value_assign): Likewise. + * defs.h (deprecated_memory_changed_hook): Remove. + * top.c (deprecated_memory_changed_hook): Likewise. + * interps.c (clear_interpreter_hooks): Adjust. + 2009-12-02 Tristan Gingold <gingold@adacore.com> * symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 9594d6d..599b8d6 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2289,9 +2289,8 @@ ada_value_assign (struct value *toval, struct value *fromval) move_bits (buffer, value_bitpos (toval), value_contents (fromval), 0, bits, 0); write_memory (to_addr, buffer, len); - if (deprecated_memory_changed_hook) - deprecated_memory_changed_hook (to_addr, len); - + observer_notify_memory_changed (to_addr, len, buffer); + val = value_copy (toval); memcpy (value_contents_raw (val), value_contents (fromval), TYPE_LENGTH (type)); @@ -1108,7 +1108,6 @@ extern void (*deprecated_readline_begin_hook) (char *, ...) extern char *(*deprecated_readline_hook) (char *); extern void (*deprecated_readline_end_hook) (void); extern void (*deprecated_register_changed_hook) (int regno); -extern void (*deprecated_memory_changed_hook) (CORE_ADDR addr, int len); extern void (*deprecated_context_hook) (int); extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid, struct target_waitstatus *status, diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 090aa14..73a640d 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-12-02 Paul Pluzhnikov <ppluzhnikov@google.com> + + * observer.texi: New memory_changed observer. + 2009-12-01 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Reverse Execution): Fix typo. diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi index 0ea9397..1f73374 100644 --- a/gdb/doc/observer.texi +++ b/gdb/doc/observer.texi @@ -208,6 +208,11 @@ Either @value{GDBN} detached from the inferior, or the inferior exited. The argument @var{pid} identifies the inferior. @end deftypefun +@deftypefun void memory_changed (CORE_ADDR @var{addr}, int @var{len}, const bfd_byte *@var{data}) +Bytes from @var{data} to @var{data} + @var{len} have been written +to the current inferior at @var{addr}. +@end deftypefun + @deftypefun void test_notification (int @var{somearg}) This observer is used for internal testing. Do not use. See testsuite/gdb.gdb/observer.exp. diff --git a/gdb/interps.c b/gdb/interps.c index da05ee2..483f42c 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -343,7 +343,6 @@ clear_interpreter_hooks (void) deprecated_readline_hook = 0; deprecated_readline_end_hook = 0; deprecated_register_changed_hook = 0; - deprecated_memory_changed_hook = 0; deprecated_context_hook = 0; deprecated_target_wait_hook = 0; deprecated_call_command_hook = 0; @@ -259,9 +259,6 @@ void (*deprecated_interactive_hook) (void); that several registers have changed (see value_assign). */ void (*deprecated_register_changed_hook) (int regno); -/* Tell the GUI someone changed LEN bytes of memory at ADDR */ -void (*deprecated_memory_changed_hook) (CORE_ADDR addr, int len); - /* Called when going to wait for the target. Usually allows the GUI to run while waiting for target events. */ diff --git a/gdb/valops.c b/gdb/valops.c index 2771688..34619d3 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -861,8 +861,8 @@ value_assign (struct value *toval, struct value *fromval) } write_memory (changed_addr, dest_buffer, changed_len); - if (deprecated_memory_changed_hook) - deprecated_memory_changed_hook (changed_addr, changed_len); + observer_notify_memory_changed (changed_addr, changed_len, + dest_buffer); } break; |