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 046C33857352 for ; Wed, 16 Aug 2023 15:55:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 046C33857352 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=1692201329; 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=GdsH7a2xA1z6DWdEkTuJoSM08FjM7c9yUSzd8rJVoYg=; b=QAXBWJvhWHTvOxyJwB+IaHEQo/l4fSa53W3r6RFuTAQ6IOdSW+QfJ3jFK9dQ8QL0ofhvOu RQKZhPg7ifsVxGO8sQowAwocHUfPTnm2ewP5ozWSyyJrbMoVmHHIuYXzN7mKtFQm74fkeV 0L8E9a96qb8piPwJVUK3FBRxcFzT9Dw= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-135-ycGAP8xnPLmDW9jumhVfKQ-1; Wed, 16 Aug 2023 11:55:26 -0400 X-MC-Unique: ycGAP8xnPLmDW9jumhVfKQ-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5231d9f9e53so4578871a12.1 for ; Wed, 16 Aug 2023 08:55:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692201325; x=1692806125; 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=GdsH7a2xA1z6DWdEkTuJoSM08FjM7c9yUSzd8rJVoYg=; b=bedol3bgr75cSDx1jqPa4LKHHI1N7EbQC6uPmZc/PiW+KV78WEeU9qRu0JLjexGHac MEfAIVwfduW4d6l3LaYIKJdQOmJj4ddFMJ1QrRSJ7CEXRacXFsPkBToi8zd/+7qmGIzk MLQOUD0ZJQES3m6Rg5jlxrcmnouwnEwnOf077APv21pA/JIHD4mQFKH7J2sfwVQBsnJM FeGSQYTPPE8cSZ3ro5xrayRyiKzU27zWB6zHzNyYPQGwXpbIU7MzR5HDe/Ypcfhn0wMW WnKHPwCug7daY+Xldgepdx0socReDOd+sy90p3qxtDiiMu0HqsR1exIe6E7Afjn9z8RD vEgA== X-Gm-Message-State: AOJu0YyWPZF/kwj69uvLa0UdgKWVoOxUvglW0OURtlE+XsTwVNsViG/1 yURKbI8/N8tS9SQ6hJ7KxVBTsUGWUDqyCjo56nXyXA2JWEqVH71ssbCCSrUs/297Woo0KsyuLtV NHptOwwqhyqa4mU0Vz3024YyUwJsc0iKEaEWIX17o/B6UebA1m7l5uevnDrqq5AKmVBo0FdReO7 Hy7YoTUg== X-Received: by 2002:aa7:d891:0:b0:522:2019:2020 with SMTP id u17-20020aa7d891000000b0052220192020mr1752518edq.17.1692201325200; Wed, 16 Aug 2023 08:55:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG36nWAi/JOfRGn4X+o1LzwH1yOHjm0LIgIPfPbE6CRSTaWucTiJSjJMEvLZo7otkycHwubtA== X-Received: by 2002:aa7:d891:0:b0:522:2019:2020 with SMTP id u17-20020aa7d891000000b0052220192020mr1752511edq.17.1692201325043; Wed, 16 Aug 2023 08:55:25 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id o8-20020aa7c508000000b005255eec8797sm4583586edq.79.2023.08.16.08.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 08:55:24 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 10/10] gdb: remote the get_remote_exec_file function Date: Wed, 16 Aug 2023 16:55:06 +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: After the previous commit, the get_remote_exec_file function is only used in one place, so inline it and delete get_remote_exec_file. There should be no user visible changes after this commit. --- gdb/remote.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index e2d21c65b70..966bacd7fb5 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1864,16 +1864,6 @@ remote_target::get_remote_state () return &m_remote_state; } -/* Fetch the remote exec-file from the current program space. */ - -static const std::string & -get_remote_exec_file () -{ - const remote_exec_file_info &info - = get_remote_exec_file_info (current_program_space); - return info.first; -} - /* Set the remote exec file for PSPACE. */ static void @@ -1900,7 +1890,9 @@ set_remote_exec_file_cb (const std::string &filename) static const std::string & get_remote_exec_file_cb () { - return get_remote_exec_file (); + const remote_exec_file_info &info + = get_remote_exec_file_info (current_program_space); + return info.first; } /* Implement the "show remote exec-file" command. */ -- 2.25.4