OSDN Git Service

Import this patch from Savannah repository:
authornickc <nickc>
Tue, 5 Oct 2004 09:44:53 +0000 (09:44 +0000)
committernickc <nickc>
Tue, 5 Oct 2004 09:44:53 +0000 (09:44 +0000)
2003-02-19  DJ Delorie  <dj@redhat.com>
* config/sim.exp: Support both sid and rawsid protocols.

dejagnu/ChangeLog
dejagnu/config/sim.exp

index 22cfe77..1962ff4 100644 (file)
@@ -1,3 +1,10 @@
+2004-10-05  Nick Clifton  <nickc@redhat.com>
+
+       * Import this patch from Savannah repository:
+
+       2003-02-19  DJ Delorie  <dj@redhat.com>
+        * config/sim.exp: Support both sid and rawsid protocols.
+
 2004-06-08  Alexandre Oliva  <aoliva@redhat.com>
 
        * baseboards/mn10300-sim.exp: Set needs_status_wrapper and
index 3143b31..9801c9c 100644 (file)
@@ -82,13 +82,21 @@ proc sim_load { dest prog args } {
 
     set output "";
 
+    if { [board_info target sim,protocol] == "sid" } {
+       set cmd "-e \"set cpu-loader file [list $prog]\""
+    } elseif { [board_info target sim,protocol] == "rawsid" } {
+       set cmd "--load=$prog"
+    } else {
+       set cmd $prog
+    }
+
     # Run the program with a limited amount of real time. While
     # this isn't as nice as limiting the amount of CPU time, it
     # will have to do.
     if { $inpfile != "" } {
-       set res [remote_spawn target "${prog} < $inpfile" "readonly"];
+       set res [remote_spawn target "${cmd} < $inpfile" "readonly"];
     } else {
-       set res [remote_spawn target "${prog}"];
+       set res [remote_spawn target "${cmd}"];
     }
 
     if { $res <= 0 } {