-# Copyright 2016 Free Software Foundation, Inc.
+# Copyright 2016-2020 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
# - Thread 3 of each inferior is either stopped at /* thread loop line */, if we
# are using all-stop, or running, if we are using non-stop.
+# Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty.
+if [gdb_debug_enabled] {
+ untested "debug is enabled"
+ return 0
+}
+
load_lib mi-support.exp
standard_testfile
# Multiple inferiors are needed, therefore only native gdb and extended
# gdbserver modes are supported.
if [use_gdb_stub] {
- untested ${testfile}.exp
+ untested "using gdb stub"
return
}
set compile_options "debug pthreads"
if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
- untested "failed to compile $testfile"
+ untested "failed to compile"
return -1
}
set thread_event_re "=thread-selected,id=\"$thread\""
set thread_answer_re "\\^done,new-thread-id=\"$thread\""
- set frame_re(0) ",frame=\{level=\"0\",addr=\"$hex\",func=\"child_sub_function\",args=\\\[\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"$thread_loop_line\"\}"
- set frame_re(1) ",frame=\{level=\"1\",addr=\"$hex\",func=\"child_function\",args=\\\[\{name=\"args\",value=\"0x0\"\}\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"$thread_caller_line\"\}"
+ set frame_re(0) ",frame=\{level=\"0\",addr=\"$hex\",func=\"child_sub_function\",args=\\\[\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"$thread_loop_line\",arch=\"$any\"\}"
+ set frame_re(1) ",frame=\{level=\"1\",addr=\"$hex\",func=\"child_function\",args=\\\[\{name=\"args\",value=\"0x0\"\}\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"$thread_caller_line\",arch=\"$any\"\}"
# Special frame for main thread.
- set frame_re(2) ",frame=\{level=\"0\",addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"${main_break_line}\"\}"
+ set frame_re(2) ",frame=\{level=\"0\",addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\"${any}${srcfile}\",fullname=\"${any}${srcfile}\",line=\"${main_break_line}\",arch=\"$any\"\}"
if { $thread != -1 } {
if { $type == "event" } {
# Add the second inferior now. While this is not mandatory, it allows
# us to assume that per-inferior thread numbering will be used,
# simplifying test_continue_to_start a bit (Thread 1.2 and not Thread 2).
- gdb_test "add-inferior" "Added inferior 2" "add inferior 2"
+ gdb_test "add-inferior" "Added inferior 2 on connection .*" "add inferior 2"
# Prepare the first inferior for the test.
test_continue_to_start $mode 1