diff --git a/tools/minidumpserver.py b/tools/minidumpserver.py index e2c404c4b9..9e86cad204 100755 --- a/tools/minidumpserver.py +++ b/tools/minidumpserver.py @@ -567,9 +567,18 @@ class GDBStub: def handle_register_single_write_packet(self, pkt): # the 'P' packet for writing to registers - # - # We don't support writing so return error - self.put_gdb_packet(b"E01") + + index, value = pkt[1:].split(b"=") + reg_val = 0 + for i in range(0, len(value), 2): + data = value[i : i + 2] + reg_val = reg_val + (int("0x" + data.decode("utf8"), 16) << (i * 4)) + + reg = int("0x" + index.decode("utf8"), 16) + if reg < len(self.logfile.registers): + self.logfile.registers[reg] = reg_val + + self.put_gdb_packet(b"OK") def handle_memory_read_packet(self, pkt): # the 'm' packet for reading memory: m,