# uses pass if it sees $gdb_prompt, and fail if it sees $gdb_prompt_fail.
#
proc default_prompt_gdb_start { } {
+ global use_gdb_stub
global GDB
global INTERNAL_GDBFLAGS GDBFLAGS
global gdb_prompt
global timeout
global gdb_spawn_id
+ # Set the default value, it may be overriden later by specific testfile.
+ #
+ # Use `set_board_info use_gdb_stub' for the board file to flag the inferior
+ # is already started after connecting and run/attach are not supported.
+ # This is used for the "remote" protocol. After GDB starts you should
+ # check global $use_gdb_stub instead of the board as the testfile may force
+ # a specific different target protocol itself.
+ set use_gdb_stub [target_info exists use_gdb_stub]
+
verbose "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
+ gdb_write_cmd_file "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS"
if [info exists gdb_spawn_id] {
return 0