Remove unnecessary 'preserve_stream_pos' (#204)
authorAnders Dellien <anders@andersdellien.se>
Sat, 27 Oct 2018 12:19:16 +0000 (14:19 +0200)
committerEli Bendersky <eliben@users.noreply.github.com>
Sat, 27 Oct 2018 12:19:16 +0000 (05:19 -0700)
The stream position in the .debug_info stream can't change when
reading from the .debug_abbrev stream.

elftools/dwarf/die.py

index 184ff8cced2e73230777e1bc0cad903c9ec44d21..546d0000e8d740414ed756ab17c8f638c65acfbe 100755 (executable)
@@ -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()