This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: argc - cant access memory
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Jim Blandy <jimb at codesourcery dot com>
- Cc: Hadron <hadronquark at googlemail dot com>, gdb at sourceware dot org
- Date: Tue, 10 Jul 2007 10:34:16 +1200
- Subject: Re: argc - cant access memory
- References: <87ejjhg137.fsf@gmail.com> <m3r6nh70gm.fsf@codesourcery.com>
> > I recently compiled and executed an opengl programming guide (redbook)
> > example, hello.c, successfully. However, when I try to debug it under
> > GUD I get
> >
> > ,----
> > | #0 main (argc=Cannot access memory at address 0x2d
> > | ) at hello.c:93
> > `----
>
> The code you labeled "hello.c" has no line 93. Are you sure you're
> debugging the program you intended to?
Aside from that, I think it just means that the arguments have been optimised
away. I think current GCC does this now even if the user doesn't specify
optimisation. It doesn't stop you from debugging does it?
--
Nick http://www.inet.net.nz/~nickrob