[Lldb-commits] [lldb] Add more ways to find the .dwp file. (PR #81067)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 8 08:29:57 PST 2024
================
@@ -4349,26 +4349,53 @@ SymbolFileDWARFDebugMap *SymbolFileDWARF::GetDebugMapSymfile() {
const std::shared_ptr<SymbolFileDWARFDwo> &SymbolFileDWARF::GetDwpSymbolFile() {
llvm::call_once(m_dwp_symfile_once_flag, [this]() {
+ // Create a list of files to try and append .dwp to
+ FileSpecList symfiles;
+ // Append the module's object file path.
+ const FileSpec module_fspec = m_objfile_sp->GetModule()->GetFileSpec();
+ symfiles.Append(module_fspec);
+ // Append the object file for this SymbolFile only if it is different from
+ // the module's file path. Our main module could be "a.out", our symbol file
+ // could be "a.debug" and our ".dwp" file might be "a.debug.dwp" instead of
+ // "a.out.dwp".
+ const FileSpec symfile_fspec(m_objfile_sp->GetFileSpec());
+ if (symfile_fspec != module_fspec) {
+ symfiles.Append(symfile_fspec);
+ } else {
+ // If we don't have a separate debug info file, then try stripping the
+ // extension. We main module could be "a.debug" and the .dwp file could be
----------------
adrian-prantl wrote:
"The" main module?
https://github.com/llvm/llvm-project/pull/81067
More information about the lldb-commits
mailing list