Hello Everyone,
I am using VisualGDB on VS2019 to develop an embedded-SW solution based on C++.
I am using semi-hosting and have noticed that in my live watch, there are two global variables wakeUpVehState and sysBtnState that share the same memory address. This is of course an unexpected behavior.
I have set the variables as volatile and I have disabled compiling optimizations to exclude the possibility that due to optimization the compiler might misbehave. Still I had no success.
Eventually I set those two variables in the normal watch and I got the 2 different addresses and correct values. Please refer to the image attached.
I am asking if there might be some setting in VisualGDB that might cause this issue or if it is simply a bug in the Live Watch. I would also like to notice, that this issue has already occurred in other occasions, but not always. It happens sporadically.
-In green are the definitions of the global variables.
-In brown are some random variable assignments.
-In blue are the Watch values (which are correct)
-In red are the live watch values.
Thank you in advance!
Attachments:
You must be
logged in to view attached files.