Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 3/9] Remove some unneeded initializations in minimal_symbol_reader
Date: Thu, 07 Mar 2019 20:57:00 -0000	[thread overview]
Message-ID: <20190307205709.21919-4-tom@tromey.com> (raw)
In-Reply-To: <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  <tom@tromey.com>

	* 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.  */
-- 
2.17.2


  parent reply	other threads:[~2019-03-07 20:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 21:11 [PATCH 0/9] Minor minimal symbol improvements Tom Tromey
2019-03-07 20:57 ` [PATCH 4/9] Remove minsym termination Tom Tromey
2019-03-07 20:57 ` Tom Tromey [this message]
2019-03-07 20:57 ` [PATCH 2/9] Introduce and use language_set Tom Tromey
2019-03-07 23:05   ` John Baldwin
2019-03-08 22:21     ` Tom Tromey
2019-03-08 22:43     ` Tom Tromey
2019-03-08 23:44       ` John Baldwin
2019-03-07 20:57 ` [PATCH 8/9] Use memcpy in minimal_symbol_reader::install Tom Tromey
2019-03-07 20:57 ` [PATCH 6/9] Use htab_up for demangled hash Tom Tromey
2019-03-07 20:57 ` [PATCH 5/9] Simplify per-BFD storage management Tom Tromey
2019-03-07 20:57 ` [PATCH 7/9] Allocate minimal symbols with malloc Tom Tromey
2019-03-07 20:57 ` [PATCH 1/9] Slightly simplify minsym creation Tom Tromey
2019-03-07 20:57 ` [PATCH 9/9] Change minimal_symbol inheritance Tom Tromey
2019-03-15 22:04 ` [PATCH 0/9] Minor minimal symbol improvements Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307205709.21919-4-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox