This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: store.exp failures
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: David Carlton <carlton at math dot stanford dot edu>
- Cc: gdb <gdb at sources dot redhat dot com>, Andrew Cagney <ac131313 at redhat dot com>
- Date: Thu, 5 Dec 2002 16:42:51 -0500
- Subject: Re: store.exp failures
- References: <ro1wumo2lwx.fsf@jackfruit.Stanford.EDU>
On Thu, Dec 05, 2002 at 01:30:54PM -0800, David Carlton wrote:
> When I run gdb.base/store.exp, (GCC 3.1, i686 Linux) I get tons and
> tons of failures. Looking into the log file, I see the following:
>
> (gdb) break main
> Breakpoint 1 at 0x80488f0: file gdb.base/store.c, line 233.
> (gdb) run
> Starting program: /extra/gdb/mirror/src/gdb/testsuite/gdb.base/store
>
> Breakpoint 1, main () at gdb.base/store.c:233
> 233 wack_struct_1 ();
> (gdb) tbreak wack_char
> Breakpoint 2 at 0x804849e: file gdb.base/store.c, line 46.
> (gdb) PASS: gdb.base/store.exp: tbreak wack_char
> continue
> Continuing.
>
> Program exited normally.
>
> So, basically, it looks like some of the calls to the wack_XXX
> functions are getting optimized out by the compiler, even though no
> optimization flags are being passed. Digging into the assembly
> confirms this; the code for main starts off as follows:
Make the function non-static and it should work as expected...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer