raddebugger icon indicating copy to clipboard operation
raddebugger copied to clipboard

global variables and scope not working correctly

Open kshanik opened this issue 10 months ago • 1 comments

Global variables having the same name at different scopes shows the value of the inner most scope even when we are stepping on outer scope.

image

code : https://godbolt.org/z/9zsGxzsWx raddbg version: 0.99 ALPHA [f2dd1e3]

kshanik avatar Apr 24 '24 09:04 kshanik

This is a strange case because both xs do not have "valid" and "invalid" address ranges (like locals do), and they both share a namespace of the procedure (and not the scope, unlike locals), so it is ambiguous which one the debugger should use, and there is no way that the debugger can tell which "scope" each was defined in via debug info - assuming that there is even debug info exported for both. And that is not completely clear, as both Visual Studio and Remedy do the same thing that we do. We only have a single record, although that could be because we are deduping something incorrectly.

I'll look more into this later, but given all that, it is fairly low priority.

ryanfleury avatar May 23 '24 22:05 ryanfleury