diff --git a/gdb/infrun.c b/gdb/infrun.c index 95c8bfb2e7d..64e535a3477 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -455,10 +455,9 @@ holding the child stopped. Try \"set detach-on-fork\" or \ ptid_t process_ptid = ptid_t (child_ptid.pid ()); target_terminal::ours_for_output (); - fprintf_filtered (gdb_stdlog, - _("[Detaching after %s from child %s]\n"), - has_vforked ? "vfork" : "fork", - target_pid_to_str (process_ptid).c_str ()); + printf_filtered (_("[Detaching after %s from child %s]\n"), + has_vforked ? "vfork" : "fork", + target_pid_to_str (process_ptid).c_str ()); } } else @@ -522,11 +521,10 @@ holding the child stopped. Try \"set detach-on-fork\" or \ std::string child_pid = target_pid_to_str (child_ptid); target_terminal::ours_for_output (); - fprintf_filtered (gdb_stdlog, - _("[Attaching after %s %s to child %s]\n"), - parent_pid.c_str (), - has_vforked ? "vfork" : "fork", - child_pid.c_str ()); + printf_filtered (_("[Attaching after %s %s to child %s]\n"), + parent_pid.c_str (), + has_vforked ? "vfork" : "fork", + child_pid.c_str ()); } /* Add the new inferior first, so that the target_detach below @@ -634,10 +632,9 @@ holding the child stopped. Try \"set detach-on-fork\" or \ ptid_t process_ptid = ptid_t (parent_ptid.pid ()); target_terminal::ours_for_output (); - fprintf_filtered (gdb_stdlog, - _("[Detaching after fork from " - "parent %s]\n"), - target_pid_to_str (process_ptid).c_str ()); + printf_filtered (_("[Detaching after fork from " + "parent %s]\n"), + target_pid_to_str (process_ptid).c_str ()); } target_detach (parent_inf, 0); @@ -957,15 +954,13 @@ handle_vfork_child_exec_or_exit (int exec) if (exec) { - fprintf_filtered (gdb_stdlog, - _("[Detaching vfork parent %s " - "after child exec]\n"), pidstr.c_str ()); + printf_filtered (_("[Detaching vfork parent %s " + "after child exec]\n"), pidstr.c_str ()); } else { - fprintf_filtered (gdb_stdlog, - _("[Detaching vfork parent %s " - "after child exit]\n"), pidstr.c_str ()); + printf_filtered (_("[Detaching vfork parent %s " + "after child exit]\n"), pidstr.c_str ()); } } diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index a781a5c2087..5de0795d60a 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -25,13 +25,6 @@ if {![istarget "*-linux*"]} then { continue } -# Test relies on checking follow-fork output. Do not run if gdb debug is -# enabled as it will be redirected to the log. -if [gdb_debug_enabled] { - untested "debug is enabled" - return 0 -} - standard_testfile set compile_options debug