Archive

Posts Tagged ‘windbg’

Breakpoints in Windbg

January 15, 2011 Leave a comment

WinDbg¬†rocks. ūüôā Setting breakpoints¬†is very easy in WinDbg. The command to set a breakpoint¬†is ‘bp’. So if you want to break whenever a¬†dll¬†is loaded into a process then type in following command…

bp kernel32!LoadLibraryW

So to trigger this breakpoint¬†attach ‘notepad.exe’ to the debugger and then type in this command. Now let the app run (press F5). Goto File->Open (this will trigger a definite LoadLibrary¬†:)). Now have a look¬†in WinDbg which¬†will have following output…

Breakpoint 0 hit
kernel32!LoadLibraryW:
00000000`76e50420 4533c0          xor     r8d,r8d

¬†To view call stack, type in ‘kpn’. I’ll blog more on breakpoints as and when I get time. Happy debugging. ūüôā

%d bloggers like this: