add bug number to previous commit
[deliverable/binutils-gdb.git] / gdb / observer.sh
index ba8ba4e192fee279325064578bf5a9be05b8577c..3ff28a8eab1d536adb69a674d2acf1d7fcd800a0 100755 (executable)
@@ -29,8 +29,7 @@ rm -f ${otmp}
 cat <<EOF >>${otmp}
 /* GDB Notifications to Observers.
 
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2004-2013 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -64,6 +63,7 @@ struct bpstats;
 struct so_list;
 struct objfile;
 struct thread_info;
+struct inferior;
 EOF
         ;;
 esac
@@ -136,8 +136,17 @@ static void
 observer_${event}_notification_stub (const void *data, const void *args_data)
 {
   observer_${event}_ftype *notify = (observer_${event}_ftype *) data;
+EOF
+
+       notify_args=`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`
+
+       if test ! -z "${notify_args}"; then
+           cat<<EOF >>${otmp}
   const struct ${event}_args *args = args_data;
-  notify (`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`);
+EOF
+       fi
+       cat <<EOF >>${otmp}
+  notify (${notify_args});
 }
 
 struct observer *
This page took 0.023261 seconds and 4 git commands to generate.