Open AthanasiusOfAlex opened 11 years ago
Yeah, it's probably because of the nesting and mis-scoping -- it tries to scope the outer function, and simply doesn't know that there's such a separated inner block.
Okay, apparently, it's not my direct fault: The debugger just spits out
gdb exception - couldn't read '(void[])nestedParam': Internal error:
this' is not an aggregate`` - whereas the latter part comes from gdb directly. Nice.
Edit: This is a 10 years old bug. I just started gdb manually, breakpointed at some nested method and tried to resolve some locals without any (void[]) in front of the parameter name..only then it worked, at no time else.
Here is an interesting one for the debugger:
In a nested function, some variables won't display any values. Try the following simple code, and put the break point inside the nested function:
I tried various types and tried assigning variables within the nested function. It seems that strings and arrays do OK, but more primitive variables do not. Where the value should appear (in the Locals or Watch windows), instead there is a message in red: "Can't read primitive 'name-of-variable'."
Thanks for the help!