riscemu.priv.types module

class riscemu.priv.types.ElfInstruction(name: str, args: Tuple[int], encoded: int)

Bases: Instruction

name: str
args: Tuple[int]
encoded: int
get_imm(num: int) int

parse and get immediate argument

get_imm_reg(num: int) Tuple[int, int]

parse and get an argument imm(reg)

get_reg(num: int) str

parse and get an register argument

__init__(name: str, args: Tuple[int], encoded: int) None
class riscemu.priv.types.ElfMemorySection(data: bytearray, name: str, context: InstructionContext, owner: str, base: int, flags: MemoryFlags)

Bases: BinaryDataMemorySection

__init__(data: bytearray, name: str, context: InstructionContext, owner: str, base: int, flags: MemoryFlags)
read_ins(offset)
write(offset: int, size: int, data: bytearray)
property end
name: str
flags: MemoryFlags
size: int
base: int
owner: str
context: InstructionContext
class riscemu.priv.types.MemoryImageDebugInfos(sections: Dict[str, Dict[str, Tuple[int, int]]], symbols: Dict[str, Dict[str, int]], globals: Dict[str, Set[str]], base: int = 0)

Bases: object

VERSION = '1.0.0'

Schema version

__init__(sections: Dict[str, Dict[str, Tuple[int, int]]], symbols: Dict[str, Dict[str, int]], globals: Dict[str, Set[str]], base: int = 0)
sections: Dict[str, Dict[str, Tuple[int, int]]]

This dictionary maps a program and section to (start address, section length)

symbols: Dict[str, Dict[str, int]]

This dictionary maps a program and a symbol to a value

globals: Dict[str, Set[str]]

This dictionary contains the list of all global symbols of a given program

base: int = 0

The base address where the image starts. Defaults to zero.

serialize() str
classmethod load(serialized_str: str) MemoryImageDebugInfos
classmethod builder() MemoryImageDebugInfos