Skip to content

Source Linking#465

Closed
ctaggart wants to merge 1 commit into
libgit2:vNextfrom
ctaggart:SourceLink
Closed

Source Linking#465
ctaggart wants to merge 1 commit into
libgit2:vNextfrom
ctaggart:SourceLink

Conversation

@ctaggart

Copy link
Copy Markdown
Contributor

http://blog.ctaggart.com/2013/07/source-linking.html

I used LigGit2Sharp to create a tool that does source linking. It would be awesome if you guys used it. Just adjust the github URL to libgit2sharp instead of ctaggart.

@nulltoken

Copy link
Copy Markdown
Member

@ctaggart SourceLink looks like a very interesting initiative!

However, before even considering about adding it as a part of the build toolchain, there are a few points I'd like to know more about:

  • Has SourceLink been tested on a Mono/Linux platform? Are .mdb files properly rewritten?
  • It looks like you're only embedding the x86 version of the libgit2 binaries in the SourceLink package. Is it on purpose? Has SourceLink been tested on a 64bits OS?
  • Is there a tool that you know of that would allow someone to check that the rewritten .pdb is valid/consistent?

@ctaggart

Copy link
Copy Markdown
Contributor Author

Thanks @nulltoken! I'd like to get it to a point that you can add it to your toolchain, so I'll use this feedback to gather requirements.

  • SourceLink has not been tested on Mono/Linux. I really like what you guys did with the Travis CI setup, so I'm going to try to setup something similar. That will show that it runs on Mono/Linux.
  • I don't know much at all about the mdb format and I'm having trouble finding any docs. I do know that the open source F# compiler has code for it and pdb files. I don't know if the mdb format supports something similar to the "srcsrv" stream that is used for source linking. Perhaps the Mono team could use this library to add support. :)
  • To check that a pdb is valid, I've manually tested with Visual Studio 2012 and tools like srctool and pdbstr from Debug Tools SDK. Those tools use the Debug Interface Access (DIA) COM API. I've generated an interop library that I plan to use for some unit tests on Windows. https://github.com/ctaggart/SourceLink/tree/master/Dia Microsoft.Cci.Pdb is a .NET library that unit tests could be written in to verify it works there.

@ctaggart

ctaggart commented Feb 6, 2014

Copy link
Copy Markdown
Contributor Author

@nulltoken, I've addressed most of your feedback. Please take another look at SourceLink. I've updated the documentation there. We are just now working through the last hurdle to get it working on the TeamCity build server that this project also uses.

SourceLink.Fake ships the LibGit2Sharp with the full NativeBinaries folder. It works on 32-bit and 64-bit. I ended up using kernel32 AddDllDirectory to add the NativeBinaries subfolder.It is another option that can be used in addition to or instead of adding to the PATH env var.

pdbstr.exe from the WDK is used now for modifying the pdb. This ensures that the pdb modify causes no harm.

Instead of MSBuild, I've integrated with FAKE - F# Make. The "SourceLink" target for SourceLink itself looks like this. I would be happy to create a build.fsx for LibGit2Sharp if you want to layout the requirements. I was just going to start with build, test, sourcelink, and nuget targets

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