Skip to content

Add PDB generation support patches#46

Open
revng-claudietto wants to merge 1 commit intorevng:developfrom
revng-claudietto:feature/pdb-hacks
Open

Add PDB generation support patches#46
revng-claudietto wants to merge 1 commit intorevng:developfrom
revng-claudietto:feature/pdb-hacks

Conversation

@revng-claudietto
Copy link

Summary

  • Add case-insensitive path resolution fallback in FileManager::getStatValue for Windows header lookups
  • Retain declaration-only DISubprogram in CGDebugInfo so function prototypes survive into PDB output
  • Add PDB_TRAVERSE_FILE-driven type/function emission in CodeGenModule to selectively emit debug info from whitelisted headers
  • Emit LF_FUNC_ID for declaration-only subprograms in CodeViewDebug

These patches enable clang to produce PDB files containing Windows API type information from win32metadata headers.

Files changed

  • clang/lib/Basic/FileManager.cpp — case-insensitive stat fallback
  • clang/lib/CodeGen/CGDebugInfo.cpp — retain declaration-only subprograms
  • clang/lib/CodeGen/CodeGenModule.cppPDB_TRAVERSE_FILE whitelist + selective type/function emission
  • llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cppLF_FUNC_ID for declaration-only subprograms

- Case-insensitive file lookup fallback for Windows SDK headers on Linux
- Emit debug info for all types and extern function declarations from
  whitelisted headers (PDB_TRAVERSE_FILE env var)
- Retain declaration-only subprograms in PDB/DWARF output
- Emit LF_FUNC_ID for declaration-only subprograms in CodeView
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments