From 40b314cf340abf76b7876ec5a49367716c7565d7 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sat, 19 Oct 2024 10:56:54 +0200 Subject: [PATCH] dbghelp: Don't try to load PDB for a RSDS debug directory in .buildid section. Signed-off-by: Eric Pouech --- dlls/dbghelp/msc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index d9b37509a9b..e2e91e1abd2 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -4379,7 +4379,13 @@ static BOOL codeview_process_info(const struct process *pcs, TRACE("Got RSDS type of PDB file: guid=%s age=%08x name=%s\n", wine_dbgstr_guid(&rsds->guid), rsds->age, debugstr_a(rsds->name)); - ret = pdb_process_file(pcs, msc_dbg, rsds->name, &rsds->guid, 0, rsds->age); + /* gcc/mingw and clang can emit build-id information, but with an empty PDB filename. + * Don't search for the .pdb file in that case. + */ + if (rsds->name[0]) + ret = pdb_process_file(pcs, msc_dbg, rsds->name, &rsds->guid, 0, rsds->age); + else + ret = TRUE; break; } default: @@ -4487,7 +4493,7 @@ typedef struct _FPO_DATA __ENDTRY /* we haven't found yet any debug information, fallback to unmatched pdb */ - if (module->module.SymType == SymDeferred) + if (!ret && module->module.SymType == SymDeferred) { SYMSRV_INDEX_INFOW info = {.sizeofstruct = sizeof(info)}; char buffer[MAX_PATH];