aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2012-04-24 18:10:31 +0000
committerSergio Durigan Junior <sergiodj@redhat.com>2012-04-24 18:10:31 +0000
commit7fc7e0c3280f9c7c4f8447869b219627ec39d054 (patch)
treef94e094c57598594cfe19785271f6d6f73af66ba /gdb
parent838a716d664fedcdcffde1a2ae7a4a129a3947be (diff)
downloadgdb-7fc7e0c3280f9c7c4f8447869b219627ec39d054.zip
gdb-7fc7e0c3280f9c7c4f8447869b219627ec39d054.tar.gz
gdb-7fc7e0c3280f9c7c4f8447869b219627ec39d054.tar.bz2
2012-04-24 Sergio Durigan Junior <sergiodj@redhat.com>
* observer.sh: Conditionally declare `args', thus cleaning up unused instances of this variable.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rwxr-xr-xgdb/observer.sh11
2 files changed, 15 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5b2b105..991792f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/observer.sh b/gdb/observer.sh
index b5c49ac..c98afd0 100755
--- a/gdb/observer.sh
+++ b/gdb/observer.sh
@@ -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 *