Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb: A potential fix for PR-24069
@ 2022-02-02 19:31 siweihe.eng--- via Gdb-patches
  2022-02-02 20:57 ` Simon Marchi
  0 siblings, 1 reply; 5+ messages in thread
From: siweihe.eng--- via Gdb-patches @ 2022-02-02 19:31 UTC (permalink / raw)
  To: gdb-patches; +Cc: Louis-He

From: Louis-He <1726110778@qq.com>

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 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index bba6acc7ea1..844dbf499fe 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1104,16 +1104,16 @@ darwin_nat_target::decode_message (mach_msg_header_t *hdr,
 		}
 
 	      if (WIFEXITED (wstatus))
-    {
-      status->set_exited (WEXITSTATUS (wstatus));
-    }
+		{
+		  status->set_exited (WEXITSTATUS (wstatus));
+		}
 	      else if (WIFSTOPPED (wstatus))
 		{
-      status->set_ignore ();
+		  status->set_ignore ();
 		  inferior_debug (4, _("darwin_wait: pid %d received WIFSTOPPED\n"), res_pid);
 		  return minus_one_ptid;
 		}
-        else
+	      else
 		{
 		  status->set_signalled
 		    (gdb_signal_from_host (WTERMSIG (wstatus)));
-- 
2.32.0 (Apple Git-132)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-03 18:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02 19:31 [PATCH] gdb: A potential fix for PR-24069 siweihe.eng--- via Gdb-patches
2022-02-02 20:57 ` Simon Marchi
2022-02-02 21:01   ` Siwei He via Gdb-patches
2022-02-02 21:26     ` Simon Marchi
2022-02-03 18:04       ` Siwei He via Gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox