From 63239991e371669f34edbddb8156c9afe5c0763a Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Sun, 7 Feb 2016 11:12:50 -0800 Subject: [PATCH] Added leading $ to hex values for printing --- atrcopy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atrcopy.py b/atrcopy.py index f34cf7f..3ebc4e0 100755 --- a/atrcopy.py +++ b/atrcopy.py @@ -296,7 +296,7 @@ class ObjSegment(DefaultSegment): def __str__(self): count = len(self) - s = "%s%04x-%04x (%04x @ %04x)" % (self.name, self.start_addr, self.start_addr + count, count, self.data_start) + s = "%s $%04x-$%04x ($%04x @ $%04x)" % (self.name, self.start_addr, self.start_addr + count, count, self.data_start) if self.error: s += " " + self.error return s @@ -328,6 +328,9 @@ class IndexedByteSegment(DefaultSegment): self.order = byte_order DefaultSegment.__init__(self, 0, bytes, **kwargs) + def __str__(self): + return "%s ($%x @ $%x)" % (self.name, len(self), self.order[0]) + def __len__(self): return np.alen(self.order)