Displaying 2 results from an estimated 2 matches for "2102704".
2020 Apr 15
2
Seeking clarification and way forward on limited scope variables.
...-------
When compiled in debug mode with compilers including (trunk gcc and trunk
clang) and debugging with GDB at Line No.6, the following behavior is
observed
Breakpoint 1, main (Argc=1, Argv=0x7fffffffe458) at MainScope.c:6
6 printf("%d\n",Local);
(gdb) print Local
$1 = 2102704 -- some Garbage value,
(gdb) info addr Local
Symbol "Local" is a variable at frame base reg $rbp offset 0+-24. -- *This
is location of *Local* declared inside scope, but as you may notice that
the variable being referred here is from the outer scope.*
This problem persists with bo...
2020 Apr 15
4
Seeking clarification and way forward on limited scope variables.
...led in debug mode with compilers including (trunk gcc and trunk clang) and debugging with GDB at Line No.6, the following behavior is observed
> Breakpoint 1, main (Argc=1, Argv=0x7fffffffe458) at MainScope.c:6
> 6 printf("%d\n",Local);
> (gdb) print Local
> $1 = 2102704 -- some Garbage value,
> (gdb) info addr Local
> Symbol "Local" is a variable at frame base reg $rbp offset 0+-24. -- This is location of *Local* declared inside scope, but as you may notice that the variable being referred here is from the outer scope.
>
> This problem...