/* Annotation routines for GDB.
- Copyright (C) 1986-2014 Free Software Foundation, Inc.
+ Copyright (C) 1986-2016 Free Software Foundation, Inc.
This file is part of GDB.
&& (!breakpoints_invalid_emitted
|| async_background_execution_p ()))
{
- target_terminal_ours ();
+ /* If the inferior owns the terminal (e.g., we're resuming),
+ make sure to leave with the inferior still owning it. */
+ int was_inferior = target_terminal_is_inferior ();
+
+ target_terminal_ours_for_output ();
+
printf_unfiltered (("\n\032\032breakpoints-invalid\n"));
+
+ if (was_inferior)
+ target_terminal_inferior ();
+
breakpoints_invalid_emitted = 1;
}
}
&& (!frames_invalid_emitted
|| async_background_execution_p ()))
{
- target_terminal_ours ();
+ /* If the inferior owns the terminal (e.g., we're resuming),
+ make sure to leave with the inferior still owning it. */
+ int was_inferior = target_terminal_is_inferior ();
+
+ target_terminal_ours_for_output ();
+
printf_unfiltered (("\n\032\032frames-invalid\n"));
+
+ if (was_inferior)
+ target_terminal_inferior ();
+
frames_invalid_emitted = 1;
}
}