diff options
author | sergiodj <sergiodj> | 2012-04-24 18:10:29 +0000 |
---|---|---|
committer | sergiodj <sergiodj> | 2012-04-24 18:10:29 +0000 |
commit | be65e9c68e231536b1c486445c9cac33acfd7e6a (patch) | |
tree | 4d51800ed5d9ce44c5318cfed53ee3890b2c9865 /gdb/observer.sh | |
parent | 2e523a5f18498a902d55ae293cb3870d060f6a6b (diff) | |
download | gdb-be65e9c68e231536b1c486445c9cac33acfd7e6a.tar.gz |
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/observer.sh')
-rwxr-xr-x | gdb/observer.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/observer.sh b/gdb/observer.sh index b5c49ac9391..c98afd07ce0 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 * |