displaced-stepping.c \
dummy-frame.c \
dwarf2/abbrev.c \
- dwarf2/abbrev-cache.c \
+ dwarf2/abbrev-table-cache.c \
dwarf2/ada-imported.c \
dwarf2/aranges.c \
dwarf2/attribute.c \
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "dwarf2/abbrev-cache.h"
+#include "dwarf2/abbrev-table-cache.h"
/* Hash function for an abbrev table. */
hashval_t
-abbrev_cache::hash_table (const void *item)
+abbrev_table_cache::hash_table (const void *item)
{
const struct abbrev_table *table = (const struct abbrev_table *) item;
return to_underlying (table->sect_off);
/* Comparison function for abbrev table. */
int
-abbrev_cache::eq_table (const void *lhs, const void *rhs)
+abbrev_table_cache::eq_table (const void *lhs, const void *rhs)
{
const struct abbrev_table *l_table = (const struct abbrev_table *) lhs;
const search_key *key = (const search_key *) rhs;
&& l_table->sect_off == key->offset);
}
-abbrev_cache::abbrev_cache ()
+abbrev_table_cache::abbrev_table_cache ()
: m_tables (htab_create_alloc (20, hash_table, eq_table,
htab_delete_entry<abbrev_table>,
xcalloc, xfree))
}
void
-abbrev_cache::add (abbrev_table_up table)
+abbrev_table_cache::add (abbrev_table_up table)
{
/* We allow this as a convenience to the caller. */
if (table == nullptr)
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef GDB_DWARF2_ABBREV_CACHE_H
-#define GDB_DWARF2_ABBREV_CACHE_H
+#ifndef GDB_DWARF2_ABBREV_TABLE_CACHE_H
+#define GDB_DWARF2_ABBREV_TABLE_CACHE_H
#include "dwarf2/abbrev.h"
-/* An abbrev cache holds abbrev tables for easier reuse. */
-class abbrev_cache
+/* An abbrev table cache holds abbrev tables for easier reuse. */
+class abbrev_table_cache
{
public:
- abbrev_cache ();
- DISABLE_COPY_AND_ASSIGN (abbrev_cache);
+ abbrev_table_cache ();
+ DISABLE_COPY_AND_ASSIGN (abbrev_table_cache);
/* Find an abbrev table coming from the abbrev section SECTION at
offset OFFSET. Return the table, or nullptr if it has not yet
htab_up m_tables;
};
-#endif /* GDB_DWARF2_ABBREV_CACHE_H */
+#endif /* GDB_DWARF2_ABBREV_TABLE_CACHE_H */
#include "gdbsupport/iterator-range.h"
#include "dwarf2/mapped-index.h"
#include "dwarf2/read.h"
-#include "dwarf2/abbrev-cache.h"
+#include "dwarf2/abbrev-table-cache.h"
#include "dwarf2/parent-map.h"
#include "gdbsupport/range-chain.h"
#include "complaints.h"
cooked_index_storage ();
DISABLE_COPY_AND_ASSIGN (cooked_index_storage);
- /* Return the current abbrev cache. */
- abbrev_cache *get_abbrev_cache ()
- {
- return &m_abbrev_cache;
- }
+ /* Return the current abbrev table_cache. */
+ abbrev_table_cache *get_abbrev_table_cache ()
+ { return &m_abbrev_table_cache; }
/* Return the DIE reader corresponding to PER_CU. If no such reader
has been registered, return NULL. */
/* Equality function for cutu_reader. */
static int eq_cutu_reader (const void *a, const void *b);
- /* The abbrev cache used by this indexer. */
- abbrev_cache m_abbrev_cache;
+ /* The abbrev table cache used by this indexer. */
+ abbrev_table_cache m_abbrev_table_cache;
+
/* A hash table of cutu_reader objects. */
htab_up m_reader_hash;
/* The index shard that is being constructed. */
#include "gdbsupport/pathstuff.h"
#include "count-one-bits.h"
#include <unordered_set>
-#include "dwarf2/abbrev-cache.h"
+#include "dwarf2/abbrev-table-cache.h"
#include "cooked-index.h"
#include "gdbsupport/thread-pool.h"
#include "run-on-main-thread.h"
struct abbrev_table *abbrev_table,
dwarf2_cu *existing_cu,
bool skip_partial,
- abbrev_cache *cache = nullptr);
+ abbrev_table_cache *cache = nullptr);
explicit cutu_reader (struct dwarf2_per_cu_data *this_cu,
dwarf2_per_objfile *per_objfile,
struct abbrev_table *abbrev_table,
dwarf2_cu *existing_cu,
bool skip_partial,
- abbrev_cache *cache)
+ abbrev_table_cache *cache)
: die_reader_specs {},
m_this_cu (this_cu)
{
cutu_reader *
cooked_index_storage::preserve (std::unique_ptr<cutu_reader> reader)
{
- m_abbrev_cache.add (reader->release_abbrev_table ());
+ m_abbrev_table_cache.add (reader->release_abbrev_table ());
int index = reader->cu->per_cu->index;
void **slot = htab_find_slot_with_hash (m_reader_hash.get (), &index,
if (reader == nullptr)
{
cutu_reader new_reader (this_cu, per_objfile, nullptr, nullptr, false,
- storage->get_abbrev_cache ());
+ storage->get_abbrev_table_cache ());
if (new_reader.comp_unit_die == nullptr || new_reader.dummy_p)
return;
if (result == nullptr)
{
cutu_reader new_reader (per_cu, per_objfile, nullptr, nullptr, false,
- m_index_storage->get_abbrev_cache ());
+ m_index_storage->get_abbrev_table_cache ());
if (new_reader.dummy_p || new_reader.comp_unit_die == nullptr
|| !new_reader.comp_unit_die->has_children)