BUG: Step-After-Return in CodeView "Hangs" in a Large FunctionLast reviewed: July 22, 1997Article ID: Q116183 |
4.00 4.01 4.10 | 4.00 4.01 4.10
MS-DOS | WINDOWSkbtool kbcode kbbuglist The information in this article applies to:
SYMPTOMSUsing the PR command (Stop After Return) on a large function, or on a function with long iterative loop, causes CodeView to appear to hang.
CAUSEThe PR command is inefficient when used on large functions because it is too slow. In the case of the example below, there is no activity. Locals and watch expressions do not get updated, and IP tracking is inactive. Furthermore, CTRL+BREAK, CTRL+C, AND CTRL+ALT+SYSREQ do not terminate the PR command because CodeView is receiving single step notifications fast enough that the system is likely not getting a chance to process them.
RESOLUTIONTo work around this problem, refrain from using the PR command on large functions, or those with long iterative loops. Instead, set a breakpoint at the location you wish CodeView to stop, or move the cursor to that location and press F7 to Run-To-Cursor.
STATUSMicrosoft has confirmed this to be problem with CodeView for MS-DOS, versions 4.0, 4.01, and 4.1, and CodeView for Windows, versions 4.0, 4.01, and 4.1. We are researching this problem and will post more information in the Microsoft Knowledge Base as soon as it becomes available.
MORE INFORMATIONThe sample code below may be used to reproduce the problem. After starting CodeView, enter these commands in the command window:
g f p prAt this point any attempts to break into CodeView are ignored.
Sample Code
/* Compile options needed: /Zi */ #ifdef _WINDOWS #include <windows.h> #endif void f(void); void main(void) { f(); } void f(void) { int t; int x; for (t=32767; t>0; --t) { x = t; } } #ifdef _WINDOWS int WINAPI WinMain (HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { main(); return( TRUE ); } #endif |
Additional reference words: 4.00 4.01 4.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |