mib created this revision.
mib added a reviewer: JDevlieghere.
mib added a project: LLDB.
Herald added a project: All.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

In 27f27d15f6c9 
<https://reviews.llvm.org/rG27f27d15f6c90b026eca23b8ee238fdbf772fd80>, 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.

Signed-off-by: Med Ismail Bennani <ism...@bennani.ma>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149477

Files:
  lldb/examples/python/symbolication.py


Index: lldb/examples/python/symbolication.py
===================================================================
--- lldb/examples/python/symbolication.py
+++ lldb/examples/python/symbolication.py
@@ -401,6 +401,11 @@
                     with open(tf.name, 'w') as f:
                         f.write(json.dumps(data, indent=4))
                     self.module = target.AddModule(tf.name, None, uuid_str)
+                    if self.module:
+                        # If we were able to add the module with inlined
+                        # symbols, we should mark it as available to 
load_module
+                        # does not exit early.
+                        self.unavailable = False
             if not self.module and not self.unavailable:
                 return 'error: unable to get module for (%s) "%s"' % (
                     self.arch, self.get_resolved_path())


Index: lldb/examples/python/symbolication.py
===================================================================
--- lldb/examples/python/symbolication.py
+++ lldb/examples/python/symbolication.py
@@ -401,6 +401,11 @@
                     with open(tf.name, 'w') as f:
                         f.write(json.dumps(data, indent=4))
                     self.module = target.AddModule(tf.name, None, uuid_str)
+                    if self.module:
+                        # If we were able to add the module with inlined
+                        # symbols, we should mark it as available to load_module
+                        # does not exit early.
+                        self.unavailable = False
             if not self.module and not self.unavailable:
                 return 'error: unable to get module for (%s) "%s"' % (
                     self.arch, self.get_resolved_path())
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH]... Med Ismail Bennani via Phabricator via lldb-commits

Reply via email to