https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94469

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #4)
> (In reply to Tom de Vries from comment #2)
> (In reply to Richard Biener from comment #3)
> $ gdb -readnow -batch a.out -ex "p aaa" -ex "p bbb" -ex "p ccc"
> $1 = <optimized out>
> $2 = <optimized out>
> $3 = <optimized out>
> ...
> and now also the problem surfaces for aaa.

And, it's good to realize that once you set the context to main, things do
work:
...
$ gdb.sh -readnow -batch a.out -ex start -ex "p aaa" -ex "p bbb" -ex "p ccc" 
Temporary breakpoint 1 at 0x400496: file test.c, line 6.

Temporary breakpoint 1, main () at test.c:6
6         return 0;
$1 = 0
$2 = 0
$3 = 0
...

Reply via email to