From patchwork Thu Jun 7 16:19:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27691 Received: (qmail 56085 invoked by alias); 7 Jun 2018 16:20:04 -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 55368 invoked by uid 89); 7 Jun 2018 16:20:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 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: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.4) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Jun 2018 16:20:01 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 6EFC670B5 for ; Thu, 7 Jun 2018 11:20:00 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Qxdofbvu6kBj6Qxdof5Joo; Thu, 07 Jun 2018 11:20:00 -0500 X-Authority-Reason: nr=8 Received: from 75-166-19-45.hlrn.qwest.net ([75.166.19.45]:33878 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fQxdn-000Qfd-Vq; Thu, 07 Jun 2018 11:20:00 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA v3 1/6] Remove dead code in end_psymtab Date: Thu, 7 Jun 2018 10:19:50 -0600 Message-Id: <20180607161955.9800-2-tom@tromey.com> In-Reply-To: <20180607161955.9800-1-tom@tromey.com> References: <20180607161955.9800-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fQxdn-000Qfd-Vq X-Source-Sender: 75-166-19-45.hlrn.qwest.net (bapiya.Home) [75.166.19.45]:33878 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. gdb/ChangeLog 2018-06-07 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 1b524ec0e22..4092d1cab74 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2045,13 +2045,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; } }