From patchwork Wed Aug 16 15:55:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 74215 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 6705B3853D0F for ; Wed, 16 Aug 2023 15:56:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6705B3853D0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692201404; bh=GdsH7a2xA1z6DWdEkTuJoSM08FjM7c9yUSzd8rJVoYg=; 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=SwbX9inS+gwQD+7tdzGhvdENY4RDCQ745G+tZGcuQ3BKKGZoXKgh2cub3dhBnumjw M730gMCmKBFmTzedVMr3P+Q4TeF6rE4ycYZcjjI6QfPoyDDMN2AMRrsxUwCGok1FgF D8L7AQTiQACMpphrt5stW7tUjVUrdOmdVHUat91s= 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 046C33857352 for ; Wed, 16 Aug 2023 15:55:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 046C33857352 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) 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 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 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" 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. Reviewed-by: Mark Wielaard --- 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. */