]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb
authorTom Tromey <tromey@redhat.com>
Mon, 21 Jul 2008 16:47:11 +0000 (16:47 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 21 Jul 2008 16:47:11 +0000 (16:47 +0000)
* 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.

gdb/ChangeLog
gdb/ada-lang.c
gdb/doc/ChangeLog
gdb/doc/observer.texi
gdb/exec.c
gdb/observer.sh
gdb/symfile.c
gdb/symtab.c

index 73c032ceec8127781938d5269259af9a4a1546d5..9bd9c8f1279d5fe438c42da27b5d877ddf554ac0 100644 (file)
@@ -1,3 +1,11 @@
+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>
 
index 0eecd90aadaf35655e812d3ff342a747841329fe..f3f1f3496241bb831c36d92705733050d65cbc87 100644 (file)
@@ -9769,7 +9769,7 @@ ada_exception_support_info_sniffer (void)
    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
index 3c6b66d3e14279e13b7b162defeb6a7dbe47b72c..5378fdb4675174e64e2a7e127509fd92e275f122 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 7d4d808b25eb30435f3f5e0db2553f9d8b4cdc9a..572f2370085060d0e2e83503cd0212482cecfb9e 100644 (file)
@@ -88,8 +88,6 @@ Send a notification to all @var{event} observers.
 
 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
@@ -98,7 +96,7 @@ The inferior has stopped for real.
 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,
@@ -141,4 +139,3 @@ The thread specified by @var{t} has exited.
 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
-
index 0bfad94757cc66366995c895dbb345ce1a95b5fc..ff9448182356dbbacfdd57434da566ce21b0ba50 100644 (file)
@@ -275,7 +275,7 @@ exec_file_attach (char *filename, int from_tty)
        (*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.
index 2b2eb159cca6d92e39081570f4d9730db1aeebc9..af32b98b313b96ae98b1fd3b34ebc8fc6ed3d2cc 100755 (executable)
@@ -123,8 +123,14 @@ EOF
 
 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)
 {
@@ -150,8 +156,17 @@ observer_detach_${event} (struct observer *observer)
 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);
index 12f17ac5bc2a5c2ac059e6664e952f62fea6f07c..1825641ccd126117a4008d08c49271b45c943d74 100644 (file)
@@ -2495,7 +2495,7 @@ reread_symbols (void)
       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 ();
     }
       
 }
index f676a0cc111e92ba073e83fc547afa149441438b..2ab520d515eb1ef041830d18e96e47d7190820ba 100644 (file)
@@ -4325,7 +4325,7 @@ main_name (void)
 /* 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);