This is the mail archive of the
mailing list for the GDB project.
Unreasonable expectation in gdb.base/break.exp
- From: "David S. Miller" <davem at davemloft dot net>
- To: gdb at sources dot redhat dot com
- Date: Tue, 04 Apr 2006 16:02:27 -0700 (PDT)
- Subject: Unreasonable expectation in gdb.base/break.exp
When compiled with optimizations enabled, this testcase
expects that stopping at main() will result in the place
being somewhere within the source file of main().
This is not necessarily the case.
In my case on sparc-*-linux*, the instruction that starts
main() in this situation is part of the inline expansion of
strtol(), via the inline expansion of atoi(), in the
stdlib.h header file so that is the place GDB reports that
it is at when the breakpoint on main() is hit.
This causes the break.exp testcase to fail.
I think this is perfectly reasonable and correct behavior on
both gdb's and gcc's part, and this check in break.exp should
be made a little bit more leanient.