================
@@ -1108,6 +1108,21 @@ std::optional<FileSpec> ObjectFilePECOFF::GetDebugLink() 
{
   return std::nullopt;
 }
 
+std::optional<FileSpec> ObjectFilePECOFF::GetPDBPath() {
+  llvm::StringRef pdb_file;
+  const llvm::codeview::DebugInfo *pdb_info = nullptr;
+  if (llvm::Error Err = m_binary->getDebugPDBInfo(pdb_info, pdb_file)) {
+    // Ignore corrupt DebugInfo sections.
+    llvm::consumeError(std::move(Err));
+    return std::nullopt;
+  }
+  if (pdb_file.empty()) {
+    // No DebugInfo section
+    return std::nullopt;
+  }
+  return FileSpec(pdb_file);
----------------
weliveindetail wrote:

Thanks, good point. Done

https://github.com/llvm/llvm-project/pull/183302
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to