Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when and how to use windbg kernel debugging

I found Windbg is very useful during development and debugging. but mostly i use windbg in use mode debugging.

  1. What kernel debugging can do in windbg? or When should I use windbg's kernel debugging?

  2. Is there a toturial about kernel debugging in windbg?

Thanks in advance.

like image 983
whunmr Avatar asked Jan 18 '10 11:01

whunmr


People also ask

What is WinDbg used for?

The Windows Debugger (WinDbg) can be used to debug kernel-mode and user-mode code, analyze crash dumps, and examine the CPU registers while the code executes. To get started with Windows debugging, see Getting Started with Windows Debugging.

How do I run a kernel debugger?

Starting the Debugging SessionOpen WinDbg as Administrator. On the File menu, choose Kernel Debug. In the Kernel Debugging dialog box, open the Local tab. Select OK.

How do I run WinDbg?

Launch Notepad and attach WinDbgOn the File menu, choose Open Executable. In the Open Executable dialog box, navigate to the folder that contains notepad.exe (typically, C:\Windows\System32). For File name, enter notepad.exe. Select Open.


1 Answers

you usually use kernel debugging when you need to debug low level device drivers interacting directly with the hardware.
It's more complicated to debug in kernel mode, among other things for a live kernel debug session you have to run the debugger on a different system than the one being debugged . for the majority of developers user mode is enough to do most of the work.
Advanced Windows Debugging is a very good book about debugging with wndbg (includes discussions about kernel debugging).

the dump analysis site has many tutorials including kernel debugging scenarios

like image 61
Alon Avatar answered Sep 24 '22 08:09

Alon