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

ID: Q73193

1.00 MS-DOS kbtool

The information in this article applies to:

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 
Version           : 1.00
Platform          : MS-DOS

Last Reviewed: July 19, 1997