pyx2cscope.parser.elf32_parser
This module provides functionalities for parsing ELF files compatible with 32-bit architectures.
It focuses on extracting structure members and variable information from DWARF debugging information.
Module Contents
Classes
Class for parsing ELF files compatible with 32-bit architectures. |
Attributes
- class pyx2cscope.parser.elf32_parser.Elf32Parser(elf_path)[source]
Bases:
pyx2cscope.parser.elf_parser.ElfParser
Class for parsing ELF files compatible with 32-bit architectures.
- _load_elf_file()[source]
Load the ELF file according to the specific hardware architecture.
This method should be implemented by subclasses to handle different ELF file formats.
- _map_variables() dict[str, pyx2cscope.parser.elf_parser.VariableInfo] [source]
Abstract method to map variables from the parsed DWARF information.
Subclasses should implement this method to extract variable information specific to their ELF format.
- Returns:
Dict[str, VariableInfo]: A dictionary of variable names to VariableInfo objects.
- _processing_end_die(end_die)[source]
Processes the end DIE of a tag to extract variable information.
- _extract_address(die_variable)[source]
Extracts the address of the current variable or fetches it from the symbol table if not found.
- _fetch_address_from_symtab(variable_name)[source]
Fetches the address of a variable from the preloaded symbol table.
- _get_structure_members_recursive(die, parent_name: str, prev_address_offset=0)[source]
Recursively gets structure members from a DWARF DIE.
- _get_structure_members(structure_die, var_name)[source]
Retrieves structure members from a DWARF DIE.