[Lldb-commits] [PATCH] D152886: [lldb] Make it easier to spot if sources were resolved in crashlog output
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 14 17:25:39 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7371ec76299d: [lldb] Have crashlog warn when remapped paths are inaccessible. (authored by JDevlieghere).
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152886/new/
https://reviews.llvm.org/D152886
Files:
lldb/examples/python/crashlog.py
Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -306,6 +306,8 @@
if self.show_symbol_progress():
with print_lock:
print("Getting symbols for %s %s..." % (uuid_str, self.path))
+ # Keep track of unresolved source paths.
+ unavailable_source_paths = set()
if os.path.exists(self.dsymForUUIDBinary):
dsym_for_uuid_command = "%s %s" % (self.dsymForUUIDBinary, uuid_str)
s = subprocess.check_output(dsym_for_uuid_command, shell=True)
@@ -335,6 +337,12 @@
plist["DBGSymbolRichExecutable"]
)
self.resolved_path = self.path
+ if "DBGSourcePathRemapping" in plist:
+ path_remapping = plist["DBGSourcePathRemapping"]
+ for _, value in path_remapping.items():
+ source_path = os.path.expanduser(value)
+ if not os.path.exists(source_path):
+ unavailable_source_paths.add(source_path)
if not self.resolved_path and os.path.exists(self.path):
if not self.find_matching_slice():
return False
@@ -373,6 +381,12 @@
):
with print_lock:
print("Resolved symbols for %s %s..." % (uuid_str, self.path))
+ if len(unavailable_source_paths):
+ for source_path in unavailable_source_paths:
+ print(
+ "Could not access remapped source path for %s %s"
+ % (uuid_str, source_path)
+ )
return True
else:
self.unavailable = True
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152886.531580.patch
Type: text/x-patch
Size: 2065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230615/2e6dc290/attachment.bin>
More information about the lldb-commits
mailing list