kernel: gdb_server: return 0xff on read error

This seems to be rather universal.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-06-21 20:23:22 +08:00
parent 524df22667
commit 931b992063

View file

@ -159,7 +159,7 @@ impl MultiThreadOps for XousTarget {
.activate() .activate()
.unwrap(); .unwrap();
data.iter_mut().for_each(|b| { data.iter_mut().for_each(|b| {
*b = crate::arch::mem::peek_memory(current_addr as *mut u8).unwrap_or(0x55); *b = crate::arch::mem::peek_memory(current_addr as *mut u8).unwrap_or(0xff);
current_addr += 1; current_addr += 1;
}); });
@ -195,6 +195,7 @@ impl MultiThreadOps for XousTarget {
.unwrap(); .unwrap();
data.iter().for_each(|b| { data.iter().for_each(|b| {
if let Err(_e) = crate::arch::mem::poke_memory(current_addr as *mut u8, *b) { if let Err(_e) = crate::arch::mem::poke_memory(current_addr as *mut u8, *b) {
panic!("couldn't poke memory: {:?}", _e);
// gprintln!("Error writing to {:08x}: {:?}", current_addr, e); // gprintln!("Error writing to {:08x}: {:?}", current_addr, e);
} }
current_addr += 1; current_addr += 1;