Only clear the minsym array when necessary
authorChristian Biesinger <cbiesinger@google.com>
Tue, 29 Oct 2019 22:14:48 +0000 (17:14 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Wed, 30 Oct 2019 16:05:02 +0000 (11:05 -0500)
commit808590ec5af20db08005885559fe29ebe7128b48
tree175872d3aceb74a561e19c0a6720371964d8d17c
parent1820262bc909121a408e030195789a70513b9139
Only clear the minsym array when necessary

The array starts out initialized to zero:
  minimal_symbol *msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE] {};

So we only need to explicitly clear it if there were previous minsyms
added to it. This patch does that.

gdb/ChangeLog:

2019-10-30  Christian Biesinger  <cbiesinger@google.com>

* minsyms.c (clear_minimal_symbol_hash_tables): New function.
(build_minimal_symbol_hash_tables): Code to clear the table moved
to clear_minimal_symbol_hash_tables.
(minimal_symbol_reader::install): Call clear_minimal_symbol_hash_tables
when needed.

Change-Id: I7da994fe6747f67714e7efe9fdbb0dbc4d6ea532
gdb/ChangeLog
gdb/minsyms.c
This page took 0.025569 seconds and 4 git commands to generate.