Interface PcodeDebuggerMemoryAccess
- All Superinterfaces:
PcodeDebuggerDataAccess,PcodeTraceDataAccess,PcodeTraceMemoryAccess
-
Method Summary
Modifier and TypeMethodDescriptionreadFromStaticImages(PcodeExecutorStatePiece<byte[], byte[]> piece, AddressSetView unknown) Use the Debugger's static mapping service to read bytes from relocated program imagesreadFromTargetMemory(AddressSetView unknown) Instruct the associated recorder to read memory from the targetwriteTargetMemory(Address address, byte[] data) Instruct the associated recorder to write target memoryMethods inherited from interface ghidra.debug.api.emulation.PcodeDebuggerDataAccess
isLiveMethods inherited from interface ghidra.pcode.exec.trace.data.PcodeTraceDataAccess
getBytes, getLanguage, getPropertyAccess, getViewportState, intersectUnknown, intersectViewKnown, putBytes, setState, translate
-
Method Details
-
readFromTargetMemory
Instruct the associated recorder to read memory from the targetThe recorder may quantize the given address set to pages. It will include all the requested addresses, though. If this shim is not associated with a live session, the returned future completes immediately with false.
- Parameters:
unknown- the address set to read- Returns:
- a future which completes when the read is complete and its results recorded to the trace. It completes with true when any part of target memory was successfully read. It completes with false if there is no target, or if the target was not read.
-
readFromStaticImages
AddressSetView readFromStaticImages(PcodeExecutorStatePiece<byte[], byte[]> piece, AddressSetView unknown) Use the Debugger's static mapping service to read bytes from relocated program imagesTo be read, the program database for the static image must be open in the same tool as the trace being emulated. Depending on the use case, this may only be approximately correct. In particular, if the trace was from a live session that has since been terminated, and the image was relocated with fixups, reads at those fixups which fall through to static images will be incorrect, and may lead to undefined behavior in the emulated program.
- Parameters:
piece- the destination state pieceunknown- the address set to read- Returns:
- the parts of
unknownthat still haven't been read
-
writeTargetMemory
Instruct the associated recorder to write target memoryIn normal operation, this will also cause the recorder, upon a successful write, to record the same bytes into the destination trace. If this shim is not associated with a live session, the returned future completes immediately with false.
- Parameters:
address- the address of the first byte to writedata- the bytes to write- Returns:
- a future which completes when the write is complete and its results recorded to the trace. It completes with true when the target was written. It completes with false if there is no target, or if the target is not effected.
-