[Lldb-commits] [lldb] [lldb] Don't create instance of `SymbolFileDWARFDebugMap` for non-Mach-O files (PR #139170)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 3 16:15:11 PDT 2025
================
@@ -246,6 +246,9 @@ llvm::StringRef SymbolFileDWARFDebugMap::GetPluginDescriptionStatic() {
}
SymbolFile *SymbolFileDWARFDebugMap::CreateInstance(ObjectFileSP objfile_sp) {
+ // Don't create a debug map if the object file isn't a Mach-O.
+ if (!objfile_sp->GetArchitecture().GetTriple().isAppleMachO())
----------------
JDevlieghere wrote:
I was worried about unconditionally dereferencing `objfile_sp`, but it looks like this should always be called with a valid pointer. We could add an `assert` but I don't see any other places where we do this (although they usually just forward to the ctor).
https://github.com/llvm/llvm-project/pull/139170
More information about the lldb-commits
mailing list