Profiler Generates "Unexpected Single Step" on 8086 w/8087

Last reviewed: July 17, 1997
Article ID: Q73193
1.00 MS-DOS kbtool

The information in this article applies to:

  • Microsoft Source Profiler for MS-DOS, version 1.0

The information in this article is included in the documentation starting with Visual C++ 5.0. Look there for future revisions.

SUMMARY

On an XT compatible PC (8086/8088 chip) with an 8087 math coprocessor, the Microsoft Source Profiler version 1.0 may generate an "Unexpected Single Step" error. This error is caused by a problem in the 8086/8088 hardware that was corrected in all later versions of the chip.

MORE INFORMATION

This behavior may be seen when the profiler is attempting to single step an instruction and a hardware exception occurs. One single step will occur in the exception handler and another will occur when the exception handler is complete. To avoid this problem, the profiler masks all interrupts during the single step.

However, the coprocessor exception cannot be masked and, because the 8087 runs concurrently with the 8086, it is impossible to predict when the coprocessor exception will occur.

A valid workaround is to disable the 8087 and force the use of the floating-point emulator while profiling. Since the emulator functions emulate the coprocessor in software, no hardware exception is generated and the behavior is avoided. To disable the 8087, link with one of the emulator libraries and set the NO87 environment variable to a non-null string. For example:

   SET NO87=Not Using 8087

Note that this results in the display of the message "Not Using 8087" whenever the application is invoked.


KBCategory: kbtool
KBSubcategory: TlsMisc
Additional reference words: 1.00
Keywords : kb16bitonly TlsMisc kbtool
Version : 1.00
Platform : MS-DOS


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: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.