File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -468,8 +468,7 @@ void RSPClient::handle_writemem()
468468 if (data == ' {' && i+1 < rlen) {
469469 data = bin[++i] ^ 0x20 ;
470470 }
471- auto * mem = machine ().rw_memory_at (addr+i, 1 );
472- mem[0 ] = data;
471+ machine ().copy_to_guest (addr+i, &data, 1 );
473472 }
474473 reply_ok ();
475474 } catch (...) {
@@ -659,12 +658,14 @@ void RSPClient::report_gprs()
659658 const auto offset = cpu ().exception_extra_offset (cpu ().current_exception );
660659 if (i == 16 )
661660 {
662- char * rip = machine ().unsafe_memory_at (regs.rsp +offset, 8 );
663- putreg (d, end, *(uint64_t *)rip);
661+ uint64_t rip;
662+ machine ().unsafe_copy_from_guest (&rip, regs.rsp +offset, 8 );
663+ putreg (d, end, rip);
664664 continue ;
665665 } else if (i == 7 ) {
666- char * rip = machine ().unsafe_memory_at (regs.rsp +offset+24 , 8 );
667- putreg (d, end, *(uint64_t *)rip);
666+ uint64_t rip;
667+ machine ().unsafe_copy_from_guest (&rip, regs.rsp +offset+24 , 8 );
668+ putreg (d, end, rip);
668669 continue ;
669670 }
670671 }
You can’t perform that action at this time.
0 commit comments