From 71613fe0ff0d1541c609c43d35d686b161c58f22 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Wed, 7 Dec 2011 16:32:12 +0200 Subject: [PATCH] some documentation improvements --- elftools/dwarf/dwarfinfo.py | 12 +++++++----- elftools/dwarf/lineprogram.py | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/elftools/dwarf/dwarfinfo.py b/elftools/dwarf/dwarfinfo.py index d805d55..2201dd2 100644 --- a/elftools/dwarf/dwarfinfo.py +++ b/elftools/dwarf/dwarfinfo.py @@ -38,11 +38,13 @@ class DWARFInfo(object): debug_abbrev_sec, debug_str_sec, debug_line_sec): - """ stream: - A stream (file-like object) that contains debug sections - - elffile: - ELFFile reference + """ elffile: + ELFFile reference. Note that the whole DWARF processing code is + decoupled from the container file. This ELFFile object is just + used to obtain some attributes of the data, such as endianness. + If desired, DWARFInfo can be created without an actual ELFFile, + by passing a "mock" object that only provides the required + attributes. debug_*_sec: DebugSectionDescriptor for a section diff --git a/elftools/dwarf/lineprogram.py b/elftools/dwarf/lineprogram.py index 5db7204..8f8485c 100644 --- a/elftools/dwarf/lineprogram.py +++ b/elftools/dwarf/lineprogram.py @@ -102,6 +102,10 @@ class LineProgram(object): def get_entries(self): """ Get the decoded entries for this line program. Return a list of LineProgramEntry objects. + Note that this contains more information than absolutely required + for the line table. The line table can be easily extracted from + the list of entries by looking only at entries with non-None + state. """ if self._decoded_entries is None: self._decoded_entries = self._decode_line_program() -- 2.30.2