This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uVision3/ARM watch window bug...?

The uVision3 IDE watch window shows the value of pString incorrectly (when stopped on a breakpoint in the "bug" function), unless pString is actually referenced in the function (by, for example, uncommenting the line "pString[0] = 0"). This is true even if the code optimizations are set to the lowest level possible.

#include <string.h>

int bug(int *nState,char *pString)
{
    *nState = 0;
//    pString[0] = 0;
    return(0);
}

void main(void)
{
    int foo = 0;
    char *bar;
    char s[] = "KEIL uVision3 for ARM\r";
    bar = s;
    bug(&foo,bar);
    while(1);
}

Please spare me from comments about not passing parameters to functions if you're not going to reference them, etc. I discovered this bug while testing some code I was prototyping, before the code actually used the parameter passed to it. I'm just trying to give some feedback to the KEIL folks so that they know about this bug.

Parents Reply Children
No data