开发者

Stepping problem in Eclipse CDT

I have created a custom toolchain and launch configuration to allow debugging 开发者_StackOverflow中文版on a remote target.

I've got the debugging working so that I can step through each statement. However, the stepping doesn't always match up with the position in the code editor.

For example, when debugging this code:

    int x;
    for(x = 0; x < 10; x++)
    {
        printf("%d\n", x);
    }

The cursor will stay on the first line of the "for" statement rather than jumping onto the "printf" statement when stepping.

However, when I turn on "Instruction Stepping Mode" it does end up stepping onto the "printf" statement.

Any ideas would be very much appreciated. Please let me know if I can provide anymore details.

Best regards, Alan


Just to draw a line under this one, it was due to me having compiler optimizations turned on... turn them off and it works fine.

Alan

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