From patchwork Thu Mar 7 20:57:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31775 Received: (qmail 53557 invoked by alias); 7 Mar 2019 20:57:16 -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 53441 invoked by uid 89); 7 Mar 2019 20:57:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=2172, 2.17.2 X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.163) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Mar 2019 20:57:13 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 3212F4010A2F0 for ; Thu, 7 Mar 2019 14:57:12 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 204mhelhP4FKp204mhv4NM; Thu, 07 Mar 2019 14:57:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WLNL/X0xUoZkMxsx3ROpUjNO4oZ4+SbdJGKP8AVEOgs=; b=ZjAGFQJQKwZfZDZEFDnM7upEEn mtngyORqhH33ls6Od28BxrVXWhZxZBtuKUiIp51+hNocgDgKPYyq5gbxdirX35TXdfpwz1Y36trTn XQ/bd9WAvZjtPnXXQBc2YMDFe; Received: from 75-166-85-218.hlrn.qwest.net ([75.166.85.218]:53182 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1h204m-002TOW-08; Thu, 07 Mar 2019 14:57:12 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 3/9] Remove some unneeded initializations in minimal_symbol_reader Date: Thu, 7 Mar 2019 13:57:03 -0700 Message-Id: <20190307205709.21919-4-tom@tromey.com> In-Reply-To: <20190307205709.21919-1-tom@tromey.com> References: <20190307205709.21919-1-tom@tromey.com> minimal_symbol_reader::record_full does not need to initialize any minsym fields to 0, because that was already done implicitly via the use of XCNEW when allocating the msym_bunch. gdb/ChangeLog 2019-03-07 Tom Tromey * minsyms.c (minimal_symbol_reader::record_full): Remove some initializations. --- gdb/ChangeLog | 5 +++++ gdb/minsyms.c | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 6395cc4ccab..3c91853e780 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -1156,16 +1156,6 @@ minimal_symbol_reader::record_full (const char *name, int name_len, MSYMBOL_SECTION (msymbol) = section; MSYMBOL_TYPE (msymbol) = ms_type; - MSYMBOL_TARGET_FLAG_1 (msymbol) = 0; - MSYMBOL_TARGET_FLAG_2 (msymbol) = 0; - /* Do not use the SET_MSYMBOL_SIZE macro to initialize the size, - as it would also set the has_size flag. */ - msymbol->size = 0; - - /* The hash pointers must be cleared! If they're not, - add_minsym_to_hash_table will NOT add this msymbol to the hash table. */ - msymbol->hash_next = NULL; - msymbol->demangled_hash_next = NULL; /* If we already read minimal symbols for this objfile, then don't ever allocate a new one. */