pyelftools.git
12 years agomade all tests run with Python 2.6 that has unittest2 installed. Added basic tox...
Eli Bendersky [Sat, 24 Dec 2011 04:55:59 +0000 (06:55 +0200)]
made all tests run with Python 2.6 that has unittest2 installed. Added basic tox.ini file for running tox tests

12 years agofix setup.py; add verbose mode (off by default) and exit code to run_readelf_test
Eli Bendersky [Sat, 24 Dec 2011 03:50:42 +0000 (05:50 +0200)]
fix setup.py; add verbose mode (off by default) and exit code to run_readelf_test

12 years agofixed setup script to include internal packages as well, and removed ^M from README
Eli Bendersky [Fri, 23 Dec 2011 07:42:37 +0000 (09:42 +0200)]
fixed setup script to include internal packages as well, and removed ^M from README

12 years agoMANIFEST tweaks + arranging examples to find elftools even if it's not installed
Eli Bendersky [Thu, 22 Dec 2011 18:03:06 +0000 (20:03 +0200)]
MANIFEST tweaks + arranging examples to find elftools even if it's not installed

12 years agoadded basic TODO with distribution checklist
Eli Bendersky [Thu, 22 Dec 2011 14:05:41 +0000 (16:05 +0200)]
added basic TODO with distribution checklist

12 years agoinitial addition of files needed for setup
Eli Bendersky [Thu, 22 Dec 2011 13:53:52 +0000 (15:53 +0200)]
initial addition of files needed for setup

12 years agodocumentation fixes + new examples
Eli Bendersky [Thu, 22 Dec 2011 13:22:00 +0000 (15:22 +0200)]
documentation fixes + new examples

12 years agoupdated README
Eli Bendersky [Thu, 22 Dec 2011 03:42:17 +0000 (05:42 +0200)]
updated README

12 years agosome doc updates
Eli Bendersky [Tue, 20 Dec 2011 04:45:00 +0000 (06:45 +0200)]
some doc updates

12 years agofix ReST links in README
Eli Bendersky [Sun, 18 Dec 2011 04:29:27 +0000 (06:29 +0200)]
fix ReST links in README

12 years agoupdated README
Eli Bendersky [Sun, 18 Dec 2011 04:25:12 +0000 (06:25 +0200)]
updated README

12 years agosome cosmetic changes + updating README
Eli Bendersky [Sun, 18 Dec 2011 03:41:16 +0000 (05:41 +0200)]
some cosmetic changes + updating README

12 years agoadding license + some filename cleanup
Eli Bendersky [Sat, 17 Dec 2011 12:48:42 +0000 (14:48 +0200)]
adding license + some filename cleanup

12 years agoupdate unittest runner
Eli Bendersky [Sat, 17 Dec 2011 12:36:39 +0000 (14:36 +0200)]
update unittest runner

12 years agocleanup
Eli Bendersky [Sat, 17 Dec 2011 12:34:30 +0000 (14:34 +0200)]
cleanup

12 years agorenamed 'tests' dir to 'test'
Eli Bendersky [Sat, 17 Dec 2011 12:34:02 +0000 (14:34 +0200)]
renamed 'tests' dir to 'test'

12 years agochanged file permissions
Eli Bendersky [Fri, 16 Dec 2011 11:17:39 +0000 (13:17 +0200)]
changed file permissions

12 years agofixed previous problem
Eli Bendersky [Fri, 16 Dec 2011 11:16:27 +0000 (13:16 +0200)]
fixed previous problem

12 years agoAdded new test file and fixing some problems related to it. not completely working yet
Eli Bendersky [Fri, 16 Dec 2011 11:05:54 +0000 (13:05 +0200)]
Added new test file and fixing some problems related to it. not completely working yet

12 years agomore horrible hacks to run_readelf_tests to pass with a newer readelf on 32-bit
Eli Bendersky [Fri, 16 Dec 2011 09:08:45 +0000 (11:08 +0200)]
more horrible hacks to run_readelf_tests to pass with a newer readelf on 32-bit

12 years agoadded test file (clang-compiled). fixed readelf handling of unknown attributes
Eli Bendersky [Fri, 16 Dec 2011 06:13:48 +0000 (08:13 +0200)]
added test file (clang-compiled). fixed readelf handling of unknown attributes

12 years agoadded some documentation to callframe.py
Eli Bendersky [Fri, 16 Dec 2011 05:32:28 +0000 (07:32 +0200)]
added some documentation to callframe.py

