diff --git a/arm7tdmi/src/simple_memory.rs b/arm7tdmi/src/simple_memory.rs
index 9e63fa1..1037c9b 100644
--- a/arm7tdmi/src/simple_memory.rs
+++ b/arm7tdmi/src/simple_memory.rs
@@ -69,13 +69,13 @@ impl DebugRead for SimpleMemory {
impl MemoryGdbInterface for SimpleMemory {
fn memory_map_xml(&self, offset: u64, length: usize, buf: &mut [u8]) -> usize {
- let memory_map = r#"
+ let memory_map = format!(r#"
-
- "#
+
+ "#, self.data.len())
.trim()
.as_bytes();
copy_range_to_buf(memory_map, offset, length, buf)