This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: info locals gives error
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Nick Roberts <nickrob at snap dot net dot nz>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 31 Mar 2006 11:19:12 +0300
- Subject: Re: info locals gives error
- References: <17452.52811.89546.605084@farnswood.snap.net.nz>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Nick Roberts <nickrob@snap.net.nz>
> Date: Fri, 31 Mar 2006 18:38:03 +1200
>
> I've just upgraded to Fedora Core 5 (kernel 2.6.15-1.2054_FC5) and with the
> program below I get errors which didn't occur before (Fedora Core 3). This
> error might relate to Vladimir Prus's earlier report
> (http://sources.redhat.com/ml/gdb-patches/2006-03/msg00225.html) and
> value_print.
>
>
> /* -*- compile-command: "cc -g -o simple simple.c"; -*- */
>
> main(int argc, char **argv) {
> int i;
> i = 1;
> }
> [...]
> (gdb) b main
> Breakpoint 1 at 0x8048354: file simple.c, line 3.
> (gdb) r
> Starting program: /home/nickrob/simple
> Reading symbols from shared object read from target memory...done.
> Loaded system supplied DSO at 0x80e000
>
> Breakpoint 1, main () at simple.c:3
> 3 main(int argc, char **argv) {
> (gdb) info locals
> argc = Cannot access memory at address 0x0
I cannot reproduce this with GDB 6.4 and GCC versions 3.3.5 and 4.0.0
on a Debian box. I also tried GCC 3.4.2 and GDB 6.3 on a Windows box.
What I get in all of those cases is some arbitrary garbage, not
"cannot access".