public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: John Baldwin <jhb@FreeBSD.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 3/8] fbsd-nat: Fix resuming and waiting with multiple processes.
Date: Fri, 04 Aug 2023 10:30:59 -0600	[thread overview]
Message-ID: <87350ybwho.fsf@tromey.com> (raw)
In-Reply-To: <20230717192039.13976-4-jhb@FreeBSD.org> (John Baldwin's message of "Mon, 17 Jul 2023 12:20:34 -0700")

>>>>> "John" == John Baldwin <jhb@FreeBSD.org> writes:

John> +/* Information stored about each inferior.  */
John> +struct fbsd_inferior_info
John> +{
John> +  /* Filter for resumed LWPs which can report events from wait.  */
John> +  ptid_t resumed_lwps = null_ptid;
John> +
John> +  /* Number of LWPs this process contains.  */
John> +  unsigned int num_lwps = 0;
John> +
John> +  /* Number of LWPs currently running.  */
John> +  unsigned int running_lwps = 0;
John> +
John> +  /* Have a pending SIGSTOP event that needs to be discarded.  */
John> +  bool pending_sigstop = false;
John> +};
John> +
John> +/* Per-inferior data key.  */
John> +
John> +static const registry<inferior>::key<fbsd_inferior_info> fbsd_inferior_data;

It isn't obvious from the comment (something we ought to fix), but I
think the inferior::priv field is reserved for the process stratum
target to use.  So, you don't need a registry key, you can just derive
fbsd_inferior_info from 'private_inferior'.

Tom

  reply	other threads:[~2023-08-04 16:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 19:20 [PATCH v2 0/8] Fixes for multiprocess for FreeBSD's native target John Baldwin
2023-07-17 19:20 ` [PATCH v2 1/8] fbsd-nat: Add a list of pending events John Baldwin
2023-07-17 19:20 ` [PATCH v2 2/8] fbsd-nat: Defer any ineligible events reported by wait John Baldwin
2023-07-17 19:20 ` [PATCH v2 3/8] fbsd-nat: Fix resuming and waiting with multiple processes John Baldwin
2023-08-04 16:30   ` Tom Tromey [this message]
2023-08-04 21:30     ` John Baldwin
2023-07-17 19:20 ` [PATCH v2 4/8] fbsd-nat: Fix several issues with detaching John Baldwin
2023-07-17 19:20 ` [PATCH v2 5/8] fbsd-nat: Fix thread_alive against a running thread John Baldwin
2023-07-17 19:20 ` [PATCH v2 6/8] fbsd-nat: Stop a process if it is running before killing it John Baldwin
2023-07-17 19:20 ` [PATCH v2 7/8] fbsd-nat: Defer resume of inferiors John Baldwin
2023-07-17 19:20 ` [PATCH v2 8/8] fbsd-nat: Implement the target stop method John Baldwin
2023-08-04 16:45 ` [PATCH v2 0/8] Fixes for multiprocess for FreeBSD's native target Tom Tromey
2023-08-14 17:51   ` John Baldwin

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=87350ybwho.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.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).