renamed 'location expression' to the more general 'dwarf expression'
diff --git a/elftools/dwarf/dwarf_expr.py b/elftools/dwarf/dwarf_expr.py
index 6140d20..7e1f65f 100644
--- a/elftools/dwarf/dwarf_expr.py
+++ b/elftools/dwarf/dwarf_expr.py
@@ -98,19 +98,11 @@
self._cur_opcode_name = None
self._cur_args = []
- def process_expr(self, loc_expr):
- """ Process (visit) a DWARF expression. Currently two possible
- types are supported for expr:
-
- 1. File-like stream object
- 2. List of byte values (the result of parsed DW_FORM_block*
- attributes).
+ def process_expr(self, expr):
+ """ Process (visit) a DWARF expression. expr should be a list of
+ (integer) byte values.
"""
- if hasattr(loc_expr, 'read') and hasattr(loc_expr, 'seek'):
- # looks like a stream
- self.stream = loc_expr
- else:
- self.stream = StringIO(bytelist2string(loc_expr))
+ self.stream = StringIO(bytelist2string(expr))
while True:
# Get the next opcode from the stream. If nothing is left in the
diff --git a/tests/test_dwarf_expr.py b/tests/test_dwarf_expr.py
index 4202633..67cfc48 100644
--- a/tests/test_dwarf_expr.py
+++ b/tests/test_dwarf_expr.py
@@ -50,11 +50,6 @@
self.assertEqual(self.visitor.get_str(),
'DW_OP_mod; DW_OP_mul; DW_OP_mod; DW_OP_mul; DW_OP_mod; DW_OP_mul')
- def test_stream_input(self):
- self.visitor.process_expr(StringIO('\x1b'))
- self.assertEqual(self.visitor.get_str(),
- 'DW_OP_div')
-
if __name__ == '__main__':
unittest.main()