Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv6908
Modified Files:
linkie.py
Log Message:
made Linkie.dump show linkie size and alignment
Index: linkie.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- linkie.py 6 Feb 2003 13:57:23 -0000 1.3
+++ linkie.py 6 Feb 2003 20:34:41 -0000 1.4
@@ -210,6 +210,11 @@
return this
def dump (this):
+ filesz = len(this._binary)
+ skipsz = this._skipped
+ memsz = filesz + skipsz
+ print 'Linkie (0x%x + 0x%x = 0x%x)' % (filesz, skipsz, memsz),
+ print 'aligned at 0x%x' % this._alignment
rsymbols = {}; othersymbols = []
rnotes = {}; othernotes = []
for sym, val in this._symbols:
@@ -225,7 +230,7 @@
buf = []; bufstart = 0
for i in range(this.memsz()):
if len(buf) >= 16 or rsymbols.has_key(i) or rnotes.has_key(i):
- if buf: print ' %08x:' % bufstart, ' '.join(buf)
+ if buf: print ' 0x%08x:' % bufstart, ' '.join(buf)
buf = []; bufstart = i
if rsymbols.has_key(i):
for s in rsymbols[i]: print s + ':'
@@ -236,4 +241,4 @@
buf.append('%02x' % ord(this._binary[i]))
else:
buf.append('oo')
- if buf: print ' %08x:' % bufstart, ' '.join(buf)
+ if buf: print ' 0x%08x:' % bufstart, ' '.join(buf)
|