* gdb.base/annota1.exp: Allow .*printf in backtraces.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.gdb / selftest.exp
index 201bd38e667b9c13190fa3db15537fc8d0f6ec1a..c837d4c6e50345c110dc3e223b91b6e499b59ecd 100644 (file)
@@ -1,5 +1,5 @@
 # Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -40,6 +40,7 @@ proc do_steps_and_nexts {} {
  
     gdb_reinitialize_dir $srcdir/..
 
+    set unlikely_line 0
     for {set count 0} {$count < 32} {incr count} {
        send_gdb "list\n"
        # NOTE: carlton/2002-12-11: The "initial brace" and
@@ -193,6 +194,17 @@ proc do_steps_and_nexts {} {
                fail "must be able to list source lines"
                return
            }
+           -re ".*interpreter_p = xstrdup.*$gdb_prompt $" {
+               if { $unlikely_line == 0 } {
+                   # This is a GCC optimization bug; a constant has been
+                   # associated with the wrong line number.
+                   setup_xfail "*-*-*" gcc/26475
+                   fail "$description (unlikely line from gcc)"
+                   set unlikely_line 1
+               }
+               set description "next over xstrdup"
+               set command "next"
+           }
            -re ".*$gdb_prompt $" {
                fail "unknown source line after $description"
                return
This page took 0.036437 seconds and 4 git commands to generate.