Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Elizabeth Chastain <mec@shout.net>
To: ac131313@redhat.com, drow@mvista.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: gdb_test_multiple
Date: Sun, 05 Jan 2003 16:33:00 -0000	[thread overview]
Message-ID: <200301051633.h05GX2C18873@duracef.shout.net> (raw)

Daniel Jacobowitz writes:

  set msg "breakpoint on Foo::Bar"
  gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" {
  ... fail "$msg ...
  }

This can be improved to:

  set msg "breakpoint on Foo::Bar"
  gdb_test_multiple "break Foo::Bar" $msg {
  ... fail $msg ...
  }

The grammar would still allow different messages for the explicit
messages given by the caller versus the internal messages generated
by gdb_test_multiple.  But the normal idiom would have one $msg.

  gdb_test_multiple "break Foo::Bar" "breakpoint on Foo::Bar" \
    "Breakpoint at .*\[\r\n\]$gdb_prompt $" { pass $msg } \
    "Bang." { kfail "gdb/90211" $msg }

Err, I like my treatment of $msg better, I dislike subroutines that
create variables like this for little inferior blocks of code.
But maybe I have poor taste in TCL style.

Michael C


             reply	other threads:[~2003-01-05 16:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-05 16:33 Michael Elizabeth Chastain [this message]
2003-01-05 16:46 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2003-01-07  4:33 Michael Elizabeth Chastain
2003-01-05 17:45 Michael Elizabeth Chastain
2003-01-05 16:54 Michael Elizabeth Chastain
2003-01-05 17:38 ` Daniel Jacobowitz
2003-01-05  5:25 Michael Elizabeth Chastain
2003-01-04 20:16 Daniel Jacobowitz
2003-01-05 15:32 ` Andrew Cagney
2003-01-05 15:42   ` Daniel Jacobowitz
2003-01-06 21:12     ` Andrew Cagney
2003-01-07  3:25       ` Daniel Jacobowitz

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=200301051633.h05GX2C18873@duracef.shout.net \
    --to=mec@shout.net \
    --cc=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.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