[Lldb-commits] [lldb] dc275fd - [lldb/crashlog] Fix JSON ObjectFile module loading issue
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 28 12:51:29 PDT 2023
Author: Med Ismail Bennani
Date: 2023-04-28T12:51:01-07:00
New Revision: dc275fd03254d67d29cc70a5a0569acf24d2280d
URL: https://github.com/llvm/llvm-project/commit/dc275fd03254d67d29cc70a5a0569acf24d2280d
DIFF: https://github.com/llvm/llvm-project/commit/dc275fd03254d67d29cc70a5a0569acf24d2280d.diff
LOG: [lldb/crashlog] Fix JSON ObjectFile module loading issue
In 27f27d15f6c9, 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 <ismail at bennani.ma>
Added:
Modified:
lldb/examples/python/symbolication.py
Removed:
################################################################################
diff --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py
index 9784c28a44766..3a42f340ea578 100755
--- a/lldb/examples/python/symbolication.py
+++ b/lldb/examples/python/symbolication.py
@@ -401,6 +401,11 @@ def add_module(self, target):
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 so 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())
More information about the lldb-commits
mailing list