PRB: Debugger Single Step Steps Over Multiple Instructions

Last reviewed: September 5, 1997
Article ID: Q122140
1.00 1.50 1.51 WINDOWS kbtool kbusage kbtshoot kbprb

The information in this article applies to:

  • The Visual Workbench Integrated Debugger included with: Microsoft Visual C++ for Windows, versions 1.0, 1.5, and 1.51
  • Microsoft CodeView for MS-DOS, version 4.1
  • Microsoft CodeView for Windows, version 4.1

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.