aboutsummaryrefslogtreecommitdiff
path: root/test/Scripts
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-10-19 00:19:49 +0000
committerEric Christopher <echristo@apple.com>2010-10-19 00:19:49 +0000
commit1dcb1eafbc0c94dc0cb9cd0d3f002524de8a5a92 (patch)
treea0211d7591ae98a122deeb82bc3fc081200b8283 /test/Scripts
parent3454ed9545d10064d84e45ad9a9ea26dddc255ba (diff)
Speculatively revert 116753 and 116756 to attempt to fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Scripts')
-rwxr-xr-xtest/Scripts/elf-dump96
1 files changed, 48 insertions, 48 deletions
diff --git a/test/Scripts/elf-dump b/test/Scripts/elf-dump
index f6ec186e50..1db4c49cc6 100755
--- a/test/Scripts/elf-dump
+++ b/test/Scripts/elf-dump
@@ -77,16 +77,16 @@ class Section:
self.sh_entsize = f.readWord()
def dump(self, shstrtab, f, strtab, dumpdata):
- print " (('sh_name', %s)" % hex(self.sh_name), "# %r" % shstrtab[self.sh_name]
- print " ('sh_type', %s)" % hex(self.sh_type)
- print " ('sh_flags', %s)" % hex(self.sh_flags)
- print " ('sh_addr', %s)" % hex(self.sh_addr)
- print " ('sh_offset', %s)" % hex(self.sh_offset)
- print " ('sh_size', %s)" % hex(self.sh_size)
- print " ('sh_link', %s)" % hex(self.sh_link)
- print " ('sh_info', %s)" % hex(self.sh_info)
- print " ('sh_addralign', %s)" % hex(self.sh_addralign)
- print " ('sh_entsize', %s)" % hex(self.sh_entsize)
+ print " (('sh_name', %d) # %r" % (self.sh_name, shstrtab[self.sh_name])
+ print " ('sh_type', %d)" % self.sh_type
+ print " ('sh_flags', %d)" % self.sh_flags
+ print " ('sh_addr', %d)" % self.sh_addr
+ print " ('sh_offset', %d)" % self.sh_offset
+ print " ('sh_size', %d)" % self.sh_size
+ print " ('sh_link', %d)" % self.sh_link
+ print " ('sh_info', %d)" % self.sh_info
+ print " ('sh_addralign', %d)" % self.sh_addralign
+ print " ('sh_entsize', %d)" % self.sh_entsize
if self.sh_type == 2: # SHT_SYMTAB
print " ('_symbols', ["
dumpSymtab(f, self, strtab)
@@ -106,20 +106,20 @@ def dumpSymtab(f, section, strtab):
for index in range(entries):
f.seek(section.sh_offset + index * section.sh_entsize)
- print " # Symbol %s" % hex(index)
+ print " # Symbol %d" % index
name = f.read32()
- print " (('st_name', %s)" % hex(name), "# %r" % strtab[name]
+ print " (('st_name', %d) # %r" % (name, strtab[name])
if not f.is64Bit:
- print " ('st_value', %s)" % hex(f.read32())
- print " ('st_size', %s)" % hex(f.read32())
+ print " ('st_value', %d)" % f.read32()
+ print " ('st_size', %d)" % f.read32()
st_info = f.read8()
- print " ('st_bind', %s)" % hex((st_info >> 4))
- print " ('st_type', %s)" % hex((st_info & 0xf))
- print " ('st_other', %s)" % hex(f.read8())
- print " ('st_shndx', %s)" % hex(f.read16())
+ print " ('st_bind', %d)" % (st_info >> 4)
+ print " ('st_type', %d)" % (st_info & 0xf)
+ print " ('st_other', %d)" % f.read8()
+ print " ('st_shndx', %d)" % f.read16()
if f.is64Bit:
- print " ('st_value', %s)" % hex(f.read64())
- print " ('st_size', %s)" % hex(f.read64())
+ print " ('st_value', %d)" % f.read64()
+ print " ('st_size', %d)" % f.read64()
print " ),"
def dumpRel(f, section, dumprela = False):
@@ -127,17 +127,17 @@ def dumpRel(f, section, dumprela = False):
for index in range(entries):
f.seek(section.sh_offset + index * section.sh_entsize)
- print " # Relocation %s" % hex(index)
- print " (('r_offset', %s)" % hex(f.readWord())
+ print " # Relocation %d" % index
+ print " (('r_offset', %d)" % f.readWord()
r_info = f.readWord()
if f.is64Bit:
- print " ('r_sym', %s)" % hex((r_info >> 32))
- print " ('r_type', %s)" % hex((r_info & 0xffffffff))
+ print " ('r_sym', %d)" % (r_info >> 32)
+ print " ('r_type', %d)" % (r_info & 0xffffffff)
else:
- print " ('r_sym', %s)" % hex((r_info >> 8))
- print " ('r_type', %s)" % hex((r_info & 0xff))
+ print " ('r_sym', %d)" % (r_info >> 8)
+ print " ('r_type', %d)" % (r_info & 0xff)
if dumprela:
- print " ('r_addend', %s)" % hex(f.readWordS())
+ print " ('r_addend', %d)" % f.readWordS()
print " ),"
def dumpELF(path, opts):
@@ -152,8 +152,8 @@ def dumpELF(path, opts):
elif fileclass == 2: # ELFCLASS64
f.is64Bit = True
else:
- raise ValueError, "Unknown file class %s" % hex(fileclass)
- print "('e_indent[EI_CLASS]', %s)" % hex(fileclass)
+ raise ValueError, "Unknown file class %d" % fileclass
+ print "('e_indent[EI_CLASS]', %d)" % fileclass
byteordering = f.read8()
if byteordering == 1: # ELFDATA2LSB
@@ -161,32 +161,32 @@ def dumpELF(path, opts):
elif byteordering == 2: # ELFDATA2MSB
f.isLSB = False
else:
- raise ValueError, "Unknown byte ordering %s" % hex(byteordering)
- print "('e_indent[EI_DATA]', %s)" % hex(byteordering)
+ raise ValueError, "Unknown byte ordering %d" % byteordering
+ print "('e_indent[EI_DATA]', %d)" % byteordering
- print "('e_indent[EI_VERSION]', %s)" % hex(f.read8())
- print "('e_indent[EI_OSABI]', %s)" % hex(f.read8())
- print "('e_indent[EI_ABIVERSION]', %s)" % hex(f.read8())
+ print "('e_indent[EI_VERSION]', %d)" % f.read8()
+ print "('e_indent[EI_OSABI]', %d)" % f.read8()
+ print "('e_indent[EI_ABIVERSION]', %d)" % f.read8()
f.seek(16) # Seek to end of e_ident.
- print "('e_type', %s)" % hex(f.read16())
- print "('e_machine', %s)" % hex(f.read16())
- print "('e_version', %s)" % hex(f.read32())
- print "('e_entry', %s)" % hex(f.readWord())
- print "('e_phoff', %s)" % hex(f.readWord())
+ print "('e_type', %d)" % f.read16()
+ print "('e_machine', %d)" % f.read16()
+ print "('e_version', %d)" % f.read32()
+ print "('e_entry', %d)" % f.readWord()
+ print "('e_phoff', %d)" % f.readWord()
e_shoff = f.readWord()
- print "('e_shoff', %s)" % hex(e_shoff)
- print "('e_flags', %s)" % hex(f.read32())
- print "('e_ehsize', %s)" % hex(f.read16())
- print "('e_phentsize', %s)" % hex(f.read16())
- print "('e_phnum', %s)" % hex(f.read16())
+ print "('e_shoff', %d)" % e_shoff
+ print "('e_flags', %d)" % f.read32()
+ print "('e_ehsize', %d)" % f.read16()
+ print "('e_phentsize', %d)" % f.read16()
+ print "('e_phnum', %d)" % f.read16()
e_shentsize = f.read16()
- print "('e_shentsize', %s)" % hex(e_shentsize)
+ print "('e_shentsize', %d)" % e_shentsize
e_shnum = f.read16()
- print "('e_shnum', %s)" % hex(e_shnum)
+ print "('e_shnum', %d)" % e_shnum
e_shstrndx = f.read16()
- print "('e_shstrndx', %s)" % hex(e_shstrndx)
+ print "('e_shstrndx', %d)" % e_shstrndx
# Read all section headers
sections = []
@@ -209,7 +209,7 @@ def dumpELF(path, opts):
print "('_sections', ["
for index in range(e_shnum):
- print " # Section %s" % hex(index)
+ print " # Section %d" % index
sections[index].dump(shstrtab, f, strtab, opts.dumpSectionData)
print "])"