summaryrefslogtreecommitdiffstats
path: root/gdb/gdb-events.sh
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-08-10 16:05:30 +0000
committerKeith Seitz <keiths@redhat.com>2001-08-10 16:05:30 +0000
commitfd969be2aa42916f03790f1be65350fea5fce896 (patch)
tree1e3023f6770c76e2d2cbafa1fc9a026fa4929f1f /gdb/gdb-events.sh
parent0218d1e4c25fb3aecc216393a6b3de08dd88d310 (diff)
downloadppe42-binutils-fd969be2aa42916f03790f1be65350fea5fce896.tar.gz
ppe42-binutils-fd969be2aa42916f03790f1be65350fea5fce896.zip
* gdb-events.sh: Deal with event notifications with no
arguments.
Diffstat (limited to 'gdb/gdb-events.sh')
-rwxr-xr-xgdb/gdb-events.sh41
1 files changed, 26 insertions, 15 deletions
diff --git a/gdb/gdb-events.sh b/gdb/gdb-events.sh
index d4713eccb5..6c576f813c 100755
--- a/gdb/gdb-events.sh
+++ b/gdb/gdb-events.sh
@@ -419,11 +419,14 @@ function_list | while eval read $read
do
case "${class}" in
"f" )
- echo "struct ${function}"
- echo " {"
- echo " `echo ${formal} | tr '[,]' '[;]'`;"
- echo " };"
- echo ""
+ if test ${actual}
+ then
+ echo "struct ${function}"
+ echo " {"
+ echo " `echo ${formal} | tr '[,]' '[;]'`;"
+ echo " };"
+ echo ""
+ fi
;;
esac
done
@@ -441,7 +444,10 @@ function_list | while eval read $read
do
case "${class}" in
"f" )
- echo " struct ${function} ${function};"
+ if test ${actual}
+ then
+ echo " struct ${function} ${function};"
+ fi
;;
esac
done
@@ -517,15 +523,20 @@ do
case "${class}" in
"f" )
echo " case ${function}:"
- echo " vector->${function}"
- sep=" ("
- ass=""
- for arg in `echo ${actual} | tr '[,]' '[:]' | tr -d '[ ]'`; do
- ass="${ass}${sep}event->data.${function}.${arg}"
- sep=",
- "
- done
- echo "${ass});"
+ if test ${actual}
+ then
+ echo " vector->${function}"
+ sep=" ("
+ ass=""
+ for arg in `echo ${actual} | tr '[,]' '[:]' | tr -d '[ ]'`; do
+ ass="${ass}${sep}event->data.${function}.${arg}"
+ sep=",
+ "
+ done
+ echo "${ass});"
+ else
+ echo " vector->${function} ();"
+ fi
echo " break;"
;;
esac
OpenPOWER on IntegriCloud