This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

RFA: tolerate code motion


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)" }
    }

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