================
@@ -1277,6 +1277,20 @@ void SymbolFileDWARFDebugMap::DumpClangAST(Stream &s,
llvm::StringRef filter) {
});
}
+lldb_private::ModuleSpecList
+SymbolFileDWARFDebugMap::GetSeparateDebugInfoFiles() {
+ const uint32_t cu_count = GetNumCompileUnits();
+ lldb_private::ModuleSpecList spec_list;
+ for (uint32_t cu_idx = 0; cu_idx < cu_count; ++cu_idx) {
+ const auto &info = m_compile_unit_infos[cu_idx];
+ if (info.so_file.GetPath().empty())
+ continue;
+
+ spec_list.Append(lldb_private::FileSpec(info.oso_path));
----------------
clayborg wrote:
You also need to watch out for a path like "/path/foo.a(bar.o)". This code will
split the path if needed and also get the OSO modification time correctly:
```
ModuleSpec spec;
FileSpec oso_file;
ConstString oso_object;
if (ObjectFile::SplitArchivePathWithObject(info.oso_path.GetStringRef(),
oso_file, oso_object,
/*must_exist=*/false)) {
spec.GetFileSpec() = oso_file;
spec.GetObjectName() = oso_object;
} else {
spec.GetFileSpec() = FileSpec(info.oso_path.GetStringRef());
}
spec.GetObjectModificationTime() = info.oso_mod_time;
specs.Append(spec);
```
https://github.com/llvm/llvm-project/pull/144119
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits