gdb/
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.gdb / selftest.exp
index 30a71dd7e06799cc536556306e0e76433edd3202..7645caf9892acb1bf0b1ceea17f22e4b119de932 100644 (file)
@@ -1,5 +1,5 @@
-# Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright 1988, 1990-1992, 1994, 1997, 1999-2000, 2002-2012 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
 
 # This file was written by Rob Savoye. (rob@cygnus.com)
 
-if $tracelevel then {
-    strace $tracelevel
-}
-
 
 # are we on a target board
 if { [is_remote target] || ![isnative] } then {
@@ -92,6 +88,10 @@ proc do_steps_and_nexts {} {
                set description "step over ttyarg initialization"
                set command "step"
            }
+           -re ".*cmdarg_vec = NULL.*$gdb_prompt $" {
+               set description "step over cmdarg_vec initialization"
+               set command "step"
+           }
            -re ".*pre_stat_chain = make_command_stats_cleanup.*$gdb_prompt $" {
                set description "next over make_command_stats_cleanup and everything it calls"
                set command "next"
@@ -128,18 +128,6 @@ proc do_steps_and_nexts {} {
                set description "next over conditional stack alignment alloca"
                set command "next"
            }
-           -re ".*cmdsize = 1.*$gdb_prompt $" {
-               set description "step over cmdsize initialization"
-               set command "next"
-           }
-           -re ".*cmdarg = .* xmalloc.*$gdb_prompt $" {
-               set description "next over cmdarg initialization via xmalloc"
-               set command "next"
-           }
-           -re ".*ncmd = 0.*$gdb_prompt $" {
-               set description "next over ncmd initialization"
-               set command "next"
-           }
            -re ".*dirsize = 1.*$gdb_prompt $" {
                set description "next over dirsize initialization"
                set command "next"
@@ -163,6 +151,10 @@ proc do_steps_and_nexts {} {
                set description "next over textdomain PACKAGE"
                set command "next"
            }
+           -re ".*VEC_cleanup .cmdarg_s.*$gdb_prompt $" {
+               set description "next over cmdarg_s VEC_cleanup"
+               set command "next"
+           }
            -re "\[0-9\]+\[\t \]+\{\r\n$gdb_prompt $" {
                set description "step over initial brace"
                set command "step"
@@ -398,19 +390,29 @@ proc test_with_self { executable } {
     }
 
     # start the "xgdb" process
-    gdb_test_multiple "continue" "xgdb is at prompt" {
-       -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
-           pass "xgdb is at prompt"
+    if [target_info exists gdb,noinferiorio] {
+       # Maybe testing with a local extended-remote gdbserver.  With
+       # no way to interact with inferior GDB, all we can do is let
+       # it run.
+       send_gdb "continue\n"
+       # Wait a bit while the inferior gdb gets to its prompt.
+       sleep 1
+    } else {
+       set test "xgdb is at prompt"
+       gdb_test_multiple "continue" $test {
+           -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
+               pass $test
+           }
        }
-    }
-    
-    # set xgdb prompt so we can tell which is which
-    gdb_test_multiple "set prompt (xgdb) " "Set xgdb_prompt" {
-       -re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" {
-           pass "Set xgdb prompt"
+
+       # set xgdb prompt so we can tell which is which
+       gdb_test_multiple "set prompt (xgdb) " "Set xgdb_prompt" {
+           -re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" {
+               pass "Set xgdb prompt"
+           }
        }
     }
-    
+
     # kill the xgdb process
     set description "send ^C to child process"
     send_gdb "\003"
This page took 0.026055 seconds and 4 git commands to generate.