From f9d3e901917045ff628a863eda192b7413adc6d5 Mon Sep 17 00:00:00 2001 From: Anders Dellien Date: Sat, 27 Oct 2018 14:19:16 +0200 Subject: [PATCH] Remove unnecessary 'preserve_stream_pos' (#204) The stream position in the .debug_info stream can't change when reading from the .debug_abbrev stream. --- elftools/dwarf/die.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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() -- 2.30.2