Remove some unneeded initializations in minimal_symbol_reader
authorTom Tromey <tom@tromey.com>
Sat, 2 Mar 2019 02:56:45 +0000 (19:56 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 15 Mar 2019 22:02:08 +0000 (16:02 -0600)
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-15  Tom Tromey  <tom@tromey.com>

* minsyms.c (minimal_symbol_reader::record_full): Remove some
initializations.

gdb/ChangeLog
gdb/minsyms.c

index 867df1788399145bb4520c9942bcfe1a5e3c957f..ceedf536e562d385c5a8f644ff3719a974b95237 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-15  Tom Tromey  <tom@tromey.com>
+
+       * minsyms.c (minimal_symbol_reader::record_full): Remove some
+       initializations.
+
 2019-03-15  Tom Tromey  <tom@tromey.com>
 
        * objfiles.h (struct objfile_per_bfd_storage)
index cbb45f141c98543acdfe74f02027ad62072b38f1..bc6e536de879f56d772fc868facb5c28c83308be 100644 (file)
@@ -1163,16 +1163,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.  */
This page took 0.037189 seconds and 4 git commands to generate.