12 years agofixed a bug in taking the last line from CIE to first line in FDE - need copy.copy...
Eli Bendersky [Fri, 16 Dec 2011 04:46:19 +0000 (06:46 +0200)]
fixed a bug in taking the last line from CIE to first line in FDE - need copy.copy! now all current readelf tests run successfully

12 years agoreadelf --debug-dump=frames-interp initial implementation completed. some tests vs...
Eli Bendersky [Fri, 16 Dec 2011 04:39:49 +0000 (06:39 +0200)]
readelf --debug-dump=frames-interp initial implementation completed. some tests vs. readelf run

12 years agostarted implementing debug-dump=frames-interp
Eli Bendersky [Thu, 15 Dec 2011 14:11:06 +0000 (16:11 +0200)]
started implementing debug-dump=frames-interp

12 years agodecoding seems to somewhat work. some unit tests pass
Eli Bendersky [Thu, 15 Dec 2011 13:28:35 +0000 (15:28 +0200)]
decoding seems to somewhat work. some unit tests pass

12 years agodecoding seems to somewhat work. some unit tests pass
Eli Bendersky [Thu, 15 Dec 2011 13:27:53 +0000 (15:27 +0200)]
decoding seems to somewhat work. some unit tests pass

12 years agosome unit tests for describe_CFI_instructions
Eli Bendersky [Thu, 15 Dec 2011 07:04:42 +0000 (09:04 +0200)]
some unit tests for describe_CFI_instructions

12 years agocompleted descriptions of --debug-info=frames. readelf tests run
Eli Bendersky [Wed, 14 Dec 2011 04:54:09 +0000 (06:54 +0200)]
completed descriptions of --debug-info=frames. readelf tests run

12 years agostarted implementing dumping --debug-dump=frames
Eli Bendersky [Mon, 12 Dec 2011 04:40:34 +0000 (06:40 +0200)]
started implementing dumping --debug-dump=frames

12 years agoimplemented decoding of the CIE object associated with FDEs
Eli Bendersky [Mon, 12 Dec 2011 03:51:45 +0000 (05:51 +0200)]
implemented decoding of the CIE object associated with FDEs

12 years agoadded some more assertions to test_callframe.py
Eli Bendersky [Mon, 12 Dec 2011 03:26:48 +0000 (05:26 +0200)]
added some more assertions to test_callframe.py

12 years agostarting tests for callframes
Eli Bendersky [Sun, 11 Dec 2011 04:48:48 +0000 (06:48 +0200)]
starting tests for callframes

12 years agofixed default address size passing from ELFFile to DWARFInfo, which makes it possible...
Eli Bendersky [Sat, 10 Dec 2011 18:32:32 +0000 (20:32 +0200)]
fixed default address size passing from ELFFile to DWARFInfo, which makes it possible to correctly read .debug_frame sections

12 years agocall frame instructions parsing kinda done. now need to run some tests: ++ write...
Eli Bendersky [Sat, 10 Dec 2011 07:57:28 +0000 (09:57 +0200)]
call frame instructions parsing kinda done. now need to run some tests: ++ write unit tests for this

12 years agostarting skeleton implementation of call frame parsing
Eli Bendersky [Fri, 9 Dec 2011 14:53:18 +0000 (16:53 +0200)]
starting skeleton implementation of call frame parsing

12 years agoImplement register name decoding in descriptions. This also allows to remove
Eli Bendersky [Fri, 9 Dec 2011 10:29:06 +0000 (12:29 +0200)]
Implement register name decoding in descriptions. This also allows to remove
the hack in run_readelf_tests for ignoring differences in reg names
(previously missing)

12 years agoPass configuration from ELFFile to DWARFInfo via a DwarfConfig object.
Eli Bendersky [Fri, 9 Dec 2011 09:07:04 +0000 (11:07 +0200)]
Pass configuration from ELFFile to DWARFInfo via a DwarfConfig object.
Also change the way ELFFile exposes the machine architecture gathered from the header

12 years agosome documentation improvements
Eli Bendersky [Wed, 7 Dec 2011 14:32:12 +0000 (16:32 +0200)]
some documentation improvements

12 years agosome documentation for the dwarf_expr module
Eli Bendersky [Wed, 7 Dec 2011 12:54:07 +0000 (14:54 +0200)]
some documentation for the dwarf_expr module

12 years agorenamed 'location expression' to the more general 'dwarf expression'
Eli Bendersky [Wed, 7 Dec 2011 12:46:03 +0000 (14:46 +0200)]
renamed 'location expression' to the more general 'dwarf expression'

12 years agorenamed 'location expression' to the more general 'dwarf expression'
Eli Bendersky [Wed, 7 Dec 2011 12:43:47 +0000 (14:43 +0200)]
renamed 'location expression' to the more general 'dwarf expression'

12 years agousing RepeatUntilExcluding for the Dwarf_abbrev_declaration struct - so now no accoun...
Eli Bendersky [Wed, 7 Dec 2011 07:44:06 +0000 (09:44 +0200)]
using RepeatUntilExcluding for the Dwarf_abbrev_declaration struct - so now no accounting for the empty element is needed when iterating over it

12 years agoadded debug-dump=decodedline to readelf test suite
Eli Bendersky [Wed, 7 Dec 2011 07:28:14 +0000 (09:28 +0200)]
added debug-dump=decodedline to readelf test suite

12 years agochanged line program entries to contain commands and arguments, AND state. this allow...
Eli Bendersky [Tue, 6 Dec 2011 04:48:10 +0000 (06:48 +0200)]
changed line program entries to contain commands and arguments, AND state. this allows more faithful decoding in readelf

12 years agostarting running decodedline vs. readelf, most things work... but some don't [AHA]
Eli Bendersky [Sun, 4 Dec 2011 05:05:31 +0000 (07:05 +0200)]
starting running decodedline vs. readelf, most things work... but some don't [AHA]

12 years agosmall fixes to lineprogram + unit tests + new unittest runner
Eli Bendersky [Sun, 4 Dec 2011 04:22:24 +0000 (06:22 +0200)]
small fixes to lineprogram + unit tests + new unittest runner

12 years agoafter cleanup and fixing, it actually shows signs of life
Eli Bendersky [Sat, 3 Dec 2011 14:33:54 +0000 (16:33 +0200)]
after cleanup and fixing, it actually shows signs of life

12 years agochanged the method to obtain line programs - now per CU
Eli Bendersky [Sat, 3 Dec 2011 13:50:42 +0000 (15:50 +0200)]
changed the method to obtain line programs - now per CU

12 years agomoving on with line program stuffz
Eli Bendersky [Fri, 2 Dec 2011 14:28:56 +0000 (16:28 +0200)]
moving on with line program stuffz

12 years agolaziness FTW
Eli Bendersky [Fri, 2 Dec 2011 08:12:45 +0000 (10:12 +0200)]
laziness FTW

12 years agosome API cleanups + added lineprogram
Eli Bendersky [Fri, 2 Dec 2011 07:58:47 +0000 (09:58 +0200)]
some API cleanups + added lineprogram

12 years agoadded Dwarf_lineprog_header struct, with some rudimentary tests
Eli Bendersky [Fri, 2 Dec 2011 07:03:08 +0000 (09:03 +0200)]
added Dwarf_lineprog_header struct, with some rudimentary tests

13 years agomerge
Eli Bendersky [Mon, 28 Nov 2011 04:27:15 +0000 (06:27 +0200)]
merge

13 years agofurther optimization of reading a cstring from a stream + added some tests for utils
Eli Bendersky [Mon, 28 Nov 2011 04:25:52 +0000 (06:25 +0200)]
further optimization of reading a cstring from a stream + added some tests for utils

13 years agoadded some more exceptions to the test runner, to account for differences in readelf...
eliben [Sun, 27 Nov 2011 08:22:08 +0000 (10:22 +0200)]
added some more exceptions to the test runner, to account for differences in readelf versions

13 years agosome performance improvements
Eli Bendersky [Sun, 27 Nov 2011 04:34:47 +0000 (06:34 +0200)]
some performance improvements

13 years agorun normally by default, not in profiling mode
Eli Bendersky [Sat, 26 Nov 2011 14:49:27 +0000 (16:49 +0200)]
run normally by default, not in profiling mode

13 years agoadd caching to LocationExpressionDumper in _location_list_extra. this makes some...
Eli Bendersky [Sat, 26 Nov 2011 14:37:02 +0000 (16:37 +0200)]
add caching to LocationExpressionDumper in _location_list_extra. this makes some benchmarks considerably faster

13 years agocleanup + add profiling top-level function to readelf
Eli Bendersky [Sat, 26 Nov 2011 14:16:16 +0000 (16:16 +0200)]
cleanup + add profiling top-level function to readelf

13 years agofixes in readelf. added --debug-dump=info to the tests
Eli Bendersky [Thu, 24 Nov 2011 07:05:44 +0000 (09:05 +0200)]
fixes in readelf. added --debug-dump=info to the tests

13 years agoit's alive, ALIVEhg sthg st! DWARF relocations seem to be working fine
Eli Bendersky [Thu, 24 Nov 2011 06:12:37 +0000 (08:12 +0200)]
it's alive, ALIVEhg sthg st! DWARF relocations seem to be working fine

13 years agostill not working, but getting there. need to revise DWARF processing for per-section...
Eli Bendersky [Wed, 23 Nov 2011 14:01:52 +0000 (16:01 +0200)]
still not working, but getting there. need to revise DWARF processing for per-section streams

13 years agonothing works because we're in the middle of a relocation revamp - BUT IT WILL!!
Eli Bendersky [Wed, 23 Nov 2011 04:54:40 +0000 (06:54 +0200)]
nothing works because we're in the middle of a relocation revamp - BUT IT WILL!!

13 years agoadded extra description for DW_AT_import to conform with readelf
Eli Bendersky [Sat, 19 Nov 2011 13:29:51 +0000 (15:29 +0200)]
added extra description for DW_AT_import to conform with readelf

13 years agothe relocation manager for dwarf works! sdf
Eli Bendersky [Fri, 18 Nov 2011 10:02:57 +0000 (12:02 +0200)]
the relocation manager for dwarf works!  sdf

13 years agosome code restructuring + initial version of dwarfrelocationmanager
Eli Bendersky [Fri, 18 Nov 2011 05:07:37 +0000 (07:07 +0200)]
some code restructuring + initial version of dwarfrelocationmanager

13 years agoadd __contains__ to construct's Container. this actually fixes Relocation.is_RELA...
Eli Bendersky [Fri, 18 Nov 2011 03:55:06 +0000 (05:55 +0200)]
add __contains__ to construct's Container. this actually fixes Relocation.is_RELA which wouldn't work otherwise. also add __repr__ and __str__ to Relocation

13 years agomerge & resolve conflicts from remote
Eli Bendersky [Wed, 16 Nov 2011 05:39:45 +0000 (07:39 +0200)]
merge & resolve conflicts from remote

13 years agofix the 'key to flags' text printed after section enumeration. probably to match...
Eli Bendersky [Wed, 16 Nov 2011 05:22:57 +0000 (07:22 +0200)]
fix the 'key to flags' text printed after section enumeration. probably to match a newer readelf version

13 years agosmall fixes to have formatting consistent with readelf
eliben [Mon, 14 Nov 2011 15:53:23 +0000 (17:53 +0200)]
small fixes to have formatting consistent with readelf

13 years agoadded description for location_expr
eliben [Sun, 6 Nov 2011 13:49:37 +0000 (15:49 +0200)]
added description for location_expr
kinda works vs. readelf!

13 years agoAdded string dumping for location expressions, with tests
eliben [Sun, 6 Nov 2011 13:27:57 +0000 (15:27 +0200)]
Added string dumping for location expressions, with tests

13 years agoadded basic visiting of all OPs in location_expr.GenericLocationExprVisitor
eliben [Sun, 6 Nov 2011 09:29:49 +0000 (11:29 +0200)]
added basic visiting of all OPs in location_expr.GenericLocationExprVisitor

13 years agomore work on location_expr
Eli Bendersky [Thu, 27 Oct 2011 19:02:24 +0000 (21:02 +0200)]
more work on location_expr

13 years agostarted location_expr, added unit tests. moved readelf unittest to a more appropriate...
Eli Bendersky [Thu, 27 Oct 2011 15:34:02 +0000 (17:34 +0200)]
started location_expr, added unit tests. moved readelf unittest to a more appropriate file name

13 years agoadded name field to AttributeValue
Eli Bendersky [Thu, 27 Oct 2011 12:29:32 +0000 (14:29 +0200)]
added name field to AttributeValue

13 years agoadded name field to AttributeValue
Eli Bendersky [Thu, 27 Oct 2011 12:28:12 +0000 (14:28 +0200)]
added name field to AttributeValue

13 years agomostly implemented extra information output for dwarf info section dump
Eli Bendersky [Thu, 27 Oct 2011 08:53:13 +0000 (10:53 +0200)]
mostly implemented extra information output for dwarf info section dump

13 years agomore descriptions added for DWARF info
eliben [Wed, 26 Oct 2011 11:10:58 +0000 (13:10 +0200)]
more descriptions added for DWARF info

13 years agoadded some basic description capabilities for DWARF attributes in debug_info
eliben [Wed, 26 Oct 2011 08:42:34 +0000 (10:42 +0200)]
added some basic description capabilities for DWARF attributes in debug_info

13 years ago* start adding debug_dump=info to readelf.py
eliben [Sun, 2 Oct 2011 11:47:12 +0000 (13:47 +0200)]
* start adding debug_dump=info to readelf.py
* adding support to dwarf code for the above

13 years agodocstring clarification for DWARFStructs
eliben [Sun, 2 Oct 2011 08:31:46 +0000 (10:31 +0200)]
docstring clarification for DWARFStructs

13 years agounflattening the DIE tree by CU done - now DIEs have functional iter_children, get_pa...
eliben [Sun, 2 Oct 2011 07:50:37 +0000 (09:50 +0200)]
unflattening the DIE tree by CU done - now DIEs have functional iter_children, get_parent and iter_siblings methods!

13 years agoCU will now parse all its DIEs (lazily, when any specific DIE is requested)
eliben [Mon, 26 Sep 2011 08:17:03 +0000 (11:17 +0300)]
CU will now parse all its DIEs (lazily, when any specific DIE is requested)

13 years agomoved utils/ dir to tests/
Eli Bendersky [Sun, 25 Sep 2011 02:38:07 +0000 (05:38 +0300)]
moved utils/ dir to tests/

13 years agoadded a utils folder with elf_creator.c
Eli Bendersky [Sun, 25 Sep 2011 02:37:30 +0000 (05:37 +0300)]
added a utils folder with elf_creator.c

13 years ago* added new test file - an object compiled from C++, on x64
Eli Bendersky [Fri, 23 Sep 2011 14:14:08 +0000 (17:14 +0300)]
* added new test file - an object compiled from C++, on x64
* adjusted readelf to limit width of symbol names in relocation dump

13 years agofix detection of flag_after_symtable in compare_output: has to be lower-cased after...
Eli Bendersky [Fri, 23 Sep 2011 14:04:21 +0000 (17:04 +0300)]
fix detection of flag_after_symtable in compare_output: has to be lower-cased after the change made to lower() the lines before comparing

13 years ago* added another test file (real-life object file borrowed from libelf)
Eli Bendersky [Fri, 23 Sep 2011 12:23:41 +0000 (15:23 +0300)]
* added another test file (real-life object file borrowed from libelf)
* print out notification about sections having relocations against them in the file
* munge run_tests to ignore case when comparing lines

13 years ago* renamed test files to be consistent
Eli Bendersky [Fri, 23 Sep 2011 09:03:48 +0000 (12:03 +0300)]
* renamed test files to be consistent
* added a real-life test file - the libelf SO on 32-bit
* fixed a formatting difference in readelf.py
* enabled selecting which test files to run on in run_tests.py

13 years agomerge
Eli Bendersky [Fri, 23 Sep 2011 08:00:34 +0000 (11:00 +0300)]
merge

13 years agorelocation output working in readelf comparison
Eli Bendersky [Fri, 23 Sep 2011 07:59:59 +0000 (10:59 +0300)]
relocation output working in readelf comparison

13 years agofixed parsing of r_info field
Eli Bendersky [Fri, 23 Sep 2011 03:06:47 +0000 (06:06 +0300)]
fixed parsing of r_info field

13 years agocleanup and cosmetics - for a healthy future!! er... what?
eliben [Thu, 22 Sep 2011 11:55:19 +0000 (14:55 +0300)]
cleanup and cosmetics - for a healthy future!! er... what?

13 years agoadding some useful attributes & method to DIE
eliben [Thu, 22 Sep 2011 10:54:26 +0000 (13:54 +0300)]
adding some useful attributes & method to DIE

13 years agosome refactoring. parsing a single DIE now appears to be working
eliben [Thu, 22 Sep 2011 10:17:07 +0000 (13:17 +0300)]
some refactoring. parsing a single DIE now appears to be working

13 years agomore preparations for full DIE parsing:
eliben [Thu, 22 Sep 2011 08:46:26 +0000 (11:46 +0300)]
more preparations for full DIE parsing:
- DWARFStructs got a new target_addr field that reflects the size of address fields in a CU
- DWARFInfo now gives access to the symbol table
- fixed stream parsing bugs that happened because the stream was not being preserved during parsing while issuing calls to other APIs that also move the stream

13 years agosome fixes in relocation printing. INFO STILL PRINTED ENDIAN-REVERSED -- WTF???
Eli Bendersky [Thu, 22 Sep 2011 03:37:07 +0000 (06:37 +0300)]
some fixes in relocation printing. INFO STILL PRINTED ENDIAN-REVERSED -- WTF???

13 years ago* completed implementation of abbrevtable
eliben [Wed, 21 Sep 2011 09:09:53 +0000 (12:09 +0300)]
* completed implementation of abbrevtable
* started implementing DIE
* added code to CompileUnit to tie them all together

DIEs start showing signs of life