From fd969be2aa42916f03790f1be65350fea5fce896 Mon Sep 17 00:00:00 2001 From: Keith Seitz Date: Fri, 10 Aug 2001 16:05:30 +0000 Subject: [PATCH] * gdb-events.sh: Deal with event notifications with no arguments. --- gdb/ChangeLog | 5 +++++ gdb/gdb-events.sh | 41 ++++++++++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5e6b10bf53..74cad45128 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-08-10 Keith Seitz + + * gdb-events.sh: Deal with event notifications with no + arguments. + 2001-08-10 Orjan Friberg * remote.c (read_frame): Correct off-by-one error in condition. 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