From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61445 invoked by alias); 16 Mar 2015 09:17:24 -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 61408 invoked by uid 48); 16 Mar 2015 09:17:23 -0000 From: "qiyao at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug server/18130] gdbserver event loop is terminated by exception Date: Mon, 16 Mar 2015 09:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: server X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qiyao 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: 2015-q1/txt/msg00436.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18130 --- Comment #1 from Yao Qi --- The exception can be either caught in the caller of the_low_target.prepare_to_resume (lwp) or not thrown out from prepare_to_resume hook in each backend. I had a hacky patch for the former approach, and the event loop isn't terminated by the exception. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 48d905b..65b7110 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -3560,8 +3560,16 @@ linux_resume_one_lwp (struct lwp_info *lwp, *p_sig = NULL; } + TRY + { if (the_low_target.prepare_to_resume != NULL) the_low_target.prepare_to_resume (lwp); + } + CATCH (exception, RETURN_MASK_ERROR) + { + /**/ + } + END_CATCH regcache_invalidate_thread (thread); errno = 0; ------------------------------------------- However, I still not sure what is the best way to fix this issue. -- You are receiving this mail because: You are on the CC list for the bug.