riscemu.priv.ImageLoader module

Laods a memory image with debug information into memory

class riscemu.priv.ImageLoader.MemoryImageLoader(source_path: str, options: Dict[str, Any])

Bases: ProgramLoader

classmethod can_parse(source_path: str) float

Return confidence that the file located at source_path should be parsed and loaded by this loader :param source_path: the path of the source file :return: the confidence that this file belongs to this parser

classmethod get_options(argv: List[str]) [List[str], Dict[str, Any]]

parse command line args into an options dictionary

Parameters:

argv – the command line args list

Returns:

all remaining command line args and the parser options object

parse() Iterable[Program]
Returns:

parse_no_debug() Program
classmethod instantiate(source_path: str, options: Dict[str, Any]) ProgramLoader

Instantiate a loader for the given source file with the required arguments

Parameters:
  • source_path – the path to the source file

  • options – the parsed options (guaranteed to come from this classes get_options method.

Returns:

An instance of a ProgramLoader for the spcified source