From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>,
Simon Marchi <simon.marchi@polymtl.ca>,
<gdb-patches@sourceware.org>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: Re: [PATCH v3 2/2] Add test for user context selection sync
Date: Mon, 03 Oct 2016 17:48:00 -0000 [thread overview]
Message-ID: <187d9575-50f8-d877-7378-72cbc5c2da5e@ericsson.com> (raw)
In-Reply-To: <22ae2259-f47d-4ea0-53fc-510aa9b6f45c@redhat.com>
On 16-10-03 01:10 PM, Pedro Alves wrote:
> On 09/24/2016 09:13 PM, Simon Marchi wrote:
>
>> +set main_break_line [gdb_get_line_number "main break line"]
>> +set thread_loop_line [gdb_get_line_number "thread loop line"]
>> +set thread_caller_line [gdb_get_line_number "thread caller line"]
>> +
>> +# Call PROCNAME with the given arguments, inside a with_test_prefix $procname
>> +# block.
>> +
>> +proc with_test_prefix_procname { procname args } {
>> + with_test_prefix $procname {
>> + # Note: this syntax requires TCL 8.5, if we need to support 8.4,
>> + # we'll need to find an alternative.
>> + $procname {*}$args
>> + }
>> +}
>
> An alternative (not talking about TCL 8.5 here), would be to
> go the gdb_caching_proc way. That is, something like:
>
> proc prefixed_proc {name body} {
> ...
> }
>
> .. and then define the procs that you want to prefix with
> prefixed_proc instead of proc.
Interesting, I hadn't thought of that.
> But either way is fine with me.
>
> I mildly dislike using the proc names as prefix strings as it feels
> like implementation details leaking, but as long as the proc names are
> clear enough, I won't really complain about it. Who knows, I may even
> grow to like it. :-)
I agree about the principle. While developing though, I found it was very
useful since it allowed to jump directly to the right procedure.
>> + # When using mi_expect_stop, we don't expect a prompt after the *stopped
>> + # event, since the blocking commands are done from the CLI. Seting async to
>> + # 1 makes it not expect the prompt.
>> + set async 1
>
> "Setting".
Fixed.
Thanks,
Simon
next prev parent reply other threads:[~2016-10-03 17:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-24 21:45 [PATCH v3 1/2] Emit inferior, thread and frame selection events to all UIs Simon Marchi
2016-09-24 20:13 ` [PATCH v3 2/2] Add test for user context selection sync Simon Marchi
2016-10-03 17:10 ` Pedro Alves
2016-10-03 17:48 ` Simon Marchi [this message]
2016-09-25 12:41 ` [PATCH v3 1/2] Emit inferior, thread and frame selection events to all UIs Eli Zaretskii
2016-09-26 2:25 ` Simon Marchi
2016-10-03 16:47 ` Pedro Alves
2016-10-03 17:40 ` Simon Marchi
2016-10-03 21:03 ` Simon Marchi
2016-12-08 12:02 ` Thomas Schwinge
2016-12-08 15:25 ` Simon Marchi
2016-12-09 6:22 ` Thomas Schwinge
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=187d9575-50f8-d877-7378-72cbc5c2da5e@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
/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