AsmGrader 0.0.0
|
A basic symbol table, for simple interaction with a number of symbols loaded from an ELF file. More...
#include <symbol_table.hpp>
Public Member Functions | |
SymbolTable (const std::vector< Symbol > &symbols) | |
std::optional< Symbol > | find (std::string_view name) const |
std::optional< Symbol > | find_closest_above (std::uintptr_t address) const |
Find the closest symbol at or below address If no symbol is at or above address, returns nullopt. | |
A basic symbol table, for simple interaction with a number of symbols loaded from an ELF file.
|
explicit |
std::optional< Symbol > asmgrader::SymbolTable::find | ( | std::string_view | name | ) | const |
std::optional< Symbol > asmgrader::SymbolTable::find_closest_above | ( | std::uintptr_t | address | ) | const |
Find the closest symbol at or below address
If no symbol is at or above address, returns nullopt.
Useful for diagnostics such as: "Program segfaulted at location putstring+0x42"