The !stack_force_ebp command sets options for stack walking.


!stack_force_ebp [options] 

The options are a sequence of option elements separated by any number, including none, of spaces or tabs. Each option is a hyphen or forward slash followed immediately by a single character and by as many as two expressions.

/c clear all regions
/d address delete the first region containing address
/s start length add a region of length bytes at address start

White space is shown above as separating expressions, but only as a convenience. The first expression may begin immediately. Where it ends depends on the expression evaluator. The second expression may begin immediately after.


The !stack_force_ebp command and equivalent stack_force_ebp function are implemented in DBGHELP.DLL. They affect all that module’s stack-walking services, most notably the StackWalk64 function, including its use for the k command in debuggers (such as WinDbg) that are DBGENG clients.

The command acts on the options in the given order to add and delete regions. No consideration is given to whether regions overlap. They are added with the address and size as given in /s options. They are maintained in order from oldest to newest. The /d option deletes the oldest region that contains the given address. The /c option deletes all regions.


The stack_force_ebp function is exported from DBGHELP.DLL as a 64-bit WinDbg extension command, making it accessible as the command !stack_force_ebp in any sufficiently recent DBGENG client. In terms of versions distributed with Windows, as opposed to the separate package of Debugging Tools for Windows, it is new for Windows Vista.