Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

Wednesday, December 08, 2010

Kernel Debugging Windows 7

9 comments
Here are the settings that need to be done in Windows 7 for kernel debugging:

1. start cmd with admin rights
2. run bcdedit to see existing boot entries
3. create a copy of current boot entry. run bcdedit to get the ID of newly created entry.
bcdedit /copy {current}/d "debugboot"
4. set new boot entry as default. run bcdedit again to know the Identifier of this new debugboot entry.
bcdedit /default
5. set debug ON for this entry
bcdedit /debug ON
6. set debug settings: for e.g. for Serial port, COM1 and baudrate 115200
bcdedit /dbgsettings serial debugport:1 baudrate:115200
7. reboot the machine and you are done.

For debugging Windows over a Virtual machine; follow these steps;
1. In your windows guest VM, add a serial port as a named pipe with this end as server and other end as application.
2. create a shortcut of windbg and configure shortcut target as :
C:\WinDDK\7600.16385.1\Debuggers\windbg.exe -b -k com:pipe,port=\\.\pipe\com_1,resets=0





Here is some similar documentation on VMWare site:
http://www.vmware.com/support/ws3/doc/ws32_devices3.html#1023803

documentation on MSDN site:

http://technet.microsoft.com/en-us/library/cc721886%28WS.10%29.aspx



Read More...

Monday, December 25, 2006

Debugging windows running in VMWare

1 comment
Ideal Windows debugging setup:
--------------------------------------------------------------------------
Run target OS in VMWare and run WinDBG on host machine
Advantages:
a) No extra hardware required
b) No Serial cable required
c) Carry your debug environment anywhere

Steps
--------------------------------------------------------------------------

1. In VMWare add a new serial port to the target OS image
Add a new serial port, set it to
Connect at power on checked
"Use named pipe"
This end is the server
The other end is an application
yield CPU on poll: unchecked
2. Start target OS in VMWare.
3. In c:\boot.ini, make the usual debug entries
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect /debug /baudrate=115200 /debugport=com1
4. Reboot the target machine

5. Start WinDBG on host OS using command line
"C:\Program Files\Debugging Tools for Windows\windbg.exe" -b -k com:pipe,port=\\.\pipe\com_1,resets=0


To download Windows symbols from Microsoft Public symbol download server add this to symbol file path in Windbg
SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols
Note:Replace c:\websymbols with any local directory on your machine where you want to store the symbols

You are done!
Read More...