diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/default.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/default.exp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index f82849e..835c506 100644 --- a/gdb/testsuite/gdb.base/default.exp +++ b/gdb/testsuite/gdb.base/default.exp @@ -16,17 +16,17 @@ gdb_test "add-symbol-file" "add-symbol-file takes a file name and an address" "a setup_xfail "mips-idt-*" send_gdb "attach\n" expect { - -re "Argument required .(process-id|program) to attach.*$prompt $"\ + -re "Argument required .(process-id|program) to attach.*$gdb_prompt $"\ { pass "attach" } - -re "You can't do that when your target is `None'.*$prompt $"\ + -re "You can't do that when your target is `None'.*$gdb_prompt $"\ { pass "attach" } - -re "Don't know how to attach. Try \"help target\"..*$prompt $"\ + -re "Don't know how to attach. Try \"help target\"..*$gdb_prompt $"\ { pass "attach" } -re "Kill it. .y or n." { send_gdb "y\n" exp_continue } - -re "$prompt $" { fail "attach" } + -re "$gdb_prompt $" { fail "attach" } timeout { fail "(timeout) attach" } } @@ -103,7 +103,7 @@ expect { -re "Delete all auto-display expressions.*y or n. $" { send_gdb "y\n" expect { - -re "$prompt $" { pass "delete display prompt" } + -re "$gdb_prompt $" { pass "delete display prompt" } timeout { fail "(timeout) delete display prompt" } } } @@ -132,7 +132,7 @@ expect { -re "Reinitialize source path to empty.*y or n. $" { send_gdb "y\n" expect { - -re "Source directories searched: .cdir:.cwd.*$prompt $"\ + -re "Source directories searched: .cdir:.cwd.*$gdb_prompt $"\ { pass "directory prompt" } timeout { fail "(timeout) directory prompt" } } @@ -180,7 +180,7 @@ gdb_test "enable" "" "enable" #test exec-file send_gdb "exec-file\n" expect { - -re "No exec file now..*$prompt $" { + -re "No exec file now..*$gdb_prompt $" { pass "exec-file" } -re "exec-file.*A program is being debugged already. Kill it. .y or n.*$" { @@ -188,10 +188,10 @@ expect { if $verbose>1 then { send_user "\tDidn't kill program being debugged\n" } - expect -re "$prompt $" { } + expect -re "$gdb_prompt $" { } pass "exec-file" } - -re "$prompt $" { fail "exec-file" } + -re "$gdb_prompt $" { fail "exec-file" } timeout { fail "(timeout) exec-file" } } @@ -208,17 +208,17 @@ gdb_test "fg" "The program is not being run." "fg" #test file send_gdb "file\n" expect { - -re "No exec file now..*$prompt $"\ + -re "No exec file now..*$gdb_prompt $"\ { pass "file" } -re ".*A program is being debugged already. Kill it. .y or n.*$" { send_gdb "n\n" if $verbose>1 then { send_user "\t\tDidn't kill program being debugged\n" } - expect -re "$prompt $" { } + expect -re "$gdb_prompt $" { } pass "file" } - -re ".*$prompt $" { fail "file" } + -re ".*$gdb_prompt $" { fail "file" } timeout { fail "(timeout) file" } } @@ -351,31 +351,31 @@ gdb_test "pwd" "Working directory .*" "pwd" #test run "r" abbreviation if [istarget "*-*-vxworks*"] then { send_gdb "set args\n" - expect -re "$prompt $" {} + expect -re "$gdb_prompt $" {} gdb_test "r" "Starting program: .* You must specify a function name to run, and arguments if any"\ "run \"r\" abbreviation" send_gdb "set args main\n" - expect -re "$prompt $" {} + expect -re "$gdb_prompt $" {} } else { send_gdb "r\n" expect { -re "Starting program: .* -You can't do that when your target is `None'.*$prompt $"\ +You can't do that when your target is `None'.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .* No executable file specified.* -Use the \"file\" or \"exec-file\" command.*$prompt $"\ +Use the \"file\" or \"exec-file\" command.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .* -No image loaded into target.*$prompt $"\ +No image loaded into target.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } -re "Starting program: .* -No program loaded.*$prompt $"\ +No program loaded.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } - -re "Don't know how to run. Try \"help target\"..*$prompt $"\ + -re "Don't know how to run. Try \"help target\"..*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } - -re ".*$prompt $" { fail "run \"r\" abbreviation" } + -re ".*$gdb_prompt $" { fail "run \"r\" abbreviation" } timeout { fail "(timeout) run \"r\" abbreviation" } } } @@ -383,28 +383,28 @@ No program loaded.*$prompt $"\ #test run if [istarget "*-*-vxworks*"] then { send_gdb "set args\n" - expect -re "$prompt $" {} + expect -re "$gdb_prompt $" {} gdb_test "run" "Starting program: .* You must specify a function name to run, and arguments if any" send_gdb "set args main\n" - expect -re "$prompt $" {} + expect -re "$gdb_prompt $" {} } else { send_gdb "run\n" expect { - -re "Starting program:.*You can't do that when your target is `None'.*$prompt $" { pass "run" } + -re "Starting program:.*You can't do that when your target is `None'.*$gdb_prompt $" { pass "run" } -re "Starting program: .* No executable file specified.* -Use the \"file\" or \"exec-file\" command.*$prompt $"\ +Use the \"file\" or \"exec-file\" command.*$gdb_prompt $"\ { pass "run" } -re "Starting program: .* -No image loaded into target.*$prompt $"\ +No image loaded into target.*$gdb_prompt $"\ { pass "run" } -re "Starting program: .* -No program loaded.*$prompt $"\ +No program loaded.*$gdb_prompt $"\ { pass "run \"r\" abbreviation" } - -re "Don't know how to run. Try \"help target\"..*$prompt $"\ + -re "Don't know how to run. Try \"help target\"..*$gdb_prompt $"\ { pass "run" } - -re ".*$prompt $" { fail "run" } + -re ".*$gdb_prompt $" { fail "run" } timeout { fail "(timeout) run" } } } @@ -417,13 +417,13 @@ gdb_test "rbreak" "" "rbreak" # an initial stack to be created. send_gdb "return\n" expect { - -re "No selected frame..*$prompt $"\ + -re "No selected frame..*$gdb_prompt $"\ { pass "return" } -re "Make .* return now.*y or n. $" { send_gdb "y\n" exp_continue } - -re ".*$prompt $" { fail "return" } + -re ".*$gdb_prompt $" { fail "return" } timeout { fail "(timeout) return" } } @@ -594,10 +594,10 @@ gdb_test "show print union" "Printing of unions interior to structures is on." " #test show print vtbl gdb_test "show print vtbl" "Printing of C\[+\]+ virtual function tables is on." "show print vtbl" #test show prompt -# In the FAIL case, can't just look for $prompt because that will match -# the output, rather than the prompt. So look for $prompt at the start +# In the FAIL case, can't just look for $gdb_prompt because that will match +# the output, rather than the prompt. So look for $gdb_prompt at the start # of a line. -gdb_test "show prompt" "Gdb's prompt is \"$prompt \".*" "show prompt" +gdb_test "show prompt" "Gdb's prompt is \"$gdb_prompt \".*" "show prompt" #test show radix gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12." "show radix" #test show symbol-reloading @@ -647,34 +647,34 @@ gdb_test "target procfs" "Use the \"run\" command to start a Unix child process. #test target core send_gdb "target core\n" expect { - -re "No core file specified..*$prompt $" { pass "target core" } + -re "No core file specified..*$gdb_prompt $" { pass "target core" } -re ".*A program is being debugged already. Kill it. .y or n.*$" { send_gdb "n\n" if $verbose>1 then { send_user "\t\tDidn't kill program being debugged\n" } - expect -re "$prompt $" { } + expect -re "$gdb_prompt $" { } pass "target core" } - -re "Undefined target command: \"core\". Try \"help target\"..*$prompt $" { pass "target core" } - -re ".*$prompt $" { fail "target core" } + -re "Undefined target command: \"core\". Try \"help target\"..*$gdb_prompt $" { pass "target core" } + -re ".*$gdb_prompt $" { fail "target core" } timeout { fail "(timeout) target core" } } #test target exec send_gdb "target exec\n" expect { - -re "No exec file now..*$prompt $"\ + -re "No exec file now..*$gdb_prompt $"\ { pass "target exec" } -re ".*A program is being debugged already. Kill it. .y or n.*$" { send_gdb "n\n" if $verbose>1 then { send_user "\t\tDidn't kill program being debugged\n" } - expect -re "$prompt $" { } + expect -re "$gdb_prompt $" { } pass "target exec" } - -re ".*$prompt $" { fail "target exec" } + -re ".*$gdb_prompt $" { fail "target exec" } timeout { fail "(timeout) target exec" } } @@ -683,17 +683,17 @@ if ![istarget "*-*-udi*"] then { send_gdb "target remote\n" expect { -re "To open a remote debug connection, you need to specify what serial.* -device is attached to the remote system .e.g. /dev/ttya.*$prompt $"\ +device is attached to the remote system .e.g. /dev/ttya.*$gdb_prompt $"\ { pass "target remote" } -re ".*A program is being debugged already. Kill it. .y or n.*$" { send_gdb "n\n" if $verbose>1 then { send_user "\t\tDidn't kill program being debugged\n" } - expect -re "$prompt $" { } + expect -re "$gdb_prompt $" { } pass "target remote" } - -re ".*$prompt $" { fail "target remote" } + -re ".*$gdb_prompt $" { fail "target remote" } timeout { fail "(timeout) target remote" } } } @@ -717,7 +717,7 @@ expect { -re "Delete all auto-display expressions.*y or n. $" { send_gdb "y\n" expect { - -re "$prompt $" { pass "undisplay prompt" } + -re "$gdb_prompt $" { pass "undisplay prompt" } timeout { fail "(timeout) (timeout) undisplay prompt" } } } @@ -730,7 +730,7 @@ expect { -re "Delete all environment variables?.*y or n. $" { send_gdb "y\n" expect { - -re "$prompt $" { pass "unset environmentprompt" } + -re "$gdb_prompt $" { pass "unset environmentprompt" } timeout { fail "(timeout) (timeout) unset environment prompt" } |