diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/boards/native-extended-gdbserver.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 7 |
3 files changed, 14 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e03d39a..3dac79f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2014-05-01 Pedro Alves <palves@redhat.com> + * lib/gdb.exp (gdb_load): Extend comment. Skip calling + gdb_file_cmd if no file is specified. + * boards/native-extended-gdbserver.exp (gdb_load): Use the + last_loaded_file to set the remote exec-file. + +2014-05-01 Pedro Alves <palves@redhat.com> + * boards/local-remote-host.exp: New file. 2014-05-01 Pedro Alves <palves@redhat.com> diff --git a/gdb/testsuite/boards/native-extended-gdbserver.exp b/gdb/testsuite/boards/native-extended-gdbserver.exp index 8bb95db..2c405a8 100644 --- a/gdb/testsuite/boards/native-extended-gdbserver.exp +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp @@ -78,12 +78,13 @@ proc mi_gdb_start { args } { # proc gdb_load { arg } { global gdb_prompt + global last_loaded_file if { $arg != "" } { if [gdb_file_cmd $arg] then { return -1 } } - send_gdb "set remote exec-file $arg\n" + send_gdb "set remote exec-file $last_loaded_file\n" gdb_expect { -re "$gdb_prompt $" {} timeout { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 07249c6..3125e7a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3491,11 +3491,14 @@ proc gdb_load_shlibs { args } { } # -# gdb_load -- load a file into the debugger. +# gdb_load -- load a file into the debugger. Specifying no file +# defaults to the executable currently being debugged. # Many files in config/*.exp override this procedure. # proc gdb_load { arg } { - return [gdb_file_cmd $arg] + if { $arg != "" } { + return [gdb_file_cmd $arg] + } } # gdb_reload -- load a file into the target. Called before "running", |