* lib/gdb.exp (gdb_run_cmd): Honor gdb,do_reload_on_run.
* gdb.objc/basicclass.exp: Use gdb_run_cmd.
+2004-02-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/sim.exp (gdb_load): Handle $arg == "".
+ * lib/gdb.exp (gdb_run_cmd): Honor gdb,do_reload_on_run.
+ * gdb.objc/basicclass.exp: Use gdb_run_cmd.
+
2004-02-07 Elena Zannoni <ezannoni@redhat.com>
* gdb.base/maint.exp: Update test to reflect
# Test Framework Driver for GDB driving a builtin simulator
-# Copyright 1994, 1997, 1998 Free Software Foundation, Inc.
+# Copyright 1994, 1997, 1998, 2004 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
global GDB
global gdb_prompt
- if [gdb_file_cmd $arg] then { return -1 }
+ if { $arg != "" } {
+ if [gdb_file_cmd $arg] then { return -1 }
+ }
gdb_target_sim
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 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
#
# Test resetting breakpoints when re-running program
#
-send_gdb "run\n"
+gdb_run_cmd
gdb_expect {
- -re "The program .* has been started already.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*$gdb_prompt $"\
+ -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*$gdb_prompt $"\
{ pass "resetting breakpoints when rerunning" }
-re ".*$gdb_prompt $" { fail "resetting breakpoints when rerunning" }
timeout { fail "resetting breakpoints when rerunning" }
}
return
}
+
+ if [target_info exists gdb,do_reload_on_run] {
+ if { [gdb_load ""] < 0 } {
+ return;
+ }
+ }
send_gdb "run $args\n"
# This doesn't work quite right yet.
gdb_expect 60 {