Im trying to set a value in specific cell in an array, but no matter what i do the value doesn't change. I'v tried use "set var array(1) = 1" but it didn't do anything. Does any one have idea why?
1 Answer
You’re debugging in Ada mode, so you need to use an Ada assignment.
The variable can’t be called array, because that’s a reserved word, but assuming it’s A then
set var a(1) := 1
should do the trick.
The var is needed; and square brackets (a[1]) work too.
Additionally, have you compiled with a low optimisation level? (-O0, for example). The previous value of the array element might have been cached in a register.