mbikovitsky / WingDbg

Friends don't let friends debug alone
GNU General Public License v3.0
41 stars 9 forks source link

Compilation with Visual Studio 2019 under Windows 10 19H2 #2

Open sparkyparrot opened 4 years ago

sparkyparrot commented 4 years ago

ADD TO WIKI HOW TO COMPILE and update releases to compile. I have x64/x86 debug and release if you need. Compiled under windows 10.0.18363.815 with Visual Studio 2019 16.5.3

The release is not properly working with last version of windows/windbg, you can load the extension but register value are wrong. Also while cloning project with git, deviare project is unable to compile so had to get it directly on Deviare github.

I managed to get it working by:

  1. Compiling Deviare NktHookLib project in a separate folder , the github project give you all .sln files for different visual studio version.

  2. Configure Deviare Project to target : Visual Studio 2017 - Windows XP (v141_xp) toolset, you can add it with the Visual Studio 2019 Installer.

3.a Remove Deviare Project from the WingDbg solution 3.b Add the library file NktHookLib (ex: NktHookLib64.lib or NktHookLib64_Debug.lib) I compiled for the corresponding build of WingDbg (Debug/Release x64) by adding a link directly in the Library -> Input file type

  1. Recompile WingDbg with the target : Visual Studio 2017 - Windows XP (v141_xp)

  2. Normal install : Copy to .extpath directory of the debugger, load with .load wingdbg , run with !regfix

Its working but as I struggle a bit , this might help some people.

cr3pte commented 2 years ago

I was able to build it from with in the same project(sln) with VS2017 and VS2019 clean. Which picked up Visual Studio 2015 - Windows XP (v140_xp) as target although for VS2019 XP Support shows as deprecated.

Before the build had to manually do git submodule update --init --recursive in Deviare-InProc, which has udis86 as it's submodule. refer:

Then it works as expected.

.load wingdbg.dll
!regfix