From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B7C9E3858C60; Fri, 4 Nov 2022 09:52:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7C9E3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667555574; bh=EE+fqO6DoXZkScwHiolXGAJ92aM22WNm0jktVnouiww=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WPO06hCUyNE3i4VemI/imK+jwNI6O1jXb8FQLAlcZsQKNXOzFmypccq9L8JzqfWJA 0Go0mta8/47ML8uP7wuRa/Yj1ChClqkmrVSGBioFqYFbBsdemRvwmS7bjcCI3JSg5k EDlcZnEhu0xOJc1ev36gdak674cC3HiD3S1Q95jw= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug server/15746] "monitor exit", then "quit" leaves gdb still running Date: Fri, 04 Nov 2022 09:52:54 +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: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: msaleem at codesourcery dot com 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: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D15746 --- Comment #4 from Tom de Vries --- This fixes it: ... diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index fe4041662ef..6a2afb69b54 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -488,7 +488,18 @@ quit_command (const char *args, int from_tty) if (!quit_confirm ()) error (_("Not confirmed.")); - query_if_trace_running (from_tty); + try + { + query_if_trace_running (from_tty); + } + catch (const gdb_exception_error &ex) + { + exception_print (gdb_stderr, ex); + } + catch (const gdb_exception_quit &) + { + /* A quit event happens while we're quitting? Keep quitting. */ + } quit_force (args ? &exit_code : NULL, from_tty); } ... Now we have: ... Quit anyway? (y or n) y Remote connection closed $=20 ... --=20 You are receiving this mail because: You are on the CC list for the bug.=