[RESEND][PATCH 5/5] Eliminate mi_run_to_main, introduce mi_clean_restart
Pedro Alves
pedro@palves.net
Tue Oct 13 21:36:44 GMT 2020
On 10/13/20 7:19 PM, Simon Marchi wrote:
> On 2020-10-12 2:56 p.m., Pedro Alves wrote:
>> diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
>> index 693c7d2c467..0de3aa8703a 100644
>> --- a/gdb/testsuite/lib/mi-support.exp
>> +++ b/gdb/testsuite/lib/mi-support.exp
>> @@ -1023,28 +1023,41 @@ proc mi_run_with_cli {args} {
>> return [eval mi_run_cmd_full 0 $args]
>> }
>>
>> -#
>> -# Just like run-to-main but works with the MI interface
>> -#
>> -
>> -proc mi_run_to_main { } {
>> - global suppress_flag
>> - if { $suppress_flag } {
>> - return -1
>> - }
>> +# Starts fresh GDB binary and loads an optional executable into GDB.
>> +# Usage: mi_clean_restart [executable]
>> +# EXECUTABLE is the basename of the binary.
>> +# Return -1 if starting gdb or loading the executable failed.
>>
>> +proc mi_clean_restart { args } {
>
> Again, for a new optional argument I'd suggest using parse_args,
> meaning calling mi_clean_restart with an explicit binfile would be:
>
> mi_clean_restart -binfile ${binfile}
>
> But, this is not very important, the next person to add an argument to
> mi_clean_restart can do it (if it ever happens). The patch LGTM as it
> is.
Yeah, I left this one as is to have it mirror the CLI's clean_restart.
Thanks for the quick reviews. I've merged the series now.
Pedro Alves
More information about the Gdb-patches
mailing list