Skip to content
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

How to read Source Link JSON data from PDBs #723

Closed
gregwb opened this issue Jul 23, 2021 · 1 comment
Closed

How to read Source Link JSON data from PDBs #723

gregwb opened this issue Jul 23, 2021 · 1 comment

Comments

@gregwb
Copy link

gregwb commented Jul 23, 2021

Is there a supported way for retrieving Source Link URLs from PDB files?

For writing tools that use Source Link data, there's a useful SourceLinkMap for parsing the JSON, but how can the JSON be read from a PDB in the first place?

I note that the symreader-converter project has code for reading Source Link data, but from my experimentation, I believe the APIs used there do not support PDBs for native C++ projects. I would like in particular to be able to read Source Link data embedded in native PDBs by the C++ linker.

From this comment it appears at a pinch I may be able to use pdbstr.exe to extract streams sourcelink$1, sourcelink$2, ... etc. But I was hoping for a more convenient API than a command-line tool.

@tmat
Copy link
Member

tmat commented Jul 23, 2021

The debugger reads the data using IDiaDataSource3 from DIA APIs which are unfortunately not public currently.

We'll use https://developercommunity.visualstudio.com/t/Is-there-an-API-for-reading-Source-Link-/1468642 to track the feature request to make these APIs public.

@tmat tmat closed this as completed Jul 23, 2021
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

No branches or pull requests

2 participants