This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 2/2] Add test for user context selection sync
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org
- Cc: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- Date: Mon, 3 Oct 2016 18:10:00 +0100
- Subject: Re: [PATCH v3 2/2] Add test for user context selection sync
- Authentication-results: sourceware.org; auth=none
- References: <20160924201331.23605-1-simon.marchi@polymtl.ca> <20160924201331.23605-2-simon.marchi@polymtl.ca>
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.
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. :-)
> + # 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".
This is OK as is with the typo fixed.
Thanks,
Pedro Alves