+ set string "${command}\n";
+ if { $command != "" } {
+ while { "$string" != "" } {
+ set foo [string first "\n" "$string"];
+ set len [string length "$string"];
+ if { $foo < [expr $len - 1] } {
+ set str [string range "$string" 0 $foo];
+ if { [send_gdb "$str"] != "" } {
+ global suppress_flag;
+
+ if { ! $suppress_flag } {
+ perror "Couldn't send $command to GDB.";
+ }
+ fail "$message";
+ return $result;
+ }
+ gdb_expect 2 {
+ -re "\[\r\n\]" { }
+ timeout { }
+ }
+ set string [string range "$string" [expr $foo + 1] end];
+ } else {
+ break;
+ }
+ }
+ if { "$string" != "" } {
+ if { [send_gdb "$string"] != "" } {
+ global suppress_flag;