EMbitz
Watch static variables - Printable Version

+- EMbitz (https://www.embitz.org/forum)
+-- Forum: EmBitz (https://www.embitz.org/forum/forum-1.html)
+--- Forum: Debugging and debug plugins (https://www.embitz.org/forum/forum-5.html)
+--- Thread: Watch static variables (/thread-33.html)



Watch static variables - Droid32 - 19-01-2021

Hello,

I'm using EB with EBlink on Win10x64.
If i debug a program, the watch window can't display variables which are "static" (non-static work of course). Is there a way to display static variables in the watch window?

mfg


RE: Watch static variables - embitz - 19-01-2021

Hi,

I think you are meaning the opposite, static are always possible to show. Don't you?

For live variables, the variable should be static because if the variable is placed on stack (local) it only exist during the time that that stack frame exist.

Could you explain a bit more what you mean?


RE: Watch static variables - Droid32 - 19-01-2021

Pls look at attached screenshot. Only non-static vars are shown.
Debug-Build, no optimization.

mfg


RE: Watch static variables - embitz - 19-01-2021

Strange, it has something to do with GDB. The answers are coming from GDB.
I always use static just to get them watched for sure.

Somehow it is not known by GDB.

[attachment=41]


RE: Watch static variables - Droid32 - 19-01-2021

Im only using original EB. I didn't change compiler, debugger etc. (Win7 and Win10, STM32 Nucleo)

mfg

EDIT:
Found out, LTO was actived for debug build. After disabling it worked