[Lldb-commits] [PATCH] D104407: Improve path remapping in cross-debugging scenarios

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 25 12:53:01 PDT 2021


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

LGTM with a few nits



================
Comment at: lldb/source/Target/PathMappingList.cpp:160
+    auto e = llvm::sys::path::end(components);
+    if (component != e &&
+        llvm::sys::path::is_separator(*component->data(), style))
----------------
Can we rely on the path being normalized? If not, should this be `while` instead of `if`? 


================
Comment at: lldb/source/Target/PathMappingList.cpp:204
       continue;
-    fixed.SetFile(it.first.GetStringRef(), FileSpec::Style::native);
-    fixed.AppendPathComponent(path_ref);
+    auto orig = it.first.GetStringRef();
+    auto orig_style = FileSpec::GuessPathStyle(orig).getValueOr(
----------------
`orig_file`? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104407/new/

https://reviews.llvm.org/D104407



More information about the lldb-commits mailing list