chromiumos/third_party/pyelftools.git
8 weeks agoAdd README.chromium. 45/45945/3 master release-R27-3912.B stabilize-4008.0.B stabilize-4035.0.B toolchainA
Ryan Cui [Wed, 20 Mar 2013 01:21:17 +0000 (18:21 -0700)]
Add README.chromium.

So that we can add pyelftools (along with chromite) to the Chromium
checkout.

BUG=None
TEST=None

Change-Id: Icf7f161ec674bfb3a4fe964f3483794e7430797c
Reviewed-on: https://gerrit.chromium.org/gerrit/45945
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
3 months agoPrevent .pyc files from showing in git output 60/41960/2 factory-spring-3842.B firmware-spring-3824.4.B firmware-spring-3824.B firmware-spring-3833.B release-R26-3701.B stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-bluetooth-smart toolchain-3701.42.B
Vadim Bendebury [Thu, 24 Jan 2013 21:51:07 +0000 (13:51 -0800)]
Prevent .pyc files from showing in git output

BUG=None
TEST=manual
   . running

    git status

   does not show  a bunch of .pyc files anymore

Change-Id: I153da9059adb0b7ba4c4de28d52c8024123bec2d
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41960
Reviewed-by: Eli Bendersky <eliben@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
5 months agoadd Elf_Dyn support 67/38667/5 factory-3536.B release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize2 toolchain-3428.65.B
Mike Frysinger [Mon, 12 Nov 2012 21:38:35 +0000 (16:38 -0500)]
add Elf_Dyn support

This adds support for Elf_Dyn tags.  Pull request sent to upstream:
https://bitbucket.org/eliben/pyelftools/pull-request/5/add-support-for-parsing-of-the-dynamic/diff

BUG=chromium-os:36453
TEST=lddtree.py works

Change-Id: Iaf383eacc45adccb4dfc33e275028a8e7f58ff1e
Reviewed-on: https://gerrit.chromium.org/gerrit/38667
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
10 months agoAdded dwarf_decode_address.py example
Eli Bendersky [Thu, 5 Jul 2012 03:32:09 +0000 (06:32 +0300)]
Added dwarf_decode_address.py example

15 months agoAdded tag v0.20 for changeset 706dbb8620bd
Eli Bendersky [Mon, 30 Jan 2012 17:21:02 +0000 (19:21 +0200)]
Added tag v0.20 for changeset 706dbb8620bd

15 months agopython 3 version and README update v0.20
Eli Bendersky [Mon, 30 Jan 2012 17:20:41 +0000 (19:20 +0200)]
python 3 version and README update

15 months agoAdded tag v0.20 for changeset 68b18168051a
Eli Bendersky [Fri, 27 Jan 2012 08:39:14 +0000 (10:39 +0200)]
Added tag v0.20 for changeset 68b18168051a

15 months agoMore changes to port to Python 3
Eli Bendersky [Fri, 27 Jan 2012 08:25:47 +0000 (10:25 +0200)]
More changes to port to Python 3
All tox tests pass now!!

15 months agoinitial efforts porting pyelftools to python 3. some basic ELF functionality working
Eli Bendersky [Fri, 27 Jan 2012 05:08:05 +0000 (07:08 +0200)]
initial efforts porting pyelftools to python 3. some basic ELF functionality working

15 months agoadding more construct's files
Eli Bendersky [Thu, 26 Jan 2012 04:51:59 +0000 (06:51 +0200)]
adding more construct's files

15 months agoimported new version of construct with Python 3 compatibility
Eli Bendersky [Thu, 26 Jan 2012 04:49:19 +0000 (06:49 +0200)]
imported new version of construct with Python 3 compatibility

16 months agoIssue #3: make examples/elf_low_high_api.py more generic. Patch by Jessica McKellar
Eli Bendersky [Wed, 11 Jan 2012 15:40:03 +0000 (17:40 +0200)]
Issue #3: make examples/elf_low_high_api.py more generic. Patch by Jessica McKellar

