[PATCH 3/5] gdb/testsuite/: Use -qualified in runto_main / mi_runto_main

Simon Marchi simark@simark.ca
Tue Oct 13 18:06:30 GMT 2020


On 2020-10-11 8:47 p.m., Pedro Alves wrote:
> diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
> index 732aed27b27..693c7d2c467 100644
> --- a/gdb/testsuite/lib/mi-support.exp
> +++ b/gdb/testsuite/lib/mi-support.exp
> @@ -1056,7 +1056,7 @@ proc mi_run_to_main { } {
>  #   -1  if test suppressed, failed, timedout
>  #    0  if test passed
>
> -proc mi_runto_helper {func run_or_continue} {
> +proc mi_runto_helper {func run_or_continue {qualified 0}} {

For new options, I'd suggest using the parse_args procedure, instead of
using arguments with default values.  That makes it nicer when a
procedure has multiple optional arguments and want to specifiy just one
(that isn't the first one).

So a call to mi_runto_helper would look like:

  mi_runto_helper main run -qualified

Otherwise, LGTM.

Simon


More information about the Gdb-patches mailing list