-# Copyright 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2002-2013 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 Joel Brobecker. (brobecker@gnat.com), derived
# from selftest.exp, written by Rob Savoye.
-if $tracelevel then {
- strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
# are we on a target board
if { [is_remote target] || ![isnative] } then {
proc setup_test { executable } {
global gdb_prompt
global timeout
+ global INTERNAL_GDBFLAGS
# load yourself into the debugger
# This can take a relatively long time, particularly for testing where
set timeout 600
set description "run until breakpoint at captured_main"
- send_gdb "run -nw\n"
- gdb_expect {
+ gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" {
-re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" {
pass "$description"
}
verbose "Timeout is now $timeout seconds" 2
return -1
}
- timeout {
- fail "$description (timeout)"
- }
}
set timeout $oldtimeout