68 if (symbol.
name().empty())
73 if (!
nameMap.insert({ symbol.name(), idx }).second)
92 std::inserter(intersection, intersection.begin()),
94 if (!intersection.empty()) {
95 warn(
"Cannot insert a new symbol table due to name collisions. "
96 "Adding prefix to each symbol's name can resolve this issue.");
100 for (
const Symbol &symbol: other)
114 if (symbol.sizeIsValid()) {
116 symbol.sizeOrDefault(0x0));
120 (
int)symbol.binding());
133 for (
int i = 0;
i < size; ++
i) {
145 binding = default_binding;
152 "warning: one or more Symbols does not have a valid size.");
std::map< std::string, int > NameMap
Map a symbol name to an index into the symbol vector.
void clear()
Clears the table.
void unserialize(const std::string &base, CheckpointIn &cp, Symbol::Binding default_binding=Symbol::Binding::Global)
Populate the table by unserializing a checkpoint.
void serialize(const std::string &base, CheckpointOut &cp) const
Serialize the table's contents.
bool insert(const Symbol &symbol)
Insert a new symbol in the table if it does not already exist.
bool optParamIn(CheckpointIn &cp, const std::string &name, T ¶m, bool do_warn=true)
This function is used for restoring optional parameters from the checkpoint.
SymbolTable debugSymbolTable
Global unified debugging symbol table (for target).
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void paramOut(CheckpointOut &cp, const std::string &name, ExtMachInst const &machInst)
void paramIn(CheckpointIn &cp, const std::string &name, ExtMachInst &machInst)
std::string csprintf(const char *format, const Args &...args)
const std::string & name()