From patchwork Thu May 3 22:36:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27102 Received: (qmail 47534 invoked by alias); 3 May 2018 22:36:27 -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 47512 invoked by uid 89); 3 May 2018 22:36:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.31) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 May 2018 22:36:25 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway31.websitewelcome.com (Postfix) with ESMTP id D4A92177E4 for ; Thu, 3 May 2018 17:36:23 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id EMprfKhHQ6il3EMprfIXBn; Thu, 03 May 2018 17:36:23 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:51190 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fEMpr-003rsK-Jt; Thu, 03 May 2018 17:36:23 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 1/6] Remove dead code in end_psymtab Date: Thu, 3 May 2018 16:36:16 -0600 Message-Id: <20180503223621.22544-2-tom@tromey.com> In-Reply-To: <20180503223621.22544-1-tom@tromey.com> References: <20180503223621.22544-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fEMpr-003rsK-Jt X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:51190 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes I noticed that there is a bit of dead code in end_psymtab. This deletes it. Normally I would investigate a fix for the code. However, considering that the code has been this way a long time (since the first import to sourceware) and considering that dbxread.c is not as important any more, I think it's safe to just consider that there's no bug. ChangeLog 2018-05-03 Tom Tromey * dbxread.c (end_psymtab): Remove dead code. --- gdb/ChangeLog | 4 ++++ gdb/dbxread.c | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gdb/dbxread.c b/gdb/dbxread.c index bdf4fb9c79..7acbb0ec8b 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2105,13 +2105,7 @@ dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst, ALL_OBJFILE_PSYMTABS (objfile, p1) { if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst) - { - p1->texthigh = pst->textlow; - /* If this file has only data, then make textlow match - texthigh. */ - if (p1->textlow == 0) - p1->textlow = p1->texthigh; - } + p1->texthigh = pst->textlow; } }