MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / peek_csrs

Method peek_csrs

crates/virtual-machine/src/virtual_machine.rs:215–217  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

213 .checked_add(segment.file_size)
214 .ok_or_else(|| VmError::Other("ELF segment file range overflow".to_owned()))?;
215 let data = bytes
216 .get(segment.offset as usize..file_end as usize)
217 .ok_or_else(|| VmError::Other("ELF PT_LOAD range outside file".to_owned()))?;
218
219 for (i, &byte) in data.iter().enumerate() {
220 bus.write_byte(mapped_vaddr + i as u64, byte)?;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected