aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-07-24 20:38:08 +0000
committerDaniel Jacobowitz <drow@false.org>2006-07-24 20:38:08 +0000
commit4c42eaff630026a1c9589e913d072935fed919c1 (patch)
treeaf7754be431bda48c2d576f4ebf431a1af11c819 /gdb/testsuite/lib
parentb05e64e5fe26950eba7f895b31019b8cc598b42d (diff)
downloadgdb-4c42eaff630026a1c9589e913d072935fed919c1.zip
gdb-4c42eaff630026a1c9589e913d072935fed919c1.tar.gz
gdb-4c42eaff630026a1c9589e913d072935fed919c1.tar.bz2
gdb/
* corefile.c (reopen_exec_file): Only check for an open exec file. Use exec_file_attach. * exec.c (exec_open): Make static. (exec_file_command): Don't use target_preopen. Query directly about changing the file. * gdbcore.h (exec_open): Remove prototype. gdb/testsuite/ * gdb.base/completion.exp: Update for change in "file" behavior. * gdb.stabs/weird.exp: Likewise. * lib/mi-support.exp (mi_gdb_file_cmd): Likewise. * lib/gdb.exp (gdb_file_cmd): Likewise. Kill the program explicitly.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp19
-rw-r--r--gdb/testsuite/lib/mi-support.exp5
2 files changed, 14 insertions, 10 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index eca2a50..047bf50 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1008,6 +1008,20 @@ proc gdb_file_cmd { arg } {
}
}
+ # The file command used to kill the remote target. For the benefit
+ # of the testsuite, preserve this behavior.
+ send_gdb "kill\n"
+ gdb_expect 120 {
+ -re "Kill the program being debugged. .y or n. $" {
+ send_gdb "y\n"
+ verbose "\t\tKilling previous program being debugged"
+ exp_continue
+ }
+ -re "$gdb_prompt $" {
+ # OK.
+ }
+ }
+
send_gdb "file $arg\n"
gdb_expect 120 {
-re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
@@ -1020,11 +1034,6 @@ proc gdb_file_cmd { arg } {
set gdb_file_cmd_debug_info "debug"
return 0
}
- -re "A program is being debugged already.*Kill it.*y or n. $" {
- send_gdb "y\n"
- verbose "\t\tKilling previous program being debugged"
- exp_continue
- }
-re "Load new symbol table from \".*\".*y or n. $" {
send_gdb "y\n"
gdb_expect 120 {
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index fa99c53..5d5af94 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -411,11 +411,6 @@ proc mi_gdb_file_cmd { arg } {
perror "$arg wasn't compiled with \"-g\""
return -1
}
- -re "A program is being debugged already.*Kill it.*y or n. $" {
- send_gdb "y\n"
- verbose "\t\tKilling previous program being debugged"
- exp_continue
- }
-re "Load new symbol table from \".*\".*y or n. $" {
send_gdb "y\n"
gdb_expect 120 {