Theodosius v3.0
Jit linker, symbol mapper, and obfuscator
|
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode. More...
#include "symbol_table.hpp"
Public Member Functions | |
symbol_table_t () | |
default constructor. does nothing. More... | |
symbol_table_t (const std::vector< decomp::symbol_t > &&syms) | |
this constructor will populate the m_table private field with symbols. More... | |
void | put_symbol (decomp::symbol_t &sym) |
add symbol to m_table More... | |
void | put_symbols (std::vector< decomp::symbol_t > &syms) |
add a vector of symbol to m_table More... | |
std::optional< decomp::symbol_t * > | sym_from_hash (std::size_t hash) |
returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its name) the hash is produced by theo::decomp::symbol_t::hash More... | |
std::optional< decomp::symbol_t * > | sym_from_alloc (std::uintptr_t allocated_at) |
returns an optional pointer to a symbol given its allocation location. More... | |
void | for_each (std::function< void(decomp::symbol_t &sym)> fn) |
this function is a wrapper function that allows you to get at each entry in the symbol table by reference. More... | |
std::uint32_t | size () |
returns the size of the symbol table. More... | |
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values. the symbol values are references by a hashcode.
Definition at line 45 of file symbol_table.hpp.
|
inline |
theo::recomp::symbol_table_t::symbol_table_t | ( | const std::vector< decomp::symbol_t > && | syms | ) |
this constructor will populate the m_table private field with symbols.
syms | vector of decomp::symbol_t |
Definition at line 34 of file symbol_table.cpp.
void theo::recomp::symbol_table_t::for_each | ( | std::function< void(decomp::symbol_t &sym)> | fn | ) |
this function is a wrapper function that allows you to get at each entry in the symbol table by reference.
fn | a callback function that will be called for each symbol |
Definition at line 49 of file symbol_table.cpp.
Referenced by theo::recomp::recomp_t::allocate(), and theo::theo_t::compose().
void theo::recomp::symbol_table_t::put_symbol | ( | decomp::symbol_t & | sym | ) |
add symbol to m_table
sym | symbol to be added. |
Definition at line 40 of file symbol_table.cpp.
References theo::decomp::symbol_t::hash().
void theo::recomp::symbol_table_t::put_symbols | ( | std::vector< decomp::symbol_t > & | syms | ) |
add a vector of symbol to m_table
syms |
Definition at line 44 of file symbol_table.cpp.
std::uint32_t theo::recomp::symbol_table_t::size | ( | ) |
returns the size of the symbol table.
Definition at line 72 of file symbol_table.cpp.
std::optional< decomp::symbol_t * > theo::recomp::symbol_table_t::sym_from_alloc | ( | std::uintptr_t | allocated_at | ) |
returns an optional pointer to a symbol given its allocation location.
allocated_at | the address where the symbol is allocated at. |
Definition at line 60 of file symbol_table.cpp.
std::optional< decomp::symbol_t * > theo::recomp::symbol_table_t::sym_from_hash | ( | std::size_t | hash | ) |
returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its name) the hash is produced by theo::decomp::symbol_t::hash
hash | hashcode of the symbol to get from the symbol table... |
Definition at line 54 of file symbol_table.cpp.
Referenced by theo::theo_t::resolve().