PRB: Debugger Single Step Steps Over Multiple Instructions

ID: Q122140

1.00 1.50 1.51 WINDOWS kbtool kbusage kbtshoot kbprb

The information in this article applies to:

SYMPTOMS

Stepping through code in the Visual Workbench Integrated Debugger or CodeView in assembly mode should execute a single assembler instruction at a time. However, under certain conditions, the debugger steps over multiple instructions.

CAUSE

Some instructions disable sampling of interrupts before the next instruction is executed. Because a single step is handled by an interrupt, the debugger cannot single step if interrupts are disabled.

For example, here's a common scenario:

On 8086- and 8088-based computers, sampling of interrupts is disabled for the instruction after using MOV to move to any segment register. On 80286- based and higher computers, sampling of interrupts is disabled only after using MOV to move to SS.

NOTE: Both SS and SP must be initialized to make the stack valid. If an interrupt occurs after SS is changed but before SP is changed, the stack may not be valid. Therefore it's a good idea to always initialize the stack by initializing SS first.

STATUS

This behavior is by design.

Additional reference words: 4.10 1.00 1.50 1.51 KBCategory: kbtool kbusage kbtshoot kbprb KBSubcategory: WBDebug CvwIss Keywords : kb16bitonly

Last Reviewed: September 6, 1997