2012-04-24 Sergio Durigan Junior <sergiodj@redhat.com>
authorSergio Durigan Junior <sergiodj@redhat.com>
Tue, 24 Apr 2012 18:10:31 +0000 (18:10 +0000)
committerSergio Durigan Junior <sergiodj@redhat.com>
Tue, 24 Apr 2012 18:10:31 +0000 (18:10 +0000)
* observer.sh: Conditionally declare `args', thus cleaning up
unused instances of this variable.

gdb/ChangeLog
gdb/observer.sh

index 5b2b105ea49d8096ebbd8f0b6928353b52d62b4d..991792fea0a3be493ca0f30548ee1cf2274c0aa3 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-24  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       * observer.sh: Conditionally declare `args', thus cleaning up
+       unused instances of this variable.
+
 2012-04-24  Yao Qi  <yao@codesourcery.com>
 
        Revert this patch to allow breakpoint always-inserted
index b5c49ac93911f07490c7069e2f9b2433c5b0fefe..c98afd07ce0bb276e3405e7f0d70a801bc26c5c3 100755 (executable)
@@ -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 *