Fix wrapping memory reads for 64-bit addresses
This commit is contained in:
+4
-3
@@ -280,17 +280,18 @@ impl GdbConnection {
|
||||
}
|
||||
} else if let Some(op) = req.match_some_str(["m", "x"]) {
|
||||
let mut read_memory = || {
|
||||
let start = req.match_hex::<u32>()?;
|
||||
let start = req.match_hex::<u64>()? as u32;
|
||||
if !req.match_str(",") {
|
||||
return None;
|
||||
};
|
||||
let size = req.match_hex::<u32>()?;
|
||||
let length = req.match_hex::<usize>()?;
|
||||
let mut buf = self.memory_buf.take().unwrap_or_default();
|
||||
buf.clear();
|
||||
let (tx, rx) = ::oneshot::channel();
|
||||
self.client.send_command(EmulatorCommand::ReadMemory(
|
||||
self.sim_id,
|
||||
start..(start + size),
|
||||
start,
|
||||
length,
|
||||
buf,
|
||||
tx,
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user