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

Locals claimed to be out of scope by debugger

I regularly get this when debugging. Optimisations are turned off. Current instance exhibits it perfectly - linked list management where I have just printed some of the local variables and am about to add them to the list. On return from teh fn that adds them to list the list is out of scope. There are quite a lot of local variables (14) because I am trying to track a bug. "not in scope" reported in both watch window and call stack.

e.g.
printf("MIL Section [%s] key <%s> val <%s>\r\n", entry.section ? entry.section : "NULL", entry.key, entry.value);
if (entry.section)
{ strcpy(section, entry.section);
} AddEntryToList(&mil_list, entry.section, entry.key, entry.value, section);

when on the line
if (entry.section)
the local var "entry" apparently is out of scope.

Anyone found a way of giving the package (MDK on STM32) a thump - I've tried a complete rebuild and restarting the IDE

Parents Reply Children
No data