Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Keith Seitz <keiths@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] gdb-events.sh: event notifications w/o args
Date: Fri, 10 Aug 2001 00:00:00 -0000	[thread overview]
Message-ID: <3B738662.30601@cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0108091351010.13552-100000@makita.cygnus.com>

> Hi,
> 
> It may happen (sometime soon  [;-)] that an event notification will occur
> with no arguments, e.g.,


Yes, ok (almost).  Can you just change the ``if'' to use the:

	if test ...
	then
	    ..
	fi

rather than

	if test ...; then
	    ..
	fi

so that it is consistent with the rest of the file (unless you can find 
a GNU SH SCRIPT coding standard which indicates otherwize :-).

I'm also trying to remember if TR has any portability issues (not your 
problem but your patch reminded me :-)

	Andrew


> 
> Keith
> 
> ChangeLog
> 2001-08-09  Keith Seitz  <keiths@redhat.com>
> 
> * gdb-events.sh: Deal with event notifications with no
>         arguments.
> 
> Patch
> Index: gdb-events.sh
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdb-events.sh,v
> retrieving revision 1.9
> diff -u -p -r1.9 gdb-events.sh
> --- gdb-events.sh	2001/06/07 20:18:45	1.9
> +++ gdb-events.sh	2001/08/09 20:57:02
> @@ -64,6 +64,7 @@ f:void:breakpoint_modify:int b:b
>  f:void:tracepoint_create:int number:number
>  f:void:tracepoint_delete:int number:number
>  f:void:tracepoint_modify:int number:number
> +f:void:foo_bar:void
>  #*:void:annotate_starting_hook:void
>  #*:void:annotate_stopped_hook:void
>  #*:void:annotate_signalled_hook:void
> @@ -419,11 +420,13 @@ 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,9 @@ 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 +522,19 @@ 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
> 
> 
> 



  reply	other threads:[~2001-08-10  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-09 13:58 Keith Seitz
2001-08-10  0:00 ` Andrew Cagney [this message]
2001-08-10  9:05   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B738662.30601@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=keiths@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox