CodeView Skips Over a Line of Source Code

ID Number: Q46010

2.x 3.00 3.10 3.11 3.14 | 2.x 3.00 3.10 3.11 3.12 3.50

MS-DOS | OS/2

Summary:

After setting a breakpoint on the indicated line in the program below

and running the program, CodeView executes that line without stopping.

Likewise, if you single step through the code, CodeView steps past

that line. This problem also occurs in the QuickC integrated debugger.

This is due to the fact that CodeView is line-based and the C compiler

is token-based. This will not be corrected; it is a restriction. The

workaround is to flip your source into mixed mode and set the

breakpoint on the correct assembly line.

Sample Code

-----------

/* Compile options needed: /Zi /Od

*/

int i, j, k, l;

void main(void)

{

for(i = 0; i < 20; i++)

{

j = 0;

for(k = 0; k < 20; k++)

if(j == 0)

break;

j = 1; /*** set breakpoint here ***/

}

l = 0;

}

Additional reference words: 1.0 1.00 1.1 1.10 1.11 2.0 2.00 2.1 2.10

2.2 2.20 2.30 2.30 2.35 3.0 3.00 3.1 3.10 3.11 3.12 3.14 3.5 3.50 2.01

2.5 2.50 2.51