This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFA: tolerate code motion
- To: Jim Blandy <jimb at cygnus dot com>
- Subject: RFA: tolerate code motion
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 28 Apr 2000 14:28:30 -0700
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <npzoqfi3lw.fsf@zwingli.cygnus.com>
Also in break.exp, in the same optimized test, there is a test
that expects "break main" to land at a specific line. But,
due to -O2 optimization, there may be code movement, and the
breakpoint may occur on the second or subsequent line.
This should not be regarded as a gdb failure.
2000-04-28 Michael Snyder <msnyder@seadog.cygnus.com>
* gdb.base/break.exp: When compiled with -O2 optimization,
gdb may not stop at the first line of main, due to code motion.
Index: gdb.base/break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
retrieving revision 1.3
diff -p -r1.3 break.exp
*** break.exp 2000/03/24 21:35:42 1.3
--- break.exp 2000/04/28 21:27:51
*************** if ![target_info exists use_gdb_stub] {
*** 858,863 ****
--- 858,865 ----
}
-re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:75.*75\[\t \]+if .argc.* \{.*$gdb_prompt $"\
{ pass "run until function breakpoint, optimized file" }
+ -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*$gdb_prompt $"\
+ { pass "run until function breakpoint, optimized file (code motion)" }
-re ".*$gdb_prompt $" { fail "run until function breakpoint, optimized file" }
timeout { fail "run until function breakpoint, optimized file (timeout)" }
}