gdb/ChangeLog:
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Wed, 2 Dec 2009 19:29:42 +0000 (19:29 +0000)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Wed, 2 Dec 2009 19:29:42 +0000 (19:29 +0000)
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.

gdb/ChangeLog
gdb/ada-lang.c
gdb/defs.h
gdb/doc/ChangeLog
gdb/doc/observer.texi
gdb/interps.c
gdb/top.c
gdb/valops.c

index 2bce66796b00d0fc6823ed043534c952beaa9ab1..6319afeb0c379ce571470b69c61c5e18541ca204 100644 (file)
@@ -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
index 9594d6d601aee3318447439537606260ebb40442..599b8d60a7a55c45e57f0d1ad01d40d04cd54611 100644 (file)
@@ -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));
index 83e73cda1712f1a4dc592bc95fb35fb1c79c0af7..b944ffb4d8e0a724df17a92ecf6d5b29cadb6c3d 100644 (file)
@@ -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,
index 090aa14573720254ae511d6c5db0968eaf3b5c47..73a640d104ef75b7bfa1ae4abb6f3af51ad98fc0 100644 (file)
@@ -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.
index 0ea9397fa403f60396b98e38f4b1e285ddfeea3f..1f733749ed5c9ba3107b9d5611c201040af78376 100644 (file)
@@ -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})
index da05ee26ed611d797e8520100617259287653958..483f42c9a86a6f7981eeb56a03f7025df386bda0 100644 (file)
@@ -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;
index b6701b6ab870f11cb9174a549acc88641c9676d6..69a11ad5be1b64df285ff2edf4433bbbc24e2800 100644 (file)
--- 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.  */
 
index 27716887746c3bec3c5e27de6acc59e7474eac8c..34619d34def6188ec1417fbcb0d7fc0f6862ec8b 100644 (file)
@@ -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;