Package ghidra.trace.database.memory

# Interface InternalTraceMemoryOperations

All Superinterfaces:
  `TraceMemoryOperations`

All Known Implementing Classes:
  `DBTraceMemoryManager`, `DBTraceMemorySpace`

public interface InternalTraceMemoryOperations extends TraceMemoryOperations

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default int`
  `getBytes(TracePlatform platform, long snap, Register register, ByteBuffer buf)`
  Get the most-recent bytes of a given register at the given time
  `ReadWriteLock`
  `getLock()`
  `AddressSpace`
  `getSpace()`
  For register mapping conventions
  `default TraceMemoryState`
  `getState(TracePlatform platform, long snap, Register register)`
  Assert that a register's range has a single state at the given snap and get that state
  `default Collection<Map.Entry<TraceAddressSnapRange,TraceMemoryState>>`
  `getStates(TracePlatform platform, long snap, Register register)`
  Break the register's range into smaller ranges each mapped to its state at the given snap
  `default RegisterValue`
  `getValue(TracePlatform platform, long snap, Register register)`
  Get the most-recent value of a given register at the given time
  `default RegisterValue`
  `getViewValue(TracePlatform platform, long snap, Register register)`
  Get the most-recent value of a given register at the given time
  `default int`
  `putBytes(TracePlatform platform, long snap, Register register, ByteBuffer buf)`
  `default void`
  `removeValue(TracePlatform platform, long snap, Register register)`
  `static TraceMemoryState`
  `requireOne(Collection<Map.Entry<TraceAddressSnapRange,TraceMemoryState>> states, Register register)`
  `default void`
  `setState(TracePlatform platform, long snap, Register register, TraceMemoryState state)`
  Set the state of a given register at a given time
  `default int`
  `setValue(TracePlatform platform, long snap, RegisterValue value)`

  ### Methods inherited from interface ghidra.trace.model.memory.TraceMemoryOperations

  `findBytes, getAddressesWithState, getAddressesWithState, getAddressesWithState, getAddressesWithState, getBlockSize, getBufferAt, getBufferAt, getBytes, getBytes, getMostRecentStateEntry, getMostRecentStates, getMostRecentStates, getSnapOfMostRecentChangeToBlock, getState, getState, getStates, getStates, getTrace, getValue, getViewBytes, getViewMostRecentStateEntry, getViewMostRecentStateEntry, getViewState, getViewValue, isKnown, pack, putBytes, putBytes, removeBytes, removeValue, setState, setState, setState, setState, setState, setValue`

- ## Method Details

  - ### requireOne

    static TraceMemoryState requireOne(Collection<Map.Entry<TraceAddressSnapRange,TraceMemoryState>> states, Register register)

  - ### getSpace

    AddressSpace getSpace()
    For register mapping conventions
    Returns:
      the address space

  - ### getLock

    ReadWriteLock getLock()

  - ### setState

    default void setState(TracePlatform platform, long snap, Register register, TraceMemoryState state)
    Description copied from interface: `TraceMemoryOperations`
    Set the state of a given register at a given time

    Setting state to `TraceMemoryState.KNOWN` via this method is not recommended. Setting bytes will automatically update the state accordingly.

    Specified by:
      `setState` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the time
      `register` - the register
      `state` - the state

  - ### getState

    default TraceMemoryState getState(TracePlatform platform, long snap, Register register)
    Description copied from interface: `TraceMemoryOperations`
    Assert that a register's range has a single state at the given snap and get that state
    Specified by:
      `getState` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the time
      `register` - the register to examine
    Returns:
      the state

  - ### getStates

    default Collection<Map.Entry<TraceAddressSnapRange,TraceMemoryState>> getStates(TracePlatform platform, long snap, Register register)
    Description copied from interface: `TraceMemoryOperations`
    Break the register's range into smaller ranges each mapped to its state at the given snap

    If the register is memory mapped, this will delegate to the appropriate space.

    Specified by:
      `getStates` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the time
      `register` - the register to examine
    Returns:
      the map of ranges to states

  - ### putBytes

    default int putBytes(TracePlatform platform, long snap, Register register, ByteBuffer buf)
    Specified by:
      `putBytes` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the snap
      `register` - the register to modify
      `buf` - the buffer of bytes to write
    Returns:
      the number of bytes written
    See Also:
      - `TraceMemoryOperations.putBytes(long, Register, ByteBuffer)`

  - ### setValue

    default int setValue(TracePlatform platform, long snap, RegisterValue value)
    Specified by:
      `setValue` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the snap
      `value` - the register value
    Returns:
      the number of bytes written
    See Also:
      - `TraceMemoryOperations.setValue(long, RegisterValue)`

  - ### getValue

    default RegisterValue getValue(TracePlatform platform, long snap, Register register)
    Description copied from interface: `TraceMemoryOperations`
    Get the most-recent value of a given register at the given time

    If the register is memory mapped, this will delegate to the appropriate space.

    Specified by:
      `getValue` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the time
      `register` - the register
    Returns:
      the value

  - ### getViewValue

    default RegisterValue getViewValue(TracePlatform platform, long snap, Register register)
    Description copied from interface: `TraceMemoryOperations`
    Get the most-recent value of a given register at the given time

    If the register is memory mapped, this will delegate to the appropriate space.

    Specified by:
      `getViewValue` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the time
      `register` - the register
    Returns:
      the value

  - ### getBytes

    default int getBytes(TracePlatform platform, long snap, Register register, ByteBuffer buf)
    Description copied from interface: `TraceMemoryOperations`
    Get the most-recent bytes of a given register at the given time

    If the register is memory mapped, this will delegate to the appropriate space.

    Specified by:
      `getBytes` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the time
      `register` - the register
      `buf` - the destination buffer
    Returns:
      the number of bytes read

  - ### removeValue

    default void removeValue(TracePlatform platform, long snap, Register register)
    Specified by:
      `removeValue` in interface `TraceMemoryOperations`
    Parameters:
      `platform` - the platform whose language defines the register
      `snap` - the snap
      `register` - the register
    See Also:
      - `TraceMemoryOperations.removeValue(long, Register)`