From: Anders Dellien Date: Sat, 27 Oct 2018 12:19:16 +0000 (+0200) Subject: Remove unnecessary 'preserve_stream_pos' (#204) X-Git-Tag: v0.26~33 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9d3e901917045ff628a863eda192b7413adc6d5;p=pyelftools.git Remove unnecessary 'preserve_stream_pos' (#204) The stream position in the .debug_info stream can't change when reading from the .debug_abbrev stream. --- diff --git a/elftools/dwarf/die.py b/elftools/dwarf/die.py index 184ff8c..546d000 100755 --- a/elftools/dwarf/die.py +++ b/elftools/dwarf/die.py @@ -170,9 +170,7 @@ class DIE(object): self.size = self.stream.tell() - self.offset return - with preserve_stream_pos(self.stream): - abbrev_decl = self.cu.get_abbrev_table().get_abbrev( - self.abbrev_code) + abbrev_decl = self.cu.get_abbrev_table().get_abbrev(self.abbrev_code) self.tag = abbrev_decl['tag'] self.has_children = abbrev_decl.has_children()