AsmGrader 0.0.0
Loading...
Searching...
No Matches
asmgrader::SymbolTable Class Reference

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< Symbolfind (std::string_view name) const
 
std::optional< Symbolfind_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.
 

Detailed Description

A basic symbol table, for simple interaction with a number of symbols loaded from an ELF file.

Constructor & Destructor Documentation

◆ SymbolTable()

asmgrader::SymbolTable::SymbolTable ( const std::vector< Symbol > & symbols)
explicit

Member Function Documentation

◆ find()

std::optional< Symbol > asmgrader::SymbolTable::find ( std::string_view name) const

◆ find_closest_above()

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"


The documentation for this class was generated from the following files: