HomeFreeBSD

MFC 348212,348712: Add support for writing to guest memory in the debug server.

Description

MFC 348212,348712: Add support for writing to guest memory in the debug server.

348212:
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'.

348712:
Use parse_integer to avoid sign extension.

Coverity warned about gdb_write_mem sign extending the result of
parse_byte shifted left by 24 bits when generating a 32-bit memory
write value for MMIO. Simplify the code by using parse_integer
instead of unrolled parse_byte calls.

Details

Provenance
jhbAuthored on
Parents
rS353702: gdb(4): Implement support for NoAckMode
Branches
Unknown
Tags
Unknown