From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13725 invoked by alias); 10 Dec 2014 18:05:33 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 13621 invoked by uid 55); 10 Dec 2014 18:05:32 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/17627] In MI all-stop/mi-async off mode, a thread exit make the prompt (kind of) return, but it shouldn't Date: Wed, 10 Dec 2014 18:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q4/txt/msg00360.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17627 --- Comment #5 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 1abf3a143773819e195fceaa485060dcac9e6089 (commit) from f4943d8253e8c9c539fd72d23e94a65f84c92d1a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1abf3a143773819e195fceaa485060dcac9e6089 commit 1abf3a143773819e195fceaa485060dcac9e6089 Author: Simon Marchi Date: Wed Dec 10 13:03:47 2014 -0500 Restore terminal state in mi_thread_exit (PR gdb/17627) When a thread exits, the terminal is left in mode "terminal_is_ours" while the target executes. This patch fixes that. We need to manually restore the terminal setting in this particular observer. In the case of the other MI observers that call target_terminal_ours, gdb will end up resuming the inferior later in the execution and call target_terminal_inferior. In the case of the thread exit event, we still need to call target_terminal_ours to be able to print something, but there is nothing that gdb will need to resume after that. We therefore need to call target_terminal_inferior ourselves. gdb/ChangeLog: PR gdb/17627 * target.c (cleanup_restore_target_terminal): New function. (make_cleanup_restore_target_terminal): New function. * target.h (make_cleanup_restore_target_terminal): New declaration. * mi/mi-interp.c (mi_thread_exit): Use the new cleanup. Signed-off-by: Simon Marchi ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 8 ++++++++ gdb/mi/mi-interp.c | 4 ++++ gdb/target.c | 34 ++++++++++++++++++++++++++++++++++ gdb/target.h | 4 ++++ 4 files changed, 50 insertions(+), 0 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug.