From 42a03d4e6d25cde495efe6660f1e10dd6a3a1292 Mon Sep 17 00:00:00 2001 From: stardust Date: Wed, 13 Jan 2021 10:50:25 +0800 Subject: [PATCH] Update paging-multilevel-translate.py According to the README.md, A page dump looks like this: ```sh page 0: 08 00 01 15 11 1d 1d 1c 01 17 15 14 16 1b 13 0b ... page 1: 19 05 1e 13 02 16 1e 0c 15 09 06 16 00 19 10 03 ... page 2: 1d 07 11 1b 12 05 07 1e 09 1a 18 17 16 18 1a 01 ... ... ``` I found the code in `OS.memoryDump()` miss a black space after print the value of the memory address. --- vm-smalltables/paging-multilevel-translate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm-smalltables/paging-multilevel-translate.py b/vm-smalltables/paging-multilevel-translate.py index 92e30853..10d1dc84 100755 --- a/vm-smalltables/paging-multilevel-translate.py +++ b/vm-smalltables/paging-multilevel-translate.py @@ -197,7 +197,7 @@ def memoryDump(self): for i in range(0, self.physMem / self.pageSize): print('page %3d:' % i, end='') for j in range(0, self.pageSize): - print('%02x' % self.memory[(i * self.pageSize) + j], end='') + print('%02x ' % self.memory[(i * self.pageSize) + j], end='') print('') def getPDBR(self, pid):