Commit Graph

72 Commits

Author SHA1 Message Date
Rafael Espindola 77dde89b90 Fix the bitwidth of the remaining fields.
llvm-svn: 136884
2011-08-04 17:00:11 +00:00
Rafael Espindola 9bc32a96be print st_shndx with the correct number of bits.
llvm-svn: 136880
2011-08-04 15:50:13 +00:00
Rafael Espindola 9528995e3f print st_other with the correct number of bits.
llvm-svn: 136877
2011-08-04 15:38:19 +00:00
Rafael Espindola 96df560ce1 print st_type with the correct number of bits.
llvm-svn: 136875
2011-08-04 15:24:00 +00:00
Rafael Espindola 79ef75dc49 Print st_bind with the correct number of bits.
llvm-svn: 136874
2011-08-04 15:10:35 +00:00
Rafael Espindola 1848231ad1 Print r_sym with the correct number of bits.
llvm-svn: 136873
2011-08-04 14:48:27 +00:00
Rafael Espindola 260af5cef6 Print r_type with the correct number of bits.
llvm-svn: 136872
2011-08-04 14:39:30 +00:00
Rafael Espindola 1b282e7e49 Another counter goes decimal.
llvm-svn: 136871
2011-08-04 14:27:46 +00:00
Rafael Espindola 65c559c5fb Change anther counter to decimal.
llvm-svn: 136870
2011-08-04 14:01:03 +00:00
Rafael Espindola cad9e7f094 Don't print a counter in hex.
llvm-svn: 136869
2011-08-04 13:39:15 +00:00
Rafael Espindola 69c67d3b18 Print all the bits in the addend.
llvm-svn: 136867
2011-08-04 13:00:24 +00:00
Roman Divacky e15f591de4 Print all 64bits for st_value and st_size. Adjust tests accordingly.
llvm-svn: 122263
2010-12-20 20:49:43 +00:00
Jason W Kim c7a2c053ff Fix elf-dump --dump-section-data for .bss section
llvm-svn: 121927
2010-12-16 00:15:10 +00:00
Daniel Dunbar a5d9f6df8f macho-dump: Switch to C++ macho-dump tool.
llvm-svn: 121466
2010-12-10 06:19:45 +00:00
Daniel Dunbar 1440fd3539 macho-dump: Fix typo.
llvm-svn: 120185
2010-11-27 04:00:06 +00:00
NAKAMURA Takumi 821de3d161 test/Scripts/macho-dump: Make hack for Python-2.4. [PR7995]
With Python-2.4, Reader::read64 always returns (unexpected) long integer.
FileCheck detects failure on test/MC/MachO among '0' and '0L'.

CentOS5(aka RHEL5 clone) provides python-2.4.

llvm-svn: 117637
2010-10-29 01:14:16 +00:00
Jason W Kim ef3ba55e52 Cut unneeded global variable.
llvm-svn: 116953
2010-10-20 22:01:39 +00:00
Jason W Kim e8b3711ae9 Fixing r116753 r116756 r116777
The failures in r116753 r116756 were caused by a python issue -
Python likes to append 'L' suffix to stringified numbers if the number
is larger than a machine int. Unfortunately, this causes a divergence of
behavior between 32 and 64 bit python versions.

I re-crafted elf-dump/common_dump to take care of these issues by:

1. always printing 0x (makes for easy sed/regex)
2. always print fixed length (exactly 2 + numBits/4 digits long)
   by mod ((2^numBits) - 1)
3. left-padded with '0'

There is a residual common routine that is also used by
macho-dump (dataToHex) , so I left the 'section_data' test values alone.

llvm-svn: 116823
2010-10-19 17:39:10 +00:00
Eric Christopher eac5e381cc Speculatively revert 116753 and 116756 to attempt to fix the bots.
llvm-svn: 116777
2010-10-19 00:19:49 +00:00
Jason W Kim d4cc3d420a Get rid of unneeded FormatOutput global variable
llvm-svn: 116756
2010-10-18 21:59:38 +00:00
Jason W Kim eae048885d Changed elf-dump to output hex format by default.
Also updated tests. 

