Skip to content

Commit cb8613a

Browse files
committed
[lldb/crashlog] Fix JSON ObjectFile module loading issue
In 27f27d1, we added a new way to use textual (JSON) object files and symbol files with the interactive crashlog command, using the inlined symbols from the crash report. However, there was a missing piece after successfully adding the textual module to the target, we didn't mark it as available causing the module loading to exit early. This patch addresses that issue by marking the module as available when added successfully to the target. Differential Revision: https://reviews.llvm.org/D149477 Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent e2b11c2 commit cb8613a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lldb/examples/python/symbolication.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,11 @@ def add_module(self, target):
430430
with open(tf.name, "w") as f:
431431
f.write(json.dumps(data, indent=4))
432432
self.module = target.AddModule(tf.name, None, uuid_str)
433+
if self.module:
434+
# If we were able to add the module with inlined
435+
# symbols, we should mark it as available so load_module
436+
# does not exit early.
437+
self.unavailable = False
433438
if not self.module and not self.unavailable:
434439
return 'error: unable to get module for (%s) "%s"' % (
435440
self.arch,

0 commit comments

Comments
 (0)