You can use the bp command and symbols to set breakpoints in your application code. The bp command uses symbolic names to compute the breakpoint address. For example, for a character mode application, the command
bp main
sets a breakpoint at the application's main function. For a Windows-based application, the command
bp winmain
sets a breakpoint at the application's WinMain function.
On MIPS platforms, the breakpoint is automatically set after the prolog.
The "KB" stack trace uses the stack frame to determine which function is executing. Since the stack frame is set up by the first two instructions, you should step a minimum of two assembly-language instructions into a procedure to get an accurate stack trace.
A stack trace after an access violation in a window procedure may be uninformative, since the window procedure is called via a function pointer. If you place a breakpoint in the offending function, you will get a better stack trace.
KD supports virtual breakpoints. If an application has not been loaded, KD sets a virtual breakpoint. A virtual breakpoint has no effect on execution until the application is actually loaded. Once an application is loaded, KD computes the actual coded addresses of all virtual breakpoints and enables them.