mirror of https://github.com/snare/voltron.git
Style 00 bytes as comments in MemoryView
This makes it easier to notice and pay attention to nonzero bytes in memory that's mostly zeroes.
This commit is contained in:
parent
cd141b56dd
commit
0d4f3d3296
|
@ -90,13 +90,11 @@ class MemoryView(TerminalView):
|
|||
byte_array = []
|
||||
for i, x in enumerate(six.iterbytes(chunk)):
|
||||
n = "%02X" % x
|
||||
token = Text if x else Comment
|
||||
if self.args.track and self.last_memory and self.last_address == m_res.address:
|
||||
if x != six.indexbytes(self.last_memory, c + i):
|
||||
byte_array.append((Error, n))
|
||||
else:
|
||||
byte_array.append((Text, n))
|
||||
else:
|
||||
byte_array.append((Text, n))
|
||||
token = Error
|
||||
byte_array.append((token, n))
|
||||
|
||||
if self.args.words:
|
||||
if target['byte_order'] =='little':
|
||||
|
@ -112,7 +110,7 @@ class MemoryView(TerminalView):
|
|||
# ASCII representation
|
||||
yield (Punctuation, '| ')
|
||||
for i, x in enumerate(six.iterbytes(chunk)):
|
||||
token = String.Char
|
||||
token = String.Char if x else Comment
|
||||
if self.args.track and self.last_memory and self.last_address == m_res.address:
|
||||
if x != six.indexbytes(self.last_memory, c + i):
|
||||
token = Error
|
||||
|
|
Loading…
Reference in New Issue