From: Paul Pluzhnikov Date: Wed, 2 Dec 2009 19:29:42 +0000 (+0000) Subject: gdb/ChangeLog: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8cebebb9a2f399f50f4284797528fb952dd80576;p=binutils-gdb.git gdb/ChangeLog: 2009-12-02 Paul Pluzhnikov * 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 * generic/gdbtk-hooks.c (gdbtk_memory_changed): Adjust. (gdbtk_add_hooks): Adjust. gdb/doc/ChangeLog: 2009-12-02 Paul Pluzhnikov * observer.texi: New memory_changed observer. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2bce66796b0..6319afeb0c3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2009-12-02 Paul Pluzhnikov + + * 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 * symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 9594d6d601a..599b8d60a7a 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)); diff --git a/gdb/defs.h b/gdb/defs.h index 83e73cda171..b944ffb4d8e 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -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 090aa145737..73a640d104e 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2009-12-02 Paul Pluzhnikov + + * observer.texi: New memory_changed observer. + 2009-12-01 Tom Tromey * gdb.texinfo (Reverse Execution): Fix typo. diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi index 0ea9397fa40..1f733749ed5 100644 --- a/gdb/doc/observer.texi +++ b/gdb/doc/observer.texi @@ -206,6 +206,11 @@ the old value, and @var{new_ptid} specifies the new value. @deftypefun void inferior_exit (int @var{pid}) 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}) diff --git a/gdb/interps.c b/gdb/interps.c index da05ee26ed6..483f42c9a86 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; diff --git a/gdb/top.c b/gdb/top.c index b6701b6ab87..69a11ad5be1 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -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 27716887746..34619d34def 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;