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.133.124]) by sourceware.org (Postfix) with ESMTPS id C412A3858C62 for ; Fri, 25 Aug 2023 15:34:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C412A3858C62 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=1692977691; 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=0YX17UZIzsuWEAOwJNjXxGclgWspi7O6MKhnWqouFXk=; b=FLc+kMX7mX22U6o8R6u2Ab+jpV4eS4mTf2c9PZcS68BaX5W/tJ5oEpa5BDnmJYU++W2J0R +Zh95xXRUdl/9m0uB33mLw98C7QRP5Sh+05KbpohJGh67wudzWlHKFqDsTW+7+ceDBzoQG +8r3y/S0fvsR7e/arGF3addLwacXoTw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-aTXAxBVQNAagxNeBTQsiKA-1; Fri, 25 Aug 2023 11:34:50 -0400 X-MC-Unique: aTXAxBVQNAagxNeBTQsiKA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fe19cf2796so7783685e9.0 for ; Fri, 25 Aug 2023 08:34:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692977688; x=1693582488; 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=0YX17UZIzsuWEAOwJNjXxGclgWspi7O6MKhnWqouFXk=; b=WQeb1O0IjK227CBLmwWUtgh+GybYIno2pAzTLLbzpNTDN4Zp/ea20cyx98b3BhMF65 a8gh1QSkJ7+z6+R+jD/k6n4c+k48t37FSYC2HAs/EZGUpZB3hDRpY3PZIu+sRoUyyRtI IxiQGmfWU0pIA15zLiU0R5LALSMBhVQCxcHPSbX/JKp8xAJHJHZxYRALNTPadQ8DcqsU oHt2KK+pmlOowNS1fOZIw75TfA1F4KDNyq2ONwe1BFHYuapXdiCtctLAKAfoyPp7vOim ObEiB6WfavOcj3ork1In5T2YuVcr94xUKPG+87k8GOpZxehhzFJQz0Z8DWNhkebH+vly Is7Q== X-Gm-Message-State: AOJu0YyZ8uKnc3GjkhPszxPJk/QRJQA+oCY6FM9yJOQc7qAgoQFEdaEk zBE3X8Cx7mmzEfbaTHr0yZNaxAm60hsp3CKrUvKQjnIwflD/xxf9WNMRQYR+k2McpjoQ9fU4UAk 1B9YEide/PdKNwbqvDdId+aFpJw+HDj+JcHvcgRMoolF0X6gb8I/UgZZAem/7QaYWCrhuUnek7I RJFov/9A== X-Received: by 2002:a7b:cbd6:0:b0:401:5443:5591 with SMTP id n22-20020a7bcbd6000000b0040154435591mr4121371wmi.20.1692977688659; Fri, 25 Aug 2023 08:34:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvzYtpZaIhG2b+WxErqoR21opyJ5Jp7Z2d5Iua9R5DO1wKAEysiVic9b7iRNXXFqkwmYF3yQ== X-Received: by 2002:a7b:cbd6:0:b0:401:5443:5591 with SMTP id n22-20020a7bcbd6000000b0040154435591mr4121355wmi.20.1692977688340; Fri, 25 Aug 2023 08:34:48 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id q20-20020a7bce94000000b003fedcd02e2asm2496949wmj.35.2023.08.25.08.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 08:34:47 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 01/10] gdb: have remote_target::extended_remote_run take the exec filename Date: Fri, 25 Aug 2023 16:34:34 +0100 Message-Id: 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.9 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 7abe08439b5..bbe81ccb54f 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