Improve gdb_remote_download, remove gdb_download
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / mi-support.exp
index 07a84eacd691d9132c899ecc7e01a8753bae379d..cf3005d19ab890d12b4f82270d8d1a3981146b58 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Free Software Foundation, Inc.
+# Copyright 1999-2016 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
@@ -886,6 +886,9 @@ proc mi_run_cmd_full {use_mi_command args} {
        # to better handle RUN.
        send_gdb  "jump *$start\n"
        warning "Using CLI jump command, expect run-to-main FAIL"
+       gdb_expect {
+           -re "${run_match}&\"jump \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
+       }
        return 0
     }
 
@@ -1957,7 +1960,7 @@ proc mi_load_shlibs { args } {
     }
 
     foreach file $args {
-       gdb_download [shlib_target_file $file]
+       gdb_remote_download target [shlib_target_file $file]
     }
 
     # Even if the target supplies full paths for shared libraries,
@@ -2499,3 +2502,12 @@ proc mi_skip_python_tests {} {
     global mi_gdb_prompt
     return [skip_python_tests_prompt "$mi_gdb_prompt$"]
 }
+
+# Check whether we're testing with the remote or extended-remote
+# targets.
+
+proc mi_is_target_remote {} {
+    global mi_gdb_prompt
+
+    return [gdb_is_target_remote_prompt "$mi_gdb_prompt"]
+}
This page took 0.037691 seconds and 4 git commands to generate.