[Bug gdb/24069] gdb on OSX Mojave hangs in darwin_decode_message
siwei.he at mail dot utoronto.ca
sourceware-bugzilla@sourceware.org
Wed Feb 2 19:55:45 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=24069
--- Comment #40 from Louis He <siwei.he at mail dot utoronto.ca> ---
Comment on attachment 13951
--> https://sourceware.org/bugzilla/attachment.cgi?id=13951
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. However,
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
--
2.32.0 (Apple Git-132)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list