Re: [PATCH 2/2] gdb/testsuite: add inferior arguments test

Michael Weghorn
2020-05-20T16:28:41Z

I've just sent an updated patch series (v5).

On 19/05/2020 19.13, Simon Marchi wrote:
> On 2020-05-15 4:07 p.m., Pedro Alves via Gdb-patches wrote:
>> On 5/10/20 4:59 PM, Simon Marchi via Gdb-patches wrote:
>>
>>> +++ b/gdb/testsuite/gdb.base/inferior-args.c
>>> @@ -0,0 +1,8 @@
>>> +#include <stdio.h>
>>> +
>>> +int main(int argc, char **argv) {
>>> + for (int i = 0; i < argc; i++)
>>> + printf("[%d] %s\n", i, argv[i]);
>>> +
>>> + return 0;
>>> +}
>>
>> Formatting. Also missing copyright header.

Done in v5.

>>
>>> +standard_testfile .c
>>> +
>>> +if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
>>> + return
>>> +}
>>> +
>>> +clean_restart $binfile
>>
>> This seems unnecessary, since do_test already calls it.
>>
>> Otherwise, you can use prepare_for_testing here.

I've removed the extra call to 'clean_restart'.
>
> Thanks for the comments. Michael, would you mind addressing these changes
> in my patches in your branch?
>
> Simon

I've addressed the comments in this email, but so far not those in the
other thread:
https://sourceware.org/pipermail/gdb-patches/2020-May/168795.html

Please let me know if you want me to look at those as well. Handling
that wasn't straightforward to me. I'd have to dig deeper (in particular
how tcl works) in order to properly address those.

Michael