From patchwork Wed Aug 16 15:54:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 74211 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0133E38555B6 for ; Wed, 16 Aug 2023 15:55:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0133E38555B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692201352; bh=vP8vvx4xpmPDDtb/LVYjKULZUzgyYCnccwbgHlrJtD0=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=cDfH55R2zLYLsB0W0D/KghCR7j4Bpg7LISjeVk/aOcZA50cEW05g/U3HfiCdWtu3f /fSNpi7k6dgHcXUT1WCGBSj6y0J0tSQh+eywaru14rd8r2aAK52BuKNGxAC2LdA7+m HeVqqtY0gfd1O4NgGdvMw12su/HdIxQME0/JuGa4= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 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) 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 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 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: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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