[PATCH 5/5] Make gdb_test's question non-optional if specified

Tom Tromey tom@tromey.com
Mon May 16 16:01:53 GMT 2022


>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:

Pedro> gdb_test supports handling scenarios where GDB asks a question before
Pedro> finishing handling some command.  The full prototype of gdb_test is:

Pedro>   # gdb_test COMMAND PATTERN MESSAGE QUESTION RESPONSE

I wonder if, after this patch, we can rewrite gdb_test to use ordinary
arguments and not parse 'args' by itself:

Like instead of:

    set command [lindex $args 0]
    set pattern [lindex $args 1]

Just write

    proc gdb_test {command pattern {message ""} {question ""} {response ""}}

... and then default 'message' when appropriate.

Tom


More information about the Gdb-patches mailing list