From: Pedro Alves <palves@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [RFC][gdb/testsuite] Add -lbl option in gdb_test_multiple
Date: Mon, 02 Mar 2020 13:34:00 -0000 [thread overview]
Message-ID: <26825c16-2c26-8052-c01c-ecdfaf43bfea@redhat.com> (raw)
In-Reply-To: <4acd7ab7-7aae-c816-8fd9-830980888ac2@suse.de>
On 3/1/20 9:08 AM, Tom de Vries wrote:
> On 27-02-2020 17:02, Pedro Alves wrote:
>> Alternatively, if you don't like the -lbl within the {} block, and if
>> we're going to use "-" options, how about supporting them before
>> the {} user code block, so that the user code block is always
>> at the end? Like:
>>
>> gdb_test_multiple "command" "testname" -lbl {
>> ...
>> }
>>
>> gdb_test_multiple "command" "testname" -prompt $prompt_regexp {
>> ...
>> }
>>
>> That should be doable with:
>>
>> -proc gdb_test_multiple { command message user_code { prompt_regexp "" } } {
>> +proc gdb_test_multiple { command message args } {
>>
>> and then walking the $args list, processing "-" arguments, and interpreting
>> the first non-"-" argument as the user code block (and erroring out if there
>> are more arguments). I think the gdb_test_multiple code would look quite similar
>> to your patch, except that the user_code parameter would no longer be a parameter,
>> instead it would be a local variable set to the first non-"-" element of $args.
>
> Yes, I like that suggestion.
>
> Implemented and attached below.
>
> OK for trunk.
OK.
Thanks,
Pedro Alves
prev parent reply other threads:[~2020-03-02 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 17:40 [PATCH][gdb/testsuite] Fix corefile-buildid.exp with check-read1 Tom de Vries
2020-02-19 20:09 ` Pedro Alves
2020-02-19 21:30 ` [RFC][gdb/testsuite] Handle -line and -non-empty-line in gdb_test_multiple Tom de Vries
2020-02-20 13:28 ` Pedro Alves
2020-02-21 15:35 ` [RFC][gdb/testsuite] Add -lbl option " Tom de Vries
2020-02-27 16:03 ` Pedro Alves
2020-03-01 9:08 ` Tom de Vries
2020-03-02 13:34 ` Pedro Alves [this message]
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=26825c16-2c26-8052-c01c-ecdfaf43bfea@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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