-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2019 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
global gdb_prompt
global gdb_prompt_fail
global timeout
- global gdb_spawn_id;
+ global gdb_spawn_id
- gdb_stop_suppressing_tests;
+ gdb_stop_suppressing_tests
verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
if [info exists gdb_spawn_id] {
- return 0;
+ return 0
}
if ![is_remote host] {
exit 1
}
}
- set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"];
+ set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]"]
if { $res < 0 || $res == "" } {
perror "Spawning $GDB failed."
- return 1;
+ return 1
}
gdb_expect 360 {
-re ".*$gdb_prompt_fail.*$gdb_prompt_fail.*" {
}
timeout {
perror "(timeout) GDB never initialized after 10 seconds."
- remote_close host;
+ remote_close host
return -1
}
}
- set gdb_spawn_id -1;
- return 0;
+ set gdb_spawn_id $res
+ return 0
}
#