Cannot start debugging

Sysprogs forums Forums VisualDDK/VirtualKD discussion Cannot start debugging

Viewing 15 posts - 1 through 15 (of 43 total)
  • Author
    Posts
  • #317
    Anonymous
    Participant

    Hi,

    I am trying to build and debug a driver that performs registry callbacks and i’ve been trying to get Visual DDK to work. I’ve successfully installed it on my host machine and VM. Now, I’m just having some issues with using my source files and getting it to build and debug.

    I load my own source files and put everything in the project folder. I also have a ‘sources’ file because I use the WinDDK build. Here is my sources file:

    
    TARGETNAME = wlreg
    TARGETTYPE = DRIVER
    
    LINKER_FLAGS=$(LINKER_FLAGS) /IGNORE:4210
    
    TARGETLIBS = 
    $(DDK_LIB_PATH)ntoskrnl.lib 
    $(DDK_LIB_PATH)wdmsec.lib
    
    INCLUDES = ..;....include;
    
    SOURCES = 
    ..Capture.cpp 
    ..Device.cpp 
    ..Driver.cpp 
    ..Filter.cpp 
    ..MultiQueue.cpp 
    ..Process.cpp 
    ..BufferWriter.cpp 
    FilterWin7.cpp
    

    Do I have to do anything special in Visual Studio project properties to get it to build?

    #1808
    support
    Keymaster

    You can either create a new “make project” so that Visual Studio will invoke “build”, or use VisualDDK project wizard and select “use existing files” to have the project created for you.

    #1809
    jlam9012
    Participant

    I tried selecting ‘use existing files’ with the VisualDDK project wizard. Here is the build output:

    1>
    
    Build started: Project: Driver1, Configuration: Debug Win32
    
    1>Build started 6/30/2011 11:23:10 AM.
    1>Build:
    1> OACR monitor running already
    1> path contains nonexistant c:program files (x86)microsoft visual studio 10.0common7toolsbin, removing
    1> BUILD: Compile and Link for x86
    1>
    1> BUILD: Loading c:winddk7600.16385.1build.dat...
    1>
    1> BUILD: Computing Include file dependencies:
    1>
    1> BUILD: Start time: Thu Jun 30 11:23:10 2011
    1> BUILD: Saving c:winddk7600.16385.1build.dat...
    1>
    1> BUILD: Finish time: Thu Jun 30 11:23:11 2011
    1> BUILD: Done
    1>
    1>
    1>
    1> 0 files compiled - 1 Warning
    1>
    1>
    1>Build succeeded.
    1>
    1>Time Elapsed 00:00:01.14
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
    #1810
    jlam9012
    Participant

    I tried selecting “use existing files” in the VisualDDK Project Wizard and got this build output:

    1>
    
    Build started: Project: Driver1, Configuration: Debug Win32
    
    1>Build started 6/30/2011 11:23:10 AM.
    1>Build:
    1> OACR monitor running already
    1> path contains nonexistant c:program files (x86)microsoft visual studio 10.0common7toolsbin, removing
    1> BUILD: Compile and Link for x86
    1>
    1> BUILD: Loading c:winddk7600.16385.1build.dat...
    1>
    1> BUILD: Computing Include file dependencies:
    1>
    1> BUILD: Start time: Thu Jun 30 11:23:10 2011
    1> BUILD: Saving c:winddk7600.16385.1build.dat...
    1>
    1> BUILD: Finish time: Thu Jun 30 11:23:11 2011
    1> BUILD: Done
    1>
    1>
    1>
    1> 0 files compiled - 1 Warning
    1>
    1>
    1>Build succeeded.
    1>
    1>Time Elapsed 00:00:01.14
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
    #1811
    jlam9012
    Participant

    Please disregard my last 2 posts. I was able to get the driver to successfully build in Visual studio – hooray!!

    But now, it gives me the error

    “VisualDDK: Cannot start debugging: One of the library files needed to run this application cannot be found.”

    The driver does successfully build – all my source files compile and I get a .sys file.

    Thanks

    #1812
    support
    Keymaster
    #1813
    jlam9012
    Participant

    @bazis wrote:

    Hi, try this build: http://visualddk.sysprogs.org/test/VisualDDK-1.5.3.exe

    I tried that but still getting same error 🙁

    #1814
    support
    Keymaster

    Did you install the 32-bit Debugging tools?

    #1815
    jlam9012
    Participant

    On the host machine or virtual machine?

    #1816
    support
    Keymaster

    host machine

    #1817
    jlam9012
    Participant

    Yes, I have installed the 32 bit debugging tools for windows on the host machine

    #1827
    support
    Keymaster

    Please download VisualDDK 1.5.4, select “register debug version of DDKDebugger.dll” in installer, run Visual Studio as administrator, attempt debugging and post the DDKDebugger.log file from VisualDDK directory here. The log file should contain problem details.

    #1826
    jlam9012
    Participant

    DDKDebugger.log

    Initializing MSDBG session…
    Loading dbgtools DLLs from C:Program Files (x86)Debugging Tools for Windows (x86)…
    Session initialized successfully.

    + 0.000 [ 0 ms]: MSDbgSession::UpdateOutputMask()
    Session status changed to 4
    + 0.015 [ 2840 ms]: BasicMSDbgSession::StartSession()

    #1824
    support
    Keymaster

    OK, I am assuming the problem occurs because the launcher cannot find the compiled sys file. You can try experimenting with the launcher settings, or installing the driver manually and using the Debug->Attach dialog to attach to the target machine.

    #1825
    jlam9012
    Participant

    Ok, I changed the “Driver file path on the target machine” to where my driver is on the vm. My driver is named wlreg.sys but it keeps trying to find Driver1.sys (Driver1 is the name of my VS project). How can i get it to stop searching for Driver1.sys…do I have to change the VS project name to the name of my driver?

Viewing 15 posts - 1 through 15 (of 43 total)
  • You must be logged in to reply to this topic.