On 9/9/21 3:25 PM, Andrew Burgess wrote: > * Tom de Vries [2021-09-09 15:19:13 +0200]: > >> Hi, >> >> The documentation of mi_gdb_test states that the command, pattern and message >> arguments are mandatory: >> ... >> # mi_gdb_test COMMAND PATTERN MESSAGE [IPATTERN] -- send a command to gdb; >> # test the result. >> ... >> >> However, this is not checked, and when mi_gdb_test is called with less than 3 >> arguments, it passes or fails silently. >> >> Fix this by using the following semantics: >> - if there are less than 2 arguments, use the command as the message. >> - if there is less than 1 argument, use ".*" as the pattern. >> - if there are no or too much arguments, error out. > > I think this description is wrong, you mean: > > - if there are 2 arguments, ..... > - if there is just 1 argument, ..... > - if there are no or too many arguments, .... > > Otherwise, LGTM. > Thanks for the review. I've: - updated the log message - also fixed gdb.python/py-mi.exp - used the new proc string_list_to_regexp to get a bit more readable regexps Committed to trunk. Thanks, - Tom