HomeFreeBSD

Add support for writing to guest memory in the debug server.

Description

Add support for writing to guest memory in the debug server.

  • Add a write_mem counterpart to read_mem to handle writes to MMIO.
  • Add support for the GDB 'M' packet to write bytes to the guest's memory. For MMIO writes, attempt to batch writes up into words. This is imprecise, but if you write a single 2 or 4-byte aligned word, it should be treated as a single MMIO write operation.
  • While here, tidy up the parsing of the 'm' command used for reading memory to match 'M'.

Reviewed by: markj, Scott Phillips <d.scott.phillips@intel.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20307

Details