Kernel Debugging Windows 7 from Virtual PC - Set up information

Hi all.

I am new in kernel debugging and I want to use windbg for kernel debugging Windows 7 on a Virtual PC. My host pc is also a Windows 7 machine.

On the Virtual PC I have set COM2 as a pipe: \.\pipe\pipe2

In addition I have enabled the kernel - debug mode on the Virtual PC using bcdedit. In particular the output of bcdedit /dbgsettings is:

PS C:\Windows\system32> bcdedit /dbgsettings
debugtype Serial
debugport 2
baudrate 115200
The operation completed successfully.

and I have also used EaseBCD to enable the option: ‘Run Windows in Kernel-Debug Mode’ (since there is no boot.ini file in Windows 7 to change settings from there).

On my host pc I am running windbg from an elevated command promt with the following arguments:

windbg -k com:pipe,port=\.\pipe\pipe2

Unfortunately the output I get at the command window of windbg is :

“Opened \.\pipe\pipe2
Waiting to reconnect. . .”

I was wondering if I am missing something at the set up :frowning:

Thanks a lot for your time
K

have you enabled debug /on

bootcfg /debug ON /ID 1


From: “Kostas Pelechrinis”
Sent: Tuesday, October 13, 2009 4:18 PM
To: “Kernel Debugging Interest List”
Cc:
Subject: [windbg] Kernel Debugging Windows 7 from Virtual PC - Set up
information

> Hi all.
>
> I am new in kernel debugging and I want to use windbg for kernel debugging
> Windows 7 on a Virtual PC. My host pc is also a Windows 7 machine.
>
> On the Virtual PC I have set COM2 as a pipe: \.\pipe\pipe2
>
> In addition I have enabled the kernel - debug mode on the Virtual PC using
> bcdedit. In particular the output of bcdedit /dbgsettings is:
>
> PS C:\Windows\system32> bcdedit /dbgsettings
> debugtype Serial
> debugport 2
> baudrate 115200
> The operation completed successfully.
>
> and I have also used EaseBCD to enable the option: ‘Run Windows in
> Kernel-Debug Mode’ (since there is no boot.ini file in Windows 7 to change
> settings from there).
>
> On my host pc I am running windbg from an elevated command promt with the
> following arguments:
>
> windbg -k com:pipe,port=\.\pipe\pipe2
>
> Unfortunately the output I get at the command window of windbg is :
>
> “Opened \.\pipe\pipe2
> Waiting to reconnect. . .”
>
> I was wondering if I am missing something at the set up :frowning:
>
> Thanks a lot for your time
> K
>
>
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

The virtual machine is running Windows 7 and there is not boot.ini file. bootcfg looks for the boot.ini file, so whenever I try to enable debug on with bootcfg I get the following error:

ERROR: Cannot open BOOT.INI file.

This is why I used EasyBCD to enable debug (I have checked the option ‘Run Windows in Kernel-Debug Mode’ since this one seemed to be the most related one and I rebooted the system).

:frowning:

— On Tue, 10/13/09, Vijay Pothireddy wrote:

> From: Vijay Pothireddy
> Subject: Re: [windbg] Kernel Debugging Windows 7 from Virtual PC - Set up information
> To: “Kernel Debugging Interest List”
> Cc: xxxxx@yahoo.com
> Date: Tuesday, October 13, 2009, 8:00 AM
> have you enabled debug /on
>
> bootcfg /debug ON /ID 1
>
>
> --------------------------------------------------
> From: “Kostas Pelechrinis”
> Sent: Tuesday, October 13, 2009 4:18 PM
> To: “Kernel Debugging Interest List”
> Cc:
> Subject: [windbg] Kernel Debugging Windows 7 from Virtual
> PC - Set up information
>
> > Hi all.
> >
> > I am new in kernel debugging and I want to use windbg
> for kernel debugging Windows 7 on a Virtual PC.? My
> host pc is also a Windows 7 machine.
> >
> > On the Virtual PC I have set COM2 as a pipe:
> \.\pipe\pipe2
> >
> > In addition I have enabled the kernel - debug mode on
> the Virtual PC using bcdedit.? In particular the output
> of bcdedit /dbgsettings is:
> >
> > PS C:\Windows\system32> bcdedit /dbgsettings
> > debugtype? ? ? ? ? ?
> ???Serial
> > debugport? ? ? ? ? ?
> ???2
> > baudrate? ? ? ? ? ?
> ? ? 115200
> > The operation completed successfully.
> >
> > and I have also used EaseBCD to enable the option:
> ‘Run Windows in Kernel-Debug Mode’ (since there is no
> boot.ini file in Windows 7 to change settings from there).
> >
> > On my host pc I am running windbg from an elevated
> command promt with the following arguments:
> >
> > windbg -k com:pipe,port=\.\pipe\pipe2
> >
> > Unfortunately the output I get at the command window
> of windbg is :
> >
> > “Opened \.\pipe\pipe2
> > Waiting to reconnect. . .”
> >
> > I was wondering if I am missing something at the set
> up :frowning:
> >
> > Thanks a lot for your time
> > K
> >
> >
> >
> >
> > —
> > WINDBG is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other
> seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR
> Online at http://www.osronline.com/page.cfm?name=ListServer
> >
>

You probably want to use bcdedit for Vista+ and not bootcfg.

Try “bcdedit /set debug on”.

The default transport and port settings should be com1 at 57600bps as I recall, but you can check or change these with “bcdedit /dbgsettings”.

  • S

-----Original Message-----
From: Kostas Pelechrinis
Sent: Tuesday, October 13, 2009 5:19
To: Kernel Debugging Interest List
Cc: xxxxx@lists.osr.com
Subject: Re: [windbg] Kernel Debugging Windows 7 from Virtual PC - Set up information

The virtual machine is running Windows 7 and there is not boot.ini file. bootcfg looks for the boot.ini file, so whenever I try to enable debug on with bootcfg I get the following error:

ERROR: Cannot open BOOT.INI file.

This is why I used EasyBCD to enable debug (I have checked the option ‘Run Windows in Kernel-Debug Mode’ since this one seemed to be the most related one and I rebooted the system).

:frowning:

— On Tue, 10/13/09, Vijay Pothireddy wrote:

> From: Vijay Pothireddy
> Subject: Re: [windbg] Kernel Debugging Windows 7 from Virtual PC - Set up information
> To: “Kernel Debugging Interest List”
> Cc: xxxxx@yahoo.com
> Date: Tuesday, October 13, 2009, 8:00 AM
> have you enabled debug /on
>
> bootcfg /debug ON /ID 1
>
>
> --------------------------------------------------
> From: “Kostas Pelechrinis”
> Sent: Tuesday, October 13, 2009 4:18 PM
> To: “Kernel Debugging Interest List”
> Cc:
> Subject: [windbg] Kernel Debugging Windows 7 from Virtual
> PC - Set up information
>
> > Hi all.
> >
> > I am new in kernel debugging and I want to use windbg
> for kernel debugging Windows 7 on a Virtual PC. My
> host pc is also a Windows 7 machine.
> >
> > On the Virtual PC I have set COM2 as a pipe:
> \.\pipe\pipe2
> >
> > In addition I have enabled the kernel - debug mode on
> the Virtual PC using bcdedit. In particular the output
> of bcdedit /dbgsettings is:
> >
> > PS C:\Windows\system32> bcdedit /dbgsettings
> > debugtype
> Serial
> > debugport
> 2
> > baudrate
> 115200
> > The operation completed successfully.
> >
> > and I have also used EaseBCD to enable the option:
> ‘Run Windows in Kernel-Debug Mode’ (since there is no
> boot.ini file in Windows 7 to change settings from there).
> >
> > On my host pc I am running windbg from an elevated
> command promt with the following arguments:
> >
> > windbg -k com:pipe,port=\.\pipe\pipe2
> >
> > Unfortunately the output I get at the command window
> of windbg is :
> >
> > “Opened \.\pipe\pipe2
> > Waiting to reconnect. . .”
> >
> > I was wondering if I am missing something at the set
> up :frowning:
> >
> > Thanks a lot for your time
> > K
> >
> >
> >
> >
> > —
> > WINDBG is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other
> seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR
> Online at http://www.osronline.com/page.cfm?name=ListServer
> >
>


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Actually I managed to find an interesting link on how to do this. After all it is not that simple :slight_smile:

http://www.microsoft.com/whdc/driver/tips/debug_vista.mspx#

Thanks for your time.

— On Tue, 10/13/09, Skywing wrote:

> From: Skywing
> Subject: RE: [windbg] Kernel Debugging Windows 7 from Virtual PC - Set up information
> To: “Kernel Debugging Interest List”
> Date: Tuesday, October 13, 2009, 11:45 AM
> You probably want to use bcdedit for
> Vista+ and not bootcfg.
>
> Try “bcdedit /set debug on”.
>
> The default transport and port settings should be com1 at
> 57600bps as I recall, but you can check or change these with
> “bcdedit /dbgsettings”.
>
> - S
>
> -----Original Message-----
> From: Kostas Pelechrinis
> Sent: Tuesday, October 13, 2009 5:19
> To: Kernel Debugging Interest List
> Cc: xxxxx@lists.osr.com
>
> Subject: Re: [windbg] Kernel Debugging Windows 7 from
> Virtual PC - Set up information
>
>
> The virtual machine is running Windows 7 and there is not
> boot.ini file.? bootcfg looks for the boot.ini file, so
> whenever I try to enable debug on with bootcfg I get the
> following error:
>
> ERROR: Cannot open BOOT.INI file.
>
> This is why I used EasyBCD to enable debug (I have checked
> the option? ‘Run Windows in Kernel-Debug Mode’ since
> this one seemed to be the most related one and I rebooted
> the system).
>
> :frowning:
>
> — On Tue, 10/13/09, Vijay Pothireddy
> wrote:
>
> > From: Vijay Pothireddy
> > Subject: Re: [windbg] Kernel Debugging Windows 7 from
> Virtual PC - Set up information
> > To: “Kernel Debugging Interest List”
> > Cc: xxxxx@yahoo.com
> > Date: Tuesday, October 13, 2009, 8:00 AM
> > have you enabled debug /on
> >
> > bootcfg /debug ON /ID 1
> >
> >
> > --------------------------------------------------
> > From: “Kostas Pelechrinis”
> > Sent: Tuesday, October 13, 2009 4:18 PM
> > To: “Kernel Debugging Interest List”
> > Cc:
> > Subject: [windbg] Kernel Debugging Windows 7 from
> Virtual
> > PC - Set up information
> >
> > > Hi all.
> > >
> > > I am new in kernel debugging and I want to use
> windbg
> > for kernel debugging Windows 7 on a Virtual PC.?
> My
> > host pc is also a Windows 7 machine.
> > >
> > > On the Virtual PC I have set COM2 as a pipe:
> > \.\pipe\pipe2
> > >
> > > In addition I have enabled the kernel - debug
> mode on
> > the Virtual PC using bcdedit.? In particular the
> output
> > of bcdedit /dbgsettings is:
> > >
> > > PS C:\Windows\system32> bcdedit /dbgsettings
> > > debugtype
> >? ? Serial
> > > debugport
> >? ? 2
> > > baudrate
> >? ???115200
> > > The operation completed successfully.
> > >
> > > and I have also used EaseBCD to enable the
> option:
> > ‘Run Windows in Kernel-Debug Mode’ (since there is no
> > boot.ini file in Windows 7 to change settings from
> there).
> > >
> > > On my host pc I am running windbg from an
> elevated
> > command promt with the following arguments:
> > >
> > > windbg -k com:pipe,port=\.\pipe\pipe2
> > >
> > > Unfortunately the output I get at the command
> window
> > of windbg is :
> > >
> > > “Opened \.\pipe\pipe2
> > > Waiting to reconnect. . .”
> > >
> > > I was wondering if I am missing something at the
> set
> > up :frowning:
> > >
> > > Thanks a lot for your time
> > > K
> > >
> > >
> > >
> > >
> > > —
> > > WINDBG is sponsored by OSR
> > >
> > > For our schedule of WDF, WDM, debugging and
> other
> > seminars visit:
> > > http://www.osr.com/seminars
> > >
> > > To unsubscribe, visit the List Server section of
> OSR
> > Online at http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
>
>
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
> visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online
> at http://www.osronline.com/page.cfm?name=ListServer
>