public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/31483] [gdb/build, postmarketos] error: 'W_EXITCODE' was not declared in this scope
Date: Thu, 14 Mar 2024 08:34:39 +0000	[thread overview]
Message-ID: <bug-31483-4717-8YFEQL7xm1@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31483-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31483

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
In gdbsupport/gdb_wait.h, we have:
...
#ifndef WSETEXIT
# ifdef W_EXITCODE
#define WSETEXIT(w,status) ((w) = W_EXITCODE(status,0))
# else
#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8)))
# endif
#endif
...
so this should probably work:
...
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 9d5a6242803..aaa7bbc2a4c 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -1904,7 +1904,9 @@ linux_process_target::check_zombie_leaders ()
          thread_info *leader_thread = get_lwp_thread (leader_lp);
          if (report_exit_events_for (leader_thread))
            {
-             mark_lwp_dead (leader_lp, W_EXITCODE (0, 0), true);
+             int wstat;
+             WSETEXIT (wstat, 0);
+             mark_lwp_dead (leader_lp, wstat, true);
              new_pending_event = true;
            }
          else
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2024-03-14  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  7:53 [Bug build/31483] New: " vries at gcc dot gnu.org
2024-03-14  8:34 ` vries at gcc dot gnu.org [this message]
2024-03-14  8:35 ` [Bug build/31483] " vries at gcc dot gnu.org
2024-03-14  9:55 ` vries at gcc dot gnu.org
2024-03-14 20:27 ` cvs-commit at gcc dot gnu.org
2024-03-14 20:28 ` vries at gcc dot gnu.org
2024-03-14 22:43 ` sam at gentoo dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31483-4717-8YFEQL7xm1@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).