From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CC3DB3857706 for ; Wed, 16 Aug 2023 15:55:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC3DB3857706 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692201313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vP8vvx4xpmPDDtb/LVYjKULZUzgyYCnccwbgHlrJtD0=; b=RSY84h3FhElXKx+HkelNBRRfPVRAa3jUbZbR3MMBWNWnvLmauo9xsBcONDvj47Zp9D+m+b XbDK06HpVwQHw1eX2nBhrAj3QwZwJ/XFPgSKOtqZ/TWRblnHDZtgPkRS03HbErBYuz4K7E 3ttPK2WEPLt80pf/LERo13Kzv24Kbf4= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-683-MPkk56aFNqijsv7Y702uYw-1; Wed, 16 Aug 2023 11:55:12 -0400 X-MC-Unique: MPkk56aFNqijsv7Y702uYw-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-4ff93641409so711854e87.3 for ; Wed, 16 Aug 2023 08:55:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692201310; x=1692806110; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vP8vvx4xpmPDDtb/LVYjKULZUzgyYCnccwbgHlrJtD0=; b=RZpnYg0R+Uh/z3w8BM3x9uOsRUAkWU4RZK2cj/seAQWT/0gZIVLkIy/xTkj5Pq0VyT R1aBoXWBQXF8/Haa/sy9LcTahrm97/LUv4kWyr3gTYDiOkNYpelBlfZONSTH2XD/Vvjh 3sCLKIbaGWEso0nO3+g51kTzCNTLu/zFCt/ooVxewxJo863ShRN5+/RqyByGMBozKFrD /GH8Y+E0hkFAiUF4fa3toikXjicb2KJgwNU76ubB6hJvAODY688GZ44xOOfonxeDp4GW X09R7E/v6Ot0CrY63phc5O0WqFUZAYiWPEGvNMR3IbjbUoKnXYeAtTVsqSw+gh34D6m4 KxXA== X-Gm-Message-State: AOJu0YxsG+a1qTP8gHhtfQJqHjgU7UZfwRuHkQXMCbG212wYo35kH/9T WvXbmr3/80fj/gt9KNLzbcyBXF0zG9Zp8l+P4SoDHqTwmfgEBPYTF+OepbV2OIu3oG0YazHxkUX iwae5rf/u0FUZHbqtbwLrgXAUUKQELa4nARvjVkrhfT2G5sgKqHX9AxVTrTtqsUr6NDEnt6bAiE OsN7+z0w== X-Received: by 2002:a05:6512:4016:b0:4f9:570c:7b28 with SMTP id br22-20020a056512401600b004f9570c7b28mr2477653lfb.32.1692201310634; Wed, 16 Aug 2023 08:55:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0AXwLtWH3Q6WiBIGdxF74NMO1JgU8aCy+GTCjnwGqiu+JiNso5CtLAaYUQnftzCazclcmig== X-Received: by 2002:a05:6512:4016:b0:4f9:570c:7b28 with SMTP id br22-20020a056512401600b004f9570c7b28mr2477627lfb.32.1692201310232; Wed, 16 Aug 2023 08:55:10 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id kd28-20020a17090798dc00b009937e7c4e54sm8715653ejc.39.2023.08.16.08.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 08:55:09 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 01/10] gdb: have remote_target::extended_remote_run take the exec filename Date: Wed, 16 Aug 2023 16:54:57 +0100 Message-Id: <6c1b1e9fa07b4bb4842e9ee7385d33ada3af6c9d.1692200989.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Small refactor, have remote_target::extended_remote_run take the name of the executable to run rather than looking it up directly, the one caller of this function has already looked up the remote-exec filename. There should be no user visible changes after this commit. --- gdb/remote.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 6fefabac0ce..2b52ccb2555 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1223,7 +1223,8 @@ class remote_target : public process_stratum_target void remote_kill_k (); void extended_remote_disable_randomization (int val); - int extended_remote_run (const std::string &args); + int extended_remote_run (const char *remote_exec_file, + const std::string &args); void send_environment_packet (const char *action, const char *packet, @@ -10448,11 +10449,11 @@ remote_target::extended_remote_disable_randomization (int val) } int -remote_target::extended_remote_run (const std::string &args) +remote_target::extended_remote_run (const char *remote_exec_file, + const std::string &args) { struct remote_state *rs = get_remote_state (); int len; - const char *remote_exec_file = get_remote_exec_file (); /* If the user has disabled vRun support, or we have detected that support is not available, do not try it. */ @@ -10647,7 +10648,7 @@ Remote replied unexpectedly while setting startup-with-shell: %s"), extended_remote_set_inferior_cwd (); /* Now restart the remote server. */ - run_worked = extended_remote_run (args) != -1; + run_worked = extended_remote_run (remote_exec_file, args) != -1; if (!run_worked) { /* vRun was not supported. Fail if we need it to do what the -- 2.25.4