projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When folding away a (shl (shr)) pair, we need to check that the bits that will BECOME...
[oota-llvm.git]
/
test
/
Scripts
/
macho-dump
diff --git
a/test/Scripts/macho-dump
b/test/Scripts/macho-dump
index 72f833975d04d6a2c7a4b49af8846b32130744c5..8c9fa59c601060815b6a56c14fd40e31b789aae5 100755
(executable)
--- a/
test/Scripts/macho-dump
+++ b/
test/Scripts/macho-dump
@@
-4,6
+4,8
@@
import struct
import sys
import StringIO
import sys
import StringIO
+import common_dump
+
class Reader:
def __init__(self, path):
if path == '-':
class Reader:
def __init__(self, path):
if path == '-':
@@
-41,7
+43,10
@@
class Reader:
return int(Value)
def read64(self):
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:
def registerStringTable(self, strings):
if self.string_table is not None:
@@
-267,7
+272,7
@@
def dumpSection(f, i, opts, is64Bit):
if opts.dumpSectionData:
f.seek(offset)
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)
f.seek(prev_pos)