* [patch] Replace deprecated_memory_changed_hook with an observer.
@ 2009-11-25 19:42 Paul Pluzhnikov
2009-11-25 20:48 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Paul Pluzhnikov @ 2009-11-25 19:42 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
On Wed, Nov 25, 2009 at 10:06 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Should I create a new memory_changed observer and remove
>> deprecated_memory_changed_hook instead?
>
> After reviewing the history of that hook, I think it would be a desired
> cleanup to have a memory_changed observer.
Cleanup patch attached.
Tested on Linux/x86_64 with no regressions.
Thanks,
--
Paul Pluzhnikov
gdb/ChangeLog:
2009-11-25 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.
* interps.c (clear_interpreter_hooks): Adjust.
gdb/doc/ChangeLog:
2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
* observer.texi: New memory_changed observer.
gdb/gdbtk/ChangeLog:
2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
* generic/gdbtk-hooks.c (gdbtk_memory_changed): Adjust.
(gdbtk_add_hooks): Adjust.
[-- Attachment #2: gdb-memchange-cleanup-20091125.txt --]
[-- Type: text/plain, Size: 5331 bytes --]
Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.234
diff -u -p -u -r1.234 ada-lang.c
--- ada-lang.c 19 Nov 2009 22:45:56 -0000 1.234
+++ ada-lang.c 25 Nov 2009 19:21:54 -0000
@@ -2289,9 +2289,8 @@ ada_value_assign (struct value *toval, s
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: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.257
diff -u -p -u -r1.257 defs.h
--- defs.h 21 Oct 2009 18:02:25 -0000 1.257
+++ defs.h 25 Nov 2009 19:21:54 -0000
@@ -1108,7 +1108,6 @@ extern void (*deprecated_readline_begin_
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: interps.c
===================================================================
RCS file: /cvs/src/src/gdb/interps.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 interps.c
--- interps.c 6 Feb 2009 21:33:58 -0000 1.32
+++ interps.c 25 Nov 2009 19:21:54 -0000
@@ -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: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.227
diff -u -p -u -r1.227 valops.c
--- valops.c 10 Nov 2009 22:17:58 -0000 1.227
+++ valops.c 25 Nov 2009 19:21:54 -0000
@@ -861,8 +861,8 @@ value_assign (struct value *toval, struc
}
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;
Index: doc/observer.texi
===================================================================
RCS file: /cvs/src/src/gdb/doc/observer.texi,v
retrieving revision 1.27
diff -u -p -u -r1.27 observer.texi
--- doc/observer.texi 19 Oct 2009 09:51:42 -0000 1.27
+++ doc/observer.texi 25 Nov 2009 19:21:54 -0000
@@ -208,6 +208,11 @@ Either @value{GDBN} detached from the in
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.
Index: gdbtk/generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.49
diff -u -p -u -r1.49 gdbtk-hooks.c
--- gdbtk/generic/gdbtk-hooks.c 24 May 2009 08:38:27 -0000 1.49
+++ gdbtk/generic/gdbtk-hooks.c 25 Nov 2009 19:21:54 -0000
@@ -94,7 +94,8 @@ static void gdbtk_pre_add_symbol (const
static void gdbtk_print_frame_info (struct symtab *, int, int, int);
static void gdbtk_post_add_symbol (void);
static void gdbtk_register_changed (int regno);
-static void gdbtk_memory_changed (CORE_ADDR addr, int len);
+static void gdbtk_memory_changed (CORE_ADDR addr, int len,
+ const bfd_byte *data);
static void gdbtk_selected_frame_changed (int);
static void gdbtk_context_change (int);
static void gdbtk_error_begin (void);
@@ -129,6 +130,7 @@ gdbtk_add_hooks (void)
observer_attach_tracepoint_modified (gdbtk_modify_tracepoint);
observer_attach_tracepoint_deleted (gdbtk_delete_tracepoint);
observer_attach_architecture_changed (gdbtk_architecture_changed);
+ observer_attach_memory_changed (gdbtk_memory_changed);
/* Hooks */
deprecated_call_command_hook = gdbtk_call_command;
@@ -158,7 +160,6 @@ gdbtk_add_hooks (void)
deprecated_detach_hook = gdbtk_detach;
deprecated_register_changed_hook = gdbtk_register_changed;
- deprecated_memory_changed_hook = gdbtk_memory_changed;
deprecated_selected_frame_level_changed_hook = gdbtk_selected_frame_changed;
deprecated_context_hook = gdbtk_context_change;
@@ -393,7 +394,7 @@ gdbtk_register_changed (int regno)
}
static void
-gdbtk_memory_changed (CORE_ADDR addr, int len)
+gdbtk_memory_changed (CORE_ADDR addr, int len, const bfd_byte *data)
{
if (Tcl_Eval (gdbtk_interp, "gdbtk_memory_changed") != TCL_OK)
report_error ();
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] Replace deprecated_memory_changed_hook with an observer.
2009-11-25 19:42 [patch] Replace deprecated_memory_changed_hook with an observer Paul Pluzhnikov
@ 2009-11-25 20:48 ` Joel Brobecker
2009-11-25 21:14 ` Paul Pluzhnikov
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2009-11-25 20:48 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: gdb-patches
> 2009-11-25 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.
> * interps.c (clear_interpreter_hooks): Adjust.
It looks like you forgot to remove the definition in top.c.
Pre-approved with that change.
> gdb/doc/ChangeLog:
>
> 2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * observer.texi: New memory_changed observer.
This part looks fine to me, but will have to wait for Eli's approval.
> gdb/gdbtk/ChangeLog:
>
> 2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * generic/gdbtk-hooks.c (gdbtk_memory_changed): Adjust.
> (gdbtk_add_hooks): Adjust.
This part is approved. Very kind of you to fix problems in gdbtk :).
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] Replace deprecated_memory_changed_hook with an observer.
2009-11-25 20:48 ` Joel Brobecker
@ 2009-11-25 21:14 ` Paul Pluzhnikov
2009-12-02 17:38 ` [DOCO/PING] " Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Paul Pluzhnikov @ 2009-11-25 21:14 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 870 bytes --]
On Wed, Nov 25, 2009 at 12:48 PM, Joel Brobecker <brobecker@adacore.com> wrote:
> It looks like you forgot to remove the definition in top.c.
Indeed. Fixed patch attached.
Thanks,
--
Paul Pluzhnikov
gdb/ChangeLog:
2009-11-25 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/doc/ChangeLog:
2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
* observer.texi: New memory_changed observer.
gdb/gdbtk/ChangeLog:
2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
* generic/gdbtk-hooks.c (gdbtk_memory_changed): Adjust.
(gdbtk_add_hooks): Adjust.
[-- Attachment #2: gdb-memchange-cleanup-20091125-2.txt --]
[-- Type: text/plain, Size: 6014 bytes --]
Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.234
diff -u -p -u -r1.234 ada-lang.c
--- ada-lang.c 19 Nov 2009 22:45:56 -0000 1.234
+++ ada-lang.c 25 Nov 2009 21:10:03 -0000
@@ -2289,9 +2289,8 @@ ada_value_assign (struct value *toval, s
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: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.257
diff -u -p -u -r1.257 defs.h
--- defs.h 21 Oct 2009 18:02:25 -0000 1.257
+++ defs.h 25 Nov 2009 21:10:03 -0000
@@ -1108,7 +1108,6 @@ extern void (*deprecated_readline_begin_
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: interps.c
===================================================================
RCS file: /cvs/src/src/gdb/interps.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 interps.c
--- interps.c 6 Feb 2009 21:33:58 -0000 1.32
+++ interps.c 25 Nov 2009 21:10:03 -0000
@@ -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: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.173
diff -u -p -u -r1.173 top.c
--- top.c 5 Nov 2009 20:43:52 -0000 1.173
+++ top.c 25 Nov 2009 21:10:03 -0000
@@ -259,9 +259,6 @@ void (*deprecated_interactive_hook) (voi
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: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.227
diff -u -p -u -r1.227 valops.c
--- valops.c 10 Nov 2009 22:17:58 -0000 1.227
+++ valops.c 25 Nov 2009 21:10:03 -0000
@@ -861,8 +861,8 @@ value_assign (struct value *toval, struc
}
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;
Index: doc/observer.texi
===================================================================
RCS file: /cvs/src/src/gdb/doc/observer.texi,v
retrieving revision 1.27
diff -u -p -u -r1.27 observer.texi
--- doc/observer.texi 19 Oct 2009 09:51:42 -0000 1.27
+++ doc/observer.texi 25 Nov 2009 21:10:03 -0000
@@ -208,6 +208,11 @@ Either @value{GDBN} detached from the in
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.
Index: gdbtk/generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.49
diff -u -p -u -r1.49 gdbtk-hooks.c
--- gdbtk/generic/gdbtk-hooks.c 24 May 2009 08:38:27 -0000 1.49
+++ gdbtk/generic/gdbtk-hooks.c 25 Nov 2009 21:10:03 -0000
@@ -94,7 +94,8 @@ static void gdbtk_pre_add_symbol (const
static void gdbtk_print_frame_info (struct symtab *, int, int, int);
static void gdbtk_post_add_symbol (void);
static void gdbtk_register_changed (int regno);
-static void gdbtk_memory_changed (CORE_ADDR addr, int len);
+static void gdbtk_memory_changed (CORE_ADDR addr, int len,
+ const bfd_byte *data);
static void gdbtk_selected_frame_changed (int);
static void gdbtk_context_change (int);
static void gdbtk_error_begin (void);
@@ -129,6 +130,7 @@ gdbtk_add_hooks (void)
observer_attach_tracepoint_modified (gdbtk_modify_tracepoint);
observer_attach_tracepoint_deleted (gdbtk_delete_tracepoint);
observer_attach_architecture_changed (gdbtk_architecture_changed);
+ observer_attach_memory_changed (gdbtk_memory_changed);
/* Hooks */
deprecated_call_command_hook = gdbtk_call_command;
@@ -158,7 +160,6 @@ gdbtk_add_hooks (void)
deprecated_detach_hook = gdbtk_detach;
deprecated_register_changed_hook = gdbtk_register_changed;
- deprecated_memory_changed_hook = gdbtk_memory_changed;
deprecated_selected_frame_level_changed_hook = gdbtk_selected_frame_changed;
deprecated_context_hook = gdbtk_context_change;
@@ -393,7 +394,7 @@ gdbtk_register_changed (int regno)
}
static void
-gdbtk_memory_changed (CORE_ADDR addr, int len)
+gdbtk_memory_changed (CORE_ADDR addr, int len, const bfd_byte *data)
{
if (Tcl_Eval (gdbtk_interp, "gdbtk_memory_changed") != TCL_OK)
report_error ();
^ permalink raw reply [flat|nested] 7+ messages in thread
* [DOCO/PING] Re: [patch] Replace deprecated_memory_changed_hook with an observer.
2009-11-25 21:14 ` Paul Pluzhnikov
@ 2009-12-02 17:38 ` Joel Brobecker
2009-12-02 18:00 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2009-12-02 17:38 UTC (permalink / raw)
To: Paul Pluzhnikov, eliz; +Cc: gdb-patches
Hi Eli,
Just wondering if you are away or just missed this patch where your
feedback would be much appreciated :). If you're not around (no answer
for another couple of days), then I'll approve the doco part since the
change is small and has been waiting for a week now, and will personally
make sure that either Paul or myself immediately address any comment
you might have.
Paul,
please wait for another couple of days for Eli's feedback. If he's away,
then just go ahead and commit. We will address any comment when he gets
back.
On Wed, Nov 25, 2009 at 01:13:53PM -0800, Paul Pluzhnikov wrote:
> On Wed, Nov 25, 2009 at 12:48 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>
> > It looks like you forgot to remove the definition in top.c.
>
> Indeed. Fixed patch attached.
>
> Thanks,
> --
> Paul Pluzhnikov
>
> gdb/ChangeLog:
>
> 2009-11-25 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/doc/ChangeLog:
>
> 2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * observer.texi: New memory_changed observer.
>
> gdb/gdbtk/ChangeLog:
>
> 2009-11-25 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * generic/gdbtk-hooks.c (gdbtk_memory_changed): Adjust.
> (gdbtk_add_hooks): Adjust.
> Index: ada-lang.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/ada-lang.c,v
> retrieving revision 1.234
> diff -u -p -u -r1.234 ada-lang.c
> --- ada-lang.c 19 Nov 2009 22:45:56 -0000 1.234
> +++ ada-lang.c 25 Nov 2009 21:10:03 -0000
> @@ -2289,9 +2289,8 @@ ada_value_assign (struct value *toval, s
> 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: defs.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/defs.h,v
> retrieving revision 1.257
> diff -u -p -u -r1.257 defs.h
> --- defs.h 21 Oct 2009 18:02:25 -0000 1.257
> +++ defs.h 25 Nov 2009 21:10:03 -0000
> @@ -1108,7 +1108,6 @@ extern void (*deprecated_readline_begin_
> 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: interps.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/interps.c,v
> retrieving revision 1.32
> diff -u -p -u -r1.32 interps.c
> --- interps.c 6 Feb 2009 21:33:58 -0000 1.32
> +++ interps.c 25 Nov 2009 21:10:03 -0000
> @@ -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: top.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/top.c,v
> retrieving revision 1.173
> diff -u -p -u -r1.173 top.c
> --- top.c 5 Nov 2009 20:43:52 -0000 1.173
> +++ top.c 25 Nov 2009 21:10:03 -0000
> @@ -259,9 +259,6 @@ void (*deprecated_interactive_hook) (voi
> 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: valops.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/valops.c,v
> retrieving revision 1.227
> diff -u -p -u -r1.227 valops.c
> --- valops.c 10 Nov 2009 22:17:58 -0000 1.227
> +++ valops.c 25 Nov 2009 21:10:03 -0000
> @@ -861,8 +861,8 @@ value_assign (struct value *toval, struc
> }
>
> 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;
>
> Index: doc/observer.texi
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/observer.texi,v
> retrieving revision 1.27
> diff -u -p -u -r1.27 observer.texi
> --- doc/observer.texi 19 Oct 2009 09:51:42 -0000 1.27
> +++ doc/observer.texi 25 Nov 2009 21:10:03 -0000
> @@ -208,6 +208,11 @@ Either @value{GDBN} detached from the in
> 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.
> Index: gdbtk/generic/gdbtk-hooks.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
> retrieving revision 1.49
> diff -u -p -u -r1.49 gdbtk-hooks.c
> --- gdbtk/generic/gdbtk-hooks.c 24 May 2009 08:38:27 -0000 1.49
> +++ gdbtk/generic/gdbtk-hooks.c 25 Nov 2009 21:10:03 -0000
> @@ -94,7 +94,8 @@ static void gdbtk_pre_add_symbol (const
> static void gdbtk_print_frame_info (struct symtab *, int, int, int);
> static void gdbtk_post_add_symbol (void);
> static void gdbtk_register_changed (int regno);
> -static void gdbtk_memory_changed (CORE_ADDR addr, int len);
> +static void gdbtk_memory_changed (CORE_ADDR addr, int len,
> + const bfd_byte *data);
> static void gdbtk_selected_frame_changed (int);
> static void gdbtk_context_change (int);
> static void gdbtk_error_begin (void);
> @@ -129,6 +130,7 @@ gdbtk_add_hooks (void)
> observer_attach_tracepoint_modified (gdbtk_modify_tracepoint);
> observer_attach_tracepoint_deleted (gdbtk_delete_tracepoint);
> observer_attach_architecture_changed (gdbtk_architecture_changed);
> + observer_attach_memory_changed (gdbtk_memory_changed);
>
> /* Hooks */
> deprecated_call_command_hook = gdbtk_call_command;
> @@ -158,7 +160,6 @@ gdbtk_add_hooks (void)
> deprecated_detach_hook = gdbtk_detach;
>
> deprecated_register_changed_hook = gdbtk_register_changed;
> - deprecated_memory_changed_hook = gdbtk_memory_changed;
> deprecated_selected_frame_level_changed_hook = gdbtk_selected_frame_changed;
> deprecated_context_hook = gdbtk_context_change;
>
> @@ -393,7 +394,7 @@ gdbtk_register_changed (int regno)
> }
>
> static void
> -gdbtk_memory_changed (CORE_ADDR addr, int len)
> +gdbtk_memory_changed (CORE_ADDR addr, int len, const bfd_byte *data)
> {
> if (Tcl_Eval (gdbtk_interp, "gdbtk_memory_changed") != TCL_OK)
> report_error ();
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DOCO/PING] Re: [patch] Replace deprecated_memory_changed_hook with an observer.
2009-12-02 17:38 ` [DOCO/PING] " Joel Brobecker
@ 2009-12-02 18:00 ` Eli Zaretskii
2009-12-02 18:19 ` Joel Brobecker
2009-12-02 19:30 ` Paul Pluzhnikov
0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2009-12-02 18:00 UTC (permalink / raw)
To: Joel Brobecker; +Cc: ppluzhnikov, gdb-patches
> Date: Wed, 2 Dec 2009 09:37:44 -0800
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> Just wondering if you are away or just missed this patch where your
> feedback would be much appreciated :). If you're not around (no answer
> for another couple of days), then I'll approve the doco part since the
> change is small and has been waiting for a week now, and will personally
> make sure that either Paul or myself immediately address any comment
> you might have.
Sorry. I generally don't think I need to approve changes to
observer.texi, because it's not docs. It's code disguised as docs.
Go ahead and commit that part.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DOCO/PING] Re: [patch] Replace deprecated_memory_changed_hook with an observer.
2009-12-02 18:00 ` Eli Zaretskii
@ 2009-12-02 18:19 ` Joel Brobecker
2009-12-02 19:30 ` Paul Pluzhnikov
1 sibling, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2009-12-02 18:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: ppluzhnikov, gdb-patches
> Sorry. I generally don't think I need to approve changes to
> observer.texi, because it's not docs. It's code disguised as docs.
Understood. observer.texi is included by gdbint, so the contents
does go in a document, but I'm happy either way. Like I said, this
is not the most difficult part of the documentation to fix if there
is any issue.
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [DOCO/PING] Re: [patch] Replace deprecated_memory_changed_hook with an observer.
2009-12-02 18:00 ` Eli Zaretskii
2009-12-02 18:19 ` Joel Brobecker
@ 2009-12-02 19:30 ` Paul Pluzhnikov
1 sibling, 0 replies; 7+ messages in thread
From: Paul Pluzhnikov @ 2009-12-02 19:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Joel Brobecker, gdb-patches
On Wed, Dec 2, 2009 at 9:57 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> Go ahead and commit that part.
Thanks,
Retested on Linux/x86_64 and committed.
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-02 19:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-25 19:42 [patch] Replace deprecated_memory_changed_hook with an observer Paul Pluzhnikov
2009-11-25 20:48 ` Joel Brobecker
2009-11-25 21:14 ` Paul Pluzhnikov
2009-12-02 17:38 ` [DOCO/PING] " Joel Brobecker
2009-12-02 18:00 ` Eli Zaretskii
2009-12-02 18:19 ` Joel Brobecker
2009-12-02 19:30 ` Paul Pluzhnikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox