From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +BgZJvMdhl+uFAAAWB0awg (envelope-from ) for ; Tue, 13 Oct 2020 17:36:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 99D521EF6F; Tue, 13 Oct 2020 17:36:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 42C8C1E58D for ; Tue, 13 Oct 2020 17:36:51 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3852385042A; Tue, 13 Oct 2020 21:36:50 +0000 (GMT) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by sourceware.org (Postfix) with ESMTPS id 7C702386101B for ; Tue, 13 Oct 2020 21:36:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7C702386101B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f65.google.com with SMTP id n6so1103139wrm.13 for ; Tue, 13 Oct 2020 14:36:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2ORUIawf3JDyPWLW4rLmJokxYPYZU/cZNLI2Yg/IC4w=; b=lOs/TiKXjDnuV85SfdoH6IB+QUBmANNMSsdCL6w1ZuIFfHZemCY3BAQVwChv4zNwVq GtENufVPKYb+Z0u1vJfYWZBRY5SsGrIQWpYz9TiNGJZX9idsQ2Ic9WkZx46hVGyjqLFm gkE2JBI/HXI+VeBo2NO4UWZJEkww7yK6yp/l4HwVk2wyGShR2R/lkaWxeXnv5I6uYm4k xLc7lodL7sACqg60JWlTdWz3tx7KWicKXTr5a7P3UqILHSHk60jszHlGbIgi48beQfnm WjVGLstqQj7SbWVkexcXT+0zbwbAyz5YbSR0b81aDHLfFhQCD7rouFbxnZq+HpSkrGel qPqw== X-Gm-Message-State: AOAM532xRBrpxE1bZyIlBlcbR/SE8xa+C7jSRd66owqZ6QBei14QO8Jx 2yC1G/na/tmEKP6NLY0QS1ORzUs8OdBBFg== X-Google-Smtp-Source: ABdhPJxrkfeicqGFzQBOEoeGOvfv5nFo6BPFvON9Ny3Li5DHadgjRjLBZPp62ACCv1gvKaTk9kfrfQ== X-Received: by 2002:adf:f101:: with SMTP id r1mr1881971wro.392.1602625006976; Tue, 13 Oct 2020 14:36:46 -0700 (PDT) Received: from ?IPv6:2001:8a0:f91e:6d00:c80a:ea25:47ef:5f73? ([2001:8a0:f91e:6d00:c80a:ea25:47ef:5f73]) by smtp.gmail.com with ESMTPSA id z127sm383691wmc.2.2020.10.13.14.36.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Oct 2020 14:36:45 -0700 (PDT) Subject: Re: [RESEND][PATCH 5/5] Eliminate mi_run_to_main, introduce mi_clean_restart To: Simon Marchi , gdb-patches@sourceware.org References: <20201012004732.22999-1-pedro@palves.net> <37fd1ff1-289d-a165-e408-0f48f452bb39@palves.net> <0e501a33-cd2a-d680-a1b4-a76a45d8cea1@simark.ca> From: Pedro Alves Message-ID: <6d6a7ad8-c6fe-4e35-d27c-bc165bcf9c82@palves.net> Date: Tue, 13 Oct 2020 22:36:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <0e501a33-cd2a-d680-a1b4-a76a45d8cea1@simark.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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