Testsuite: Fix ambiguous "break" due to libinproctrace
[deliverable/binutils-gdb.git] / gdb / observer.sh
index 38c2bf1d5ac7421add44fc07ead829c6fe0e4fa9..fa3dcc505fc4bf8b756ebd3e17e25aad7214a849 100755 (executable)
@@ -2,8 +2,8 @@
 
 # Make certain that the script is not running in an internationalized
 # environment.
-LANG=c ; export LANG
-LC_ALL=c ; export LC_ALL
+LANG=C ; export LANG
+LC_ALL=C ; export LC_ALL
 
 if test $# -ne 3
 then
@@ -29,7 +29,7 @@ rm -f ${otmp}
 cat <<EOF >>${otmp}
 /* GDB Notifications to Observers.
 
-   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2004-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -63,6 +63,8 @@ struct bpstats;
 struct so_list;
 struct objfile;
 struct thread_info;
+struct inferior;
+struct trace_state_variable;
 EOF
         ;;
 esac
@@ -135,8 +137,17 @@ static void
 observer_${event}_notification_stub (const void *data, const void *args_data)
 {
   observer_${event}_ftype *notify = (observer_${event}_ftype *) data;
-  const struct ${event}_args *args = args_data;
-  notify (`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`);
+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 = (const struct ${event}_args *) args_data;
+EOF
+       fi
+       cat <<EOF >>${otmp}
+  notify (${notify_args});
 }
 
 struct observer *
This page took 0.024935 seconds and 4 git commands to generate.