Skip to content

[llvm-pdbutil] Pass filename when formatting setfile annotation #149705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jul 20, 2025

When dumping a PDB with an inlinesite that had a ChangeFile annotation, the Filename wasn't passed to the format string. This hit an assertion in debug mode and silently failed in release mode.

@llvmbot
Copy link
Member

llvmbot commented Jul 20, 2025

@llvm/pr-subscribers-debuginfo

Author: nerix (Nerixyz)

Changes

When dumping a PDB with an inlinesite that had a ChangeFile annotation, the Filename wasn't passed to the format string. This hit an assertion in debug mode and silently failed in release mode.


Full diff: https://github.com/llvm/llvm-project/pull/149705.diff

1 Files Affected:

  • (modified) llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (+1-1)
diff --git a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
index 66a091f50d6b2..caed429f8bc4f 100644
--- a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
+++ b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
@@ -773,7 +773,7 @@ Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR, InlineSiteSym &IS) {
         else
           return MaybeFile.takeError();
       }
-      P.format(" setfile {0} 0x{1}", utohexstr(FileOffset));
+      P.format(" setfile {0} 0x{1}", Filename, utohexstr(FileOffset));
       break;
     }
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants