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

Extract the pdb path #45

Merged
merged 5 commits into from
May 1, 2016
Merged

Extract the pdb path #45

merged 5 commits into from
May 1, 2016

Conversation

nafest
Copy link
Contributor

@nafest nafest commented Apr 6, 2016

Normally the path to the PDB file is embedded in the unit tests
executable. Try to extract it and use it if present.

Generally the path to the PDB file is embedded in the unit tests
executable. Try to extract it and use it if present.
@NewProggie
Copy link

Nice, I'd need that in my project. 👍

@csoltenborn
Copy link
Owner

Looks interesting indeed at first sight - give us a couple of days to review the pull request. It won't take too long...

@csoltenborn
Copy link
Owner

And, btw, thanks for the pull request, @nafest :-)

@jgefele
Copy link
Collaborator

jgefele commented Apr 11, 2016

Hi @nafest,

thanks a lot for your contribution.

There is some code duplication with the ImportsParser in DiaResolver/NativeMethods.cs which uses native WINAPI methods from imageHlp.dll and dbgHelp.dll to handle most of the PE parsing. Particularly, your lines 109 to 283 could be turned into just a couple of library calls.

If you're familiar with native calls from C# (or don't fear getting into it) it would be great if you could refactor your code accordingly (and move it into NativeMethods.cs). Otherwise give me a shout and I'll assist or do it myself.

Cheers,
Jonas

@nafest
Copy link
Contributor Author

nafest commented Apr 12, 2016

I guess I can do that.

@nafest
Copy link
Contributor Author

nafest commented Apr 17, 2016

I moved all code to NativeMethods.c. I hoped that the VirtualAddress->Offset conversion would be unnecessaryif I use MapAndLoad, but that turned out to be wrong.

NativeMethods.c now contains a lot of structs from winnt.h. As all structs use an explicit layout, I could drop all fields that are not needed to get the path. What do you think?

@jgefele jgefele merged commit e851607 into csoltenborn:master May 1, 2016
@jgefele
Copy link
Collaborator

jgefele commented May 1, 2016

Hi @nafest,

thanks a lot for your work. I'm sorry for coming back to you so late and for being so unclear in my last comment. Most of the work could really be done by a call to ImageDirectoryEntryToData and to ImageRvaToVa.

I have merged your pull request and applied the substitution with library calls.

Cheers,
Jonas

@nafest
Copy link
Contributor Author

nafest commented May 1, 2016

Just had a look at your changes. That's way simpler than my way, indeed. Thanks for integrating this feature. I'm looking forward to reenable automatic extension updates ;-)

@csoltenborn
Copy link
Owner

Thanks to both of you! We are going to release 0.6 tomorrow night...

csoltenborn pushed a commit that referenced this pull request Oct 21, 2017
* add proj/vsix stuff for setup

* add swix targets for VS setup build

* split swixproj and vsmanproj for building

* add gitversioning and packages.config for nuget

* add solution name to swixproj so outputpath is correct

* import nuget props after common props so we know about the restore location

* use the right SolutionName

* fix in vsmanproj as well

* explicit extensiondir

* Update Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest.swr

remove double \
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.

4 participants