JDevlieghere updated this revision to Diff 531562.
JDevlieghere marked 2 inline comments as done.
JDevlieghere added a comment.
Make the warning its own line
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
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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits