summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/debuginfo.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/debuginfo.py b/python/debuginfo.py
index 7e189afd..b1d25503 100644
--- a/python/debuginfo.py
+++ b/python/debuginfo.py
@@ -300,12 +300,13 @@ class DebugInfo(object):
core.BNFreeDebugInfoReference(self.handle)
@property
- def parsers(self) -> List[str]:
+ def parsers(self) -> Iterator[str]:
count = ctypes.c_ulonglong()
parsers = core.BNGetDebugParserNames(self.handle, count)
try:
assert parsers is not None, "core.BNGetDebugParserNames returned None"
- result.append(parsers[i].encode("utf-8"))
+ for i in range(0, count.value):
+ yield parsers[i].decode("utf-8")
finally:
core.BNFreeStringList(parsers, count.value)