From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 84CD2385843F; Wed, 2 Feb 2022 19:55:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84CD2385843F From: "siwei.he at mail dot utoronto.ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/24069] gdb on OSX Mojave hangs in darwin_decode_message Date: Wed, 02 Feb 2022 19:55:21 +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: 8.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: siwei.he at mail dot utoronto.ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2022 19:55:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24069 --- Comment #39 from Louis He --- Comment on attachment 13951 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13951 The patch for PR-24069 >>From 951136540042788b78ef4aec8895a889a3b083f1 Mon Sep 17 00:00:00 2001 From: Louis-He <1726110778@qq.com> Date: Wed, 2 Feb 2022 14:51:43 -0500 Subject: [PATCH] gdb: A potential fix for PR-24069 After this fix, the possibility of successful run on mac os increases. Howe= ver, it is still possible that the gdb hangs. A workaround is issue "control+c" = and the gdb will continue running as expected. The root cause of the bug hasn't been identified, and this fix is a temporary patch to PR-24069. --- gdb/darwin-nat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index d96ce1a6c65..844dbf499fe 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1102,8 +1102,17 @@ darwin_nat_target::decode_message (mach_msg_header_t *hdr, status->set_ignore (); return minus_one_ptid; } + if (WIFEXITED (wstatus)) - status->set_exited (WEXITSTATUS (wstatus)); + { + status->set_exited (WEXITSTATUS (wstatus)); + } + else if (WIFSTOPPED (wstatus)) + { + status->set_ignore (); + inferior_debug (4, _("darwin_wait: pid %d received WIFSTOPPED\n"), res_pid); + return minus_one_ptid; + } else { status->set_signalled --=20 2.32.0 (Apple Git-132) --=20 You are receiving this mail because: You are on the CC list for the bug.=