From patchwork Fri Jun 14 23:01:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 33141 Received: (qmail 14532 invoked by alias); 14 Jun 2019 23:01:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 14446 invoked by uid 89); 14 Jun 2019 23:01:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f67.google.com Received: from mail-wm1-f67.google.com (HELO mail-wm1-f67.google.com) (209.85.128.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Jun 2019 23:01:46 +0000 Received: by mail-wm1-f67.google.com with SMTP id s15so3751137wmj.3 for ; Fri, 14 Jun 2019 16:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=lC5miW0G68aTimtc9Mu8DDbjQFEQWO/P/fmdAkwj0T4=; b=H2PPVA8JJYh0ILPoB2ynsEB44rozW3MqOa9NpzQrsN1vMOZs0AtREUC/5B0OuhjPMG o4uKdWUSyoNetJ2U3edWduTkY5awxSNO3Y1D9Go8GIErb7WmR2PzGsXq2tkAHSpKEh8X YPNbaAubBlrMyarrp7u2JKQp/oZkp3V7EUmb9DLljz/GT9kCPz05rbXenv7ReE3nEmIk oA4MfolkbdJ0wYpFnithW90eg924GvJvZd3fTyrgqCp7+KvRjMtw8dV8L6O3mwuPmrzj NL2PVkm5NAN/DsOJKIw7N6aVgKhNAjUpfJeMsVGcu+VE2p9Z1IG64OYzC24kOLjT5HZm lFHg== Return-Path: Received: from localhost (host86-180-62-212.range86-180.btcentralplus.com. [86.180.62.212]) by smtp.gmail.com with ESMTPSA id v27sm2045774wrv.45.2019.06.14.16.01.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jun 2019 16:01:43 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 1/4] gdb: Remove unused parameter Date: Sat, 15 Jun 2019 00:01:37 +0100 Message-Id: <8b1aeb820983ea0806c2260fde0aa20e388bf749.1560553051.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: <87v9x8mdkf.fsf@tromey.com> X-IsSubscribed: yes The parameter 'fullname' is always passed as NULL to the function get_filename_and_charpos in source.c, so lets remove the parameter. There should be no user visible changes after this commit. gdb/ChangeLog: * source.c (get_filename_and_charpos): Remove fullname parameter. (identify_source_line): Update call to get_filename_and_charpos. --- gdb/ChangeLog | 6 ++++++ gdb/source.c | 12 +++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/source.c b/gdb/source.c index 02df15a1ae6..5fa55e2c160 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1201,17 +1201,11 @@ find_source_lines (struct symtab *s, int desc) or to 0 if the file is not found. */ static void -get_filename_and_charpos (struct symtab *s, char **fullname) +get_filename_and_charpos (struct symtab *s) { scoped_fd desc = open_source_file (s); if (desc.get () < 0) - { - if (fullname) - *fullname = NULL; - return; - } - if (fullname) - *fullname = s->fullname; + return; if (s->line_charpos == 0) find_source_lines (s, desc.get ()); } @@ -1223,7 +1217,7 @@ identify_source_line (struct symtab *s, int line, int mid_statement, CORE_ADDR pc) { if (s->line_charpos == 0) - get_filename_and_charpos (s, (char **) NULL); + get_filename_and_charpos (s); if (s->fullname == 0) return 0; if (line > s->nlines)