From c3db8d7786b323a1a19a8678b7d8a2fa00830ca4 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Sun, 18 Dec 2011 05:41:16 +0200 Subject: [PATCH] some cosmetic changes + updating README --- README | 18 +++++++++++++++--- elftools/dwarf/die.py | 4 ---- elftools/dwarf/dwarfinfo.py | 3 +++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README b/README index cb92a07..35f81e1 100644 --- a/README +++ b/README @@ -1,6 +1,18 @@ -pyelftools ----------- +Introduction: what is pyelftools? +--------------------------------- + +**pyelftools** is a pure-Python library for parsing and analyzing ELF files +and DWARF debugging information. + +Pre-requisites +-------------- + +**pyelftools** needs only Python to run. It works with Python versions 2.6 and +2.7 (Python 3 support is planned but not yet implemented). For hacking on +**pyelftools** the requirements are a bit more strict, please see the +user's guide (ZZZ: link?) + + -Nice project, heh? diff --git a/elftools/dwarf/die.py b/elftools/dwarf/die.py index 82d65e9..fe4537b 100644 --- a/elftools/dwarf/die.py +++ b/elftools/dwarf/die.py @@ -159,10 +159,6 @@ class DIE(object): self.abbrev_code) self.tag = abbrev_decl['tag'] self.has_children = abbrev_decl.has_children() - - # The offset of the .debug_info section in the stream. Used to compute - # relative offset of attribute values to the beginning of the section. - section_offset = self.dwarfinfo.debug_info_sec.global_offset # Guided by the attributes listed in the abbreviation declaration, parse # values from the stream. diff --git a/elftools/dwarf/dwarfinfo.py b/elftools/dwarf/dwarfinfo.py index bc80224..ff99f17 100644 --- a/elftools/dwarf/dwarfinfo.py +++ b/elftools/dwarf/dwarfinfo.py @@ -25,6 +25,9 @@ from .callframe import CallFrameInfo # global_offset: the global offset of the section in its container file # size: the size of the section's data, in bytes # +# 'name' and 'global_offset' are for descriptional purposes only and +# aren't strictly required for the DWARF parsing to work. +# DebugSectionDescriptor = namedtuple('DebugSectionDescriptor', 'stream name global_offset size') -- 2.30.2