mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-01-05 21:30:26 +00:00
Added leading $ to hex values for printing
This commit is contained in:
parent
53261afdb0
commit
63239991e3
@ -296,7 +296,7 @@ class ObjSegment(DefaultSegment):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
count = len(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:
|
if self.error:
|
||||||
s += " " + self.error
|
s += " " + self.error
|
||||||
return s
|
return s
|
||||||
@ -328,6 +328,9 @@ class IndexedByteSegment(DefaultSegment):
|
|||||||
self.order = byte_order
|
self.order = byte_order
|
||||||
DefaultSegment.__init__(self, 0, bytes, **kwargs)
|
DefaultSegment.__init__(self, 0, bytes, **kwargs)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "%s ($%x @ $%x)" % (self.name, len(self), self.order[0])
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return np.alen(self.order)
|
return np.alen(self.order)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user