36 m_table.insert({sym.hash(), sym});
41 m_table.insert({sym.
hash(), sym});
44 void symbol_table_t::put_symbols(std::vector<decomp::symbol_t>& syms) {
45 std::for_each(syms.begin(), syms.end(),
50 for (
auto itr = m_table.begin(); itr != m_table.end(); ++itr)
54 std::optional<decomp::symbol_t*> symbol_table_t::sym_from_hash(
56 return m_table.count(hash) ? &m_table.at(hash)
57 : std::optional<decomp::symbol_t*>{};
60 std::optional<decomp::symbol_t*> symbol_table_t::sym_from_alloc(
61 std::uintptr_t allocated_at) {
63 std::find_if(m_table.begin(), m_table.end(),
64 [&](std::pair<const std::size_t, decomp::symbol_t> itr) {
65 return itr.second.allocated_at() == allocated_at;
68 return res != m_table.end() ? &res->second
69 : std::optional<decomp::symbol_t*>{};
72 std::uint32_t symbol_table_t::size() {
73 return m_table.size();
symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....
std::size_t hash()
gets the hash of the symbol name.
symbol_table_t()
default constructor. does nothing.
this namespace encompasses all recomposition related code.