llvm-svn: 116753
2010-10-18 21:32:41 +00:00
Michael J. Spencer 00ee155b25 Fix Formatting.
llvm-svn: 116038
2010-10-08 03:17:21 +00:00
Michael J. Spencer 8eb636e5de MC-COFF: Fix Simple and Complex type. Fixes PR8320.
llvm-svn: 116037
2010-10-08 03:17:11 +00:00
Michael J. Spencer efc22274cd test: Fix binary stdin issues with coff-dump on Windows.
llvm-svn: 115908
2010-10-07 06:29:21 +00:00
Michael J. Spencer 8ccdd25fbd test/COFF: Fix symbol indexes and names. Update tests to match.
llvm-svn: 115642
2010-10-05 17:57:08 +00:00
Michael J. Spencer e58f37f74d test/coff-dump: Support reading from stdin.
llvm-svn: 115640
2010-10-05 17:56:46 +00:00
Michael J. Spencer 46d4cc2ef7 test: Fix coff-dump section array indicies to 1 based to match file format.
llvm-svn: 113928
2010-09-15 03:58:51 +00:00
Michael J. Spencer 5d2c9acbdf Tabs to spaces
llvm-svn: 113927
2010-09-15 03:58:39 +00:00
Michael J. Spencer 8ae7922a89 Cleanup coff-dump.py
llvm-svn: 113926
2010-09-15 03:58:24 +00:00
Rafael Espindola 6e321507b6 Add missing single quotes.
llvm-svn: 113687
2010-09-11 15:45:48 +00:00
Rafael Espindola 2833e392ab Change section_data dumping to print hex numbers instead of using
python's %r.

llvm-svn: 113685
2010-09-11 15:25:58 +00:00
Benjamin Kramer 0a96578ac0 Add an elf-dumper utility.
- Output format and some of the code stolen from macho-dump.
- Somewhat incomplete and probably buggy.
- Comes with a very basic test.

llvm-svn: 113488
2010-09-09 15:00:41 +00:00
NAKAMURA Takumi e53cf6f85d coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
llvm-svn: 112485
2010-08-30 15:19:56 +00:00
Anton Korobeynikov 14be4dff8e Add some win64 coff goodness.
Patch by Cameron Esfahani!

llvm-svn: 111287
2010-08-17 21:05:54 +00:00
Tobias Grosser 731b079edb Make coff-dump.py executable and add python as executable for this script.
This fixes the MC/COFF/basic-coff.ll test case.

llvm-svn: 109497
2010-07-27 09:01:26 +00:00
Michael J. Spencer f8270bdb2d Make MC use Windows COFF on Windows and add tests.
llvm-svn: 109494
2010-07-27 06:46:15 +00:00
Daniel Dunbar 250a21b79b tests: Run macho-dump with binary unbuffered streams on Windows, I can't find a Python 2.6 way to change stdin to binary.
llvm-svn: 105894
2010-06-12 17:05:28 +00:00
Daniel Dunbar edcc628289 tests: Make macho-dump.bat actually work.
llvm-svn: 105891
2010-06-12 16:21:54 +00:00
Daniel Dunbar 56b093f572 tests: Add wrapper script for calling macho-dump on Win32.
llvm-svn: 105856
2010-06-11 23:29:48 +00:00
Jeffrey Yasskin 1734e47d20 Revert r98892. BSD systems may not have bash installed at all.
llvm-svn: 98909
2010-03-19 00:32:11 +00:00
Jeffrey Yasskin 3eb346caeb Work around a valgrind oddity where it doesn't pass the full path of a
script to the #! command by using bash instead of /bin/sh.  Bash
searches $PATH for its script argument, but dash, which /bin/sh
resolves to on some systems, does not.
https://bugs.kde.org/show_bug.cgi?id=231257 tracks the valgrind
problem.

llvm-svn: 98892
2010-03-18 22:56:02 +00:00
Daniel Dunbar 7c1f3d8cad MC/X86_64: Symbol support.
llvm-svn: 98456
2010-03-13 22:49:35 +00:00
Daniel Dunbar c19fb6f96d macho-dump: Basic Mach 64 support.
llvm-svn: 98453
2010-03-13 22:10:11 +00:00
Daniel Dunbar c9c49bde3b Teach macho-dump to dump UUIDs.
llvm-svn: 85012
2009-10-24 20:32:36 +00:00
Chris Lattner 278c12e1af remove notcast, it is now dead!
llvm-svn: 83938
2009-10-13 04:27:02 +00:00
Daniel Dunbar 00dd448cff Add count/not tools as executables.
- Apparently, I'm willing to do incredibly stupid things in the name of portability.

llvm-svn: 82685
2009-09-24 06:23:57 +00:00
Daniel Dunbar e2d76237ec Remove prcontext.
llvm-svn: 81427
2009-09-10 04:56:59 +00:00
Daniel Dunbar b40044444b llvm-mc/Mach-O: Dump relocations and section data (optionally) in my Mach-O dumper.
llvm-svn: 80087
2009-08-26 13:57:44 +00:00
Daniel Dunbar bee148a185 llvm-mc: Fix tests for python variations in int printing, sigh.
llvm-svn: 80069
2009-08-26 04:28:45 +00:00
Daniel Dunbar db52f9c650 Fix typo.
llvm-svn: 79738
2009-08-22 10:09:17 +00:00