CV 2.2/2.3 Trace May Skip Statement Following Switch

ID Number: Q59315

2.20 2.30 | 2.20 2.30

MS-DOS | OS/2

buglist2.20 buglist2.30 fixlist3.00

Summary:

CodeView versions 2.2 and 2.3 may incorrectly map assembly level

instructions to source code in the first statement following a switch

statement with seven or more cases.

More Information:

As shown in the sample code below, the statement following the switch

is run correctly, but CodeView steps over the statement while tracing

in source mode. In mixed source and assembly mode, the statement

following the switch may be traced into.

Microsoft has confirmed this to be a problem in CodeView versions 2.2

and 2.3. This problem was corrected in CodeView version 3.0.

Sample Code

-----------

# include<stdio.h>

void main(void)

{

short tag, marker;

marker = 0;

tag = 5;

switch(tag){

case 1:

break;

case 2:

break;

case 3:

break;

case 4:

break;

case 5:

break;

case 6:

break;

case 7:

break;

default:

break;

}

marker = 2;

}

Additional reference words: 2.20 2.30 3.00