import sys
import StringIO
+import common_dump
+
class Reader:
def __init__(self, path):
if path == '-':
return int(Value)
def read64(self):
- return struct.unpack('><'[self.isLSB] + 'Q', self.read(8))[0]
+ Value = struct.unpack('><'[self.isLSB] + 'Q', self.read(8))[0]
+ if Value == int(Value):
+ Value = int(Value)
+ return Value
def registerStringTable(self, strings):
if self.string_table is not None:
if opts.dumpSectionData:
f.seek(offset)
- print " ('_section_data', %r)" % f.read(size)
+ print " ('_section_data', '%s')" % common_dump.dataToHex(f.read(size))
f.seek(prev_pos)