fit.interfaces package
Subpackages
- fit.interfaces.gdb package
- Submodules
- fit.interfaces.gdb.boards module
- fit.interfaces.gdb.controller module
- fit.interfaces.gdb.gdb_injector module
GDBInjectorGDBInjector.BreakpointGDBInjector.StateGDBInjector.board_familyGDBInjector.breakpointsGDBInjector.close()GDBInjector.controllerGDBInjector.embeddedGDBInjector.endiannessGDBInjector.gdb_pathGDBInjector.get_mappings()GDBInjector.get_register_names()GDBInjector.interrupt()GDBInjector.is_running()GDBInjector.read_memory()GDBInjector.read_register()GDBInjector.register_namesGDBInjector.remote()GDBInjector.reset()GDBInjector.reset_functionsGDBInjector.reset_stm32()GDBInjector.reset_unknown()GDBInjector.run()GDBInjector.set_event()GDBInjector.stateGDBInjector.word_sizeGDBInjector.write_memory()GDBInjector.write_register()
get_int()parse_memory()to_gdb_hex()
- Module contents
Submodules
fit.interfaces.implementations module
- class fit.interfaces.implementations.Implementation(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
EnumEnumeration class for the available injector implementations.
- GDB = 1
- classmethod from_string(s)[source]
Function that returns the injector class corresponding to a given implementation name.
- Parameters:
s (
str) – the implementation name.- Return type:
Type[InternalInjector]- Returns:
the class corresponding to the given implementation name.
fit.interfaces.internal_injector module
- class fit.interfaces.internal_injector.InternalInjector(elf_path, **kwargs)[source]
Bases:
ABCAbstract class for managing the injection process into an ELF binary.
- abstract close()[source]
Function that closes the GDB session and exit the controller.
- Return type:
None
- classmethod get_class()[source]
Function that returns the class type.
- Return type:
Type[Self]- Returns:
the class type.
- abstract read_memory(address, count)[source]
Function that reads a memory word from the target.
- Parameters:
address (
int) – the memory address to read from.count (
int) – the number of bytes to read.
- Return type:
list[int]- Returns:
the values read from the target.
- abstract read_register(register)[source]
Function that reads a register from the target.
- Parameters:
register (
str) – the register to read.- Return type:
int- Returns:
the value read from the target.
- abstract reset()[source]
Function that resets the injector to a known initial state. Useful between test runs or injections.
- Return type:
None
- abstract run(blocking=True, stop_event=None)[source]
Function that runs the injector for a given amount of time.
- Parameters:
blocking (
bool) – whether to block until the precess stops.stop_event (
Optional[Event]) – synchronization variable that needs to be checked when waiting for a timeout
- Return type:
str- Returns:
the name of the breakpoint hit.
- abstract set_event(event)[source]
Function that sets a specific event for this target.
- Parameters:
event (
str) – the event to set.- Return type:
None