Add "info connections" command, "info inferiors" connection number/string
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.threads / forking-threads-plus-breakpoint.exp
index 6c7206126b7501e36413f31e2fc814212ac07344..c4c9596be3129ebd8a3482029f29328bf9c3acf3 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-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
@@ -39,7 +39,7 @@ proc probe_displaced_stepping_support {} {
 
        gdb_test_no_output "set displaced on"
        if ![runto_main] then {
-           fail "Can't run to main"
+           fail "can't run to main"
            return 0
        }
 
@@ -79,10 +79,25 @@ proc do_test { cond_bp_target detach_on_fork displaced } {
     set GDBFLAGS $saved_gdbflags
 
     if ![runto_main] then {
-       fail "Can't run to main"
+       fail "can't run to main"
        return 0
     }
 
+    if {$cond_bp_target} {
+       set test "set breakpoint condition-evaluation target"
+       gdb_test_multiple $test $test {
+           -re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
+               # Target doesn't support breakpoint condition
+               # evaluation on its side.  Skip the test.
+               return 0
+           }
+           -re "^$test\r\n$gdb_prompt $" {
+           }
+       }
+    } else {
+       gdb_test_no_output "set breakpoint condition-evaluation host"
+    }
+
     gdb_test_no_output "set detach-on-fork $detach_on_fork"
     gdb_test_no_output "set displaced $displaced"
 
@@ -100,24 +115,20 @@ proc do_test { cond_bp_target detach_on_fork displaced } {
     set fork_count 0
     set ok 0
 
-    if {$displaced == "off"
-       && [target_info exists gdb_protocol]
-       && ([target_info gdb_protocol] == "remote"
-           || [target_info gdb_protocol] == "extended-remote")} {
-       setup_kfail "remote/19496" *-*-*
-    }
-    set test "inferior 1 exited"
-    gdb_test_multiple "" $test {
-       -re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
-           set ok 1
-           pass $test
-       }
-       -re "Inferior $decimal \(\[^\r\n\]+\) exited normally" {
-           incr fork_count
-           if {$fork_count <= 100} {
-               exp_continue
-           } else {
-               fail "$test (too many forks)"
+    with_timeout_factor 10 {
+        set test "inferior 1 exited"
+        gdb_test_multiple "" $test {
+           -re "Inferior 1 \(\[^\r\n\]+\) exited normally" {
+               set ok 1
+               pass $test
+           }
+           -re "Inferior $decimal \(\[^\r\n\]+\) exited normally" {
+               incr fork_count
+               if {$fork_count <= 100} {
+                   exp_continue
+               } else {
+                   fail "$test (too many forks)"
+               }
            }
        }
     }
@@ -131,7 +142,7 @@ proc do_test { cond_bp_target detach_on_fork displaced } {
        "no threads left"
 
     gdb_test "info inferiors" \
-       "Num\[ \t\]+Description\[ \t\]+Executable\[ \t\]+\r\n\\* 1 \[^\r\n\]+" \
+       "Num\[ \t\]+Description\[ \t\]+Connection\[ \t\]+Executable\[ \t\]+\r\n\\* 1 \[^\r\n\]+" \
        "only inferior 1 left"
 }
 
This page took 0.026226 seconds and 4 git commands to generate.