2003-02-19 DJ Delorie <dj@redhat.com>
authorRob Savoye <rob@welcomehome.org>
Fri, 21 Feb 2003 06:51:53 +0000 (06:51 +0000)
committerRob Savoye <rob@welcomehome.org>
Fri, 21 Feb 2003 06:51:53 +0000 (06:51 +0000)
        * config/sim.exp: Support both sid and rawsid protocols.

ChangeLog
config/sim.exp

index 0d2ec36a9b013c7cd4b7a226da55f792feb67f0b..06f338ebbd695d362d078a57fc60c72bd92d4566 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-19  DJ Delorie  <dj@redhat.com>
+
+        * config/sim.exp: Support both sid and rawsid protocols.
+
 2003-01-31  Kazu Hirata  <kazu@cs.umass.edu>
 
         * dejagnu/baseboards/h8300-sim.exp: Don't set
index 3143b319ffc92a8aa44f7e3afc20ed18628c859b..2441a7cec4ddcf7687cacd8ad2dc332c41083273 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1993 - 2001 Free Software Foundation, Inc.
+# Copyright (C) 1993 - 2002, 2003 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
@@ -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 } {