* symfile.c (reread_symbols): Don't pass argument to observer.
* exec.c (exec_file_attach): Don't pass argument to observer.
* ada-lang.c (ada_executable_changed_observer): Remove argument.
* symtab.c (symtab_observer_executable_changed): Remove argument.
* observer.sh: Handle functions with no arguments.
gdb/doc
* observer.texi (GDB Observers): Remove obsolete comment.
<executable_changed>: Remove argument.
+2008-07-21 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (reread_symbols): Don't pass argument to observer.
+ * exec.c (exec_file_attach): Don't pass argument to observer.
+ * ada-lang.c (ada_executable_changed_observer): Remove argument.
+ * symtab.c (symtab_observer_executable_changed): Remove argument.
+ * observer.sh: Handle functions with no arguments.
+
2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
Chris Demetriou <cgd@google.com>
each time a new executable is loaded by GDB. */
static void
-ada_executable_changed_observer (void *unused)
+ada_executable_changed_observer (void)
{
/* If the executable changed, then it is possible that the Ada runtime
is different. So we need to invalidate the exception support info
+2008-07-21 Tom Tromey <tromey@redhat.com>
+
+ * observer.texi (GDB Observers): Remove obsolete comment.
+ <executable_changed>: Remove argument.
+
2008-07-18 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Macros): Update. Use @code rather than @command.
The following observable events are defined:
-@c note: all events must take at least one parameter.
-
@deftypefun void normal_stop (struct bpstats *@var{bs})
The inferior has stopped for real.
@end deftypefun
The target's register contents have changed.
@end deftypefun
-@deftypefun void executable_changed (void *@var{unused_args})
+@deftypefun void executable_changed (void)
The executable being debugged by GDB has changed: The user decided
to debug a different program, or the program he was debugging has
been modified since being loaded by the debugger (by being recompiled,
The target was resumed. The @var{ptid} parameter specifies which
thread was resume, and may be RESUME_ALL if all threads are resumed.
@end deftypefun
-
(*deprecated_exec_file_display_hook) (filename);
}
bfd_cache_close_all ();
- observer_notify_executable_changed (NULL);
+ observer_notify_executable_changed ();
}
/* Process the first arg in ARGS as the new exec file.
static struct observer_list *${event}_subject = NULL;
+EOF
+ if test "$formal" != "void"; then
+ cat<<EOF >>${otmp}
struct ${event}_args { `echo "${formal}" | sed -e 's/,/;/g'`; };
+EOF
+ fi
+ cat <<EOF >>${otmp}
static void
observer_${event}_notification_stub (const void *data, const void *args_data)
{
void
observer_notify_${event} (${formal})
{
+EOF
+ if test "$formal" != "void"; then
+ cat<<EOF >>${otmp}
struct ${event}_args args;
`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args.\1 = \1/g'`;
+
+EOF
+ else
+ echo "char *args = NULL;" >> ${otmp}
+ fi
+ cat<<EOF >>${otmp}
if (observer_debug)
fprintf_unfiltered (gdb_stdlog, "observer_notify_${event}() called\n");
generic_observer_notify (${event}_subject, &args);
clear_symtab_users ();
/* At least one objfile has changed, so we can consider that
the executable we're debugging has changed too. */
- observer_notify_executable_changed (NULL);
+ observer_notify_executable_changed ();
}
}
/* Handle ``executable_changed'' events for the symtab module. */
static void
-symtab_observer_executable_changed (void *unused)
+symtab_observer_executable_changed (void)
{
/* NAME_OF_MAIN may no longer be the same, so reset it for now. */
set_main_name (NULL);