Symbols in the Watch window may not be updated while the application is running due to disabled Real-time update.
Most often reason for incorrect symbol value displayed in the Watch window is that symbol(s) debug information (address, size, format,...) is loaded from the wrong Download file, when more than one download file is specified for the Debug Download.
Enable real-time update by pressing the Real-time update toolbar button in the Watch window.
Programming languages such as C and C++ allow collisions between symbol names. This means that multiple symbols can use the same name, but are in different scopes. For example, an application can have two functions (each defined in a separate C file) with the same name. C allows collisions of file and function static objects, whereas C++ allows additional collisions on multiple levels (namespaces, classes, function overloads). To avoid ambiguity when multiple symbols use the same name, but are in different scopes, qualified names should be used. When winIDEA displays symbols, it could happen that several different symbols with the same name are shown.
To avoid confusion winIDEA resolves this in the following manner:
"<module name>"#<var name>
For example, to access gs_byCount variable in the TestfileA.c module, use the following syntax in the Watch window:
"TestfileA.c#"gs_byCount
<function name>##<var name>
For example, to access s_byCount variable in the main function, use the following syntax:
main##s_byCount
If the application (winIDEA workspace) only has one download file, the download file will not be added to the symbol expression. If there are multiple download files, then the download file will be listed for all symbols even if there are no collisions.
Use the following syntax (two commas) with or example iCounter:
iCounter,,secondOutput.elf
Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.
{{ topic.Content }}