16 months agochange order of tox tests to run examples before readelf (since they're much shorter)
Eli Bendersky [Wed, 11 Jan 2012 15:33:47 +0000 (17:33 +0200)]
change order of tox tests to run examples before readelf (since they're much shorter)

16 months agoIssue #2: made all examples run (and test/run_examples_test.py pass) on Windows.
eli.bendersky [Wed, 11 Jan 2012 13:56:41 +0000 (15:56 +0200)]
Issue #2: made all examples run (and test/run_examples_test.py pass) on Windows.

16 months agoCHANGES update
Eli Bendersky [Sat, 7 Jan 2012 18:45:49 +0000 (20:45 +0200)]
CHANGES update

16 months agoFix Container's __pretty_str__ to use str instead of repr. This provides more consist...
Eli Bendersky [Sat, 7 Jan 2012 18:44:43 +0000 (20:44 +0200)]
Fix Container's __pretty_str__ to use str instead of repr. This provides more consistent output across platforms for integers. Patch by Jessica McKellar

16 months agoadd ref output for dwarf_range_lists
Eli Bendersky [Sat, 7 Jan 2012 14:39:23 +0000 (16:39 +0200)]
add ref output for dwarf_range_lists

16 months agominor tweaks + new tag for release
Eli Bendersky [Fri, 6 Jan 2012 04:01:15 +0000 (06:01 +0200)]
minor tweaks + new tag for release

16 months agoAdded tag v0.10 for changeset b1c15add0da8
Eli Bendersky [Fri, 6 Jan 2012 04:00:59 +0000 (06:00 +0200)]
Added tag v0.10 for changeset b1c15add0da8

16 months agoadded parsing of .debug_ranges v0.10
Eli Bendersky [Thu, 29 Dec 2011 04:10:53 +0000 (06:10 +0200)]
added parsing of .debug_ranges

16 months agoupdated MANIFEST and tox to include and run example tests
Eli Bendersky [Wed, 28 Dec 2011 08:17:26 +0000 (10:17 +0200)]
updated MANIFEST and tox to include and run example tests

16 months agoinitial version of example tests
Eli Bendersky [Wed, 28 Dec 2011 08:06:55 +0000 (10:06 +0200)]
initial version of example tests

16 months agoa bit of refactoring in the test/ dir + completed dwarf_location_lists example
Eli Bendersky [Wed, 28 Dec 2011 07:21:14 +0000 (09:21 +0200)]
a bit of refactoring in the test/ dir  + completed dwarf_location_lists example

16 months agolocation lists kinda working. need more docs & readelf support
Eli Bendersky [Wed, 28 Dec 2011 04:37:16 +0000 (06:37 +0200)]
location lists kinda working. need more docs & readelf support

16 months ago a bit progress on locationlists
Eli Bendersky [Tue, 27 Dec 2011 04:51:20 +0000 (06:51 +0200)]
 a bit progress on locationlists

16 months agobasic preparations for parsing location lists
Eli Bendersky [Tue, 27 Dec 2011 03:25:35 +0000 (05:25 +0200)]
basic preparations for parsing location lists

16 months agolazy parsing of CUs
Eli Bendersky [Mon, 26 Dec 2011 04:19:50 +0000 (06:19 +0200)]
lazy parsing of CUs

16 months agosimple refactoring of DWARF expr descriptions to enable use from other callers
Eli Bendersky [Mon, 26 Dec 2011 03:46:56 +0000 (05:46 +0200)]
simple refactoring of DWARF expr descriptions to enable use from other callers

16 months agoanother example
Eli Bendersky [Sun, 25 Dec 2011 03:38:46 +0000 (05:38 +0200)]
another example

16 months 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

16 months 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

16 months 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

16 months 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

16 months 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

16 months 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

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

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

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

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

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

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

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

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

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

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

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

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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

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

17 months 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

17 months 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

17 months 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

17 months 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)

17 months 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

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

17 months 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

17 months 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'

17 months 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'

17 months 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

17 months 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

17 months 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

17 months 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]

17 months 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

17 months 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

17 months 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

17 months 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

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

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

17 months 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

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

17 months 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

17 months 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

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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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

17 months 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!!

17 months 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

18 months 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

18 months 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

18 months 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

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

18 months 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

18 months 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