Microsoft KB Archive/73193

= Profiler Generates &quot;Unexpected Single Step&quot; on 8086 w/8087 =

Article ID: 73193

Article Last Modified on 10/30/1999

-

APPLIES TO


 * Microsoft Source Profiler 1.0

-



This article was previously published under Q73193



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 &quot;Unexpected Single Step&quot; 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 &quot;Not Using 8087&quot; whenever the application is invoked.

Additional query words: 1.00

Keywords: kb16bitonly KB73193

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.