From: Andrew Cagney <ac131313@cygnus.com>
To: Keith Seitz <keiths@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC/A] testsuite/gdb.c++/ref-types.exp "cleanup"
Date: Fri, 19 Oct 2001 15:12:00 -0000 [thread overview]
Message-ID: <3BD0A54C.4010005@cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0110191126120.18666-100000@makita.cygnus.com>
> On Fri, 19 Oct 2001, Andrew Cagney wrote:
>
>
>> > +set pattern {.[0-9]* = \(short (int)? &\) @}
>> > +append pattern "$hex: -1"
>
>>
>> Is there another way of doing this bit? I'm finding it more confusing
>> then all the escape characters?
>
>
> Well, there is, but I don't think anyone would like it any better:
>
> gdb_test {print foo} [format {%s %s} {.[0-9]* = \(short( int?) &\)} "@$hex: -1"] \
> {print foo test}
There has to be something better. Look at some of the patters in MI.
They read ``blah $hex more blah $hex even more blah $hex even more blah
$hex''. While all those escape characters are bad I think this
construct a pattern bit by bit approach is worse.
> This is a common tcl thing to do, but, well, I'm not sure it's any better
> for, how did someone put it? "beginners". (IMO, the "beginner" thing is a
> cop out.)
Think of it more as making the testsuite contributor friendly. People
create test cases by cloning existing code. People don't create test
cases by reading the TCL manual.
Can functions like gdb_expect_list and the like be changed to convert
their ``string'' into a fixed pattern before passing things on?
Andrew
next prev parent reply other threads:[~2001-10-19 15:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-18 22:52 Keith Seitz
2001-10-19 8:28 ` Andrew Cagney
2001-10-19 11:29 ` Keith Seitz
2001-10-19 15:12 ` Andrew Cagney [this message]
2001-10-21 12:15 ` Keith Seitz
2001-10-19 12:36 ` Michael Snyder
2001-10-19 12:58 ` Keith Seitz
2001-10-19 9:08 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=3BD0A54C.4010005@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