This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

Any objections?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]