Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Merge Portable PDB implementation into master #3891
added a commit
this pull request
Jul 14, 2015
Jul 14, 2015
1 check passed
If you want my feedback, please reach out. I'm a .NET MVP. I helped make SourceLink over the last two years to automate source indexing. http://ctaggart.github.io/SourceLink/
My wish list:
@ctaggart Your feedback would indeed be welcome. The features you mention seem out of scope of the format. They are more asks for the tools that work with pdbs. The format just needs to contain enough information to support these tools.
Right now I'm thinking about adding a compiler parameter that specifies a file with additional custom debug information data. Something like
In addition, we are also thinking about the ability to mark input source files as "debuggable tool generated file" (i.e. not checked into any source control, but still something that the user would want to step thru). The content of such files would be zip compressed and stored in the Portable PDB as well.
Each kind of source server (GIT, TFS, Subver, etc) has their own format. A source server specific tool would need to run as a task before compilation and create the CDI file passed to /customDebugInfo.
Since the SHA1 hashes of all source files are already included in the Document table the only information needed to find the sources in GIT repo would be the URL of the repo. So the generated CDI would just contain that.
That may work. Right now, adding the source index to a pdb is done as a step after compilation. The advantage is that you can then get a list of files that the compiler has added symbols for and only index them. It would be ok to add a list of all the compiled files. After the ppdb is created, it would be useful to have another hook for validation of the source index.
Today, the source index is missing a way to specify the HTTP Authentication Scheme. It works with Basic Auth and Windows Auth. There is no way to set something so that
@ctaggart Rewriting PDB and adding more data after the fact is problematic. When the compiler builds in deterministic mode it calculates the MVID and PDB ID as a hash of the PE and PDB files, respectively. These values are then saved in the file. Any changes in the content would require rehashing of both PE and PDB.
I actually don't understand why the current source information includes a map of all source files to source control URIs. To be able to find a source file on a TFS/sd server the only information necessary is the server URL and a workspace mapping.
+1 for the suggestion of erik-kallen to (optionally!) embed the source in the pdb.
It might also be useful for nugget libraries. Instead of having to configure 1) nuget, 2) symbol server and 3) source server, you could skip 3. (Some nuget packages also contain the pdb, so these could be self-contained, but that practice might not be optimal, as it increases the size of the package)
Lastly, it might be useful for offline scenarios, where you have the pdb but no access to the internet to download the sources.