memtab.memtab module¶
The main class for the memory tabulator.
This class is intended to be called from other Python code. The cli.py provides a convenient entry point to get to this from the command line, but you could also script a call to this class directly from your own Python code.
- class memtab.memtab.Memtab(elf=None, map_file=None, config=[], project=None, cache=True, check=False, debug=False)¶
Bases:
objectThe primary class for the memory tabulator.
This class is responsible for coordinating the parsing of various data sources (nm, readelf, objdump, size, map files), processing the output to produce a list of symbols and their associated memory regions, and categorizing them consistently.
- property cache: bool¶
Get or set the cache flag.
- property check: bool¶
Get or set the check flag.
- clean_cache()¶
- Return type:
None
- property config: MemtabConfig¶
Returns the config data
- property debug: bool¶
Get or set the debug flag.
- property elf: Path | None¶
The ELF file being processed, as a path.
- property elf_str: str¶
The ELF file being processed as a string.
- property memtab: Dict[str, Any]¶
The Memory Table. Contains version, symbols array, regions array, and metadata (i.e. where the memory table came from/when it was produced)
- property project: str¶
The project name
- property schema: Any¶
Returns the schema file for the output data format.
- tabulate()¶
Main entry point for the memory tabulator.
This method coordinates the parsing of data from various sources, processes symbols, assigns categories, and produces the final output.
- Return type:
DataFrame
- Returns:
A dictionary containing the tabulated memory data.