From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>,
Simon Marchi <simon.marchi@efficios.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] gdbserver: hide fork child threads from GDB
Date: Mon, 29 Nov 2021 15:37:00 +0000 [thread overview]
Message-ID: <342f0bb2-5b42-24e3-b2bf-a6d5e3a00e33@palves.net> (raw)
In-Reply-To: <682fd2be-73e6-3372-5b03-a9e94a04f101@polymtl.ca>
On 2021-11-29 12:46, Simon Marchi wrote:
> On 2021-11-26 17:51, Pedro Alves wrote:
>> Wonder whether we should instead have some:
>>
>> thread_info *target_pending_child (thread_info *parent);
>> thread_info *target_pending_child_parent (thread_info *child);
>> target_waitkind target_pending_child_kind (thread_info *parent);
>>
>> target methods instead of moving the fields. I haven't thought this
>> fully through, though.
>
> At first I wasn't sure, I was thinking that having the fields directly
> in thread_info would help avoid duplication, in case another OS (e.g.
> NetBSD) decided to implement the same thing. But not really: even if
> the fields are in thread_info, the bulk of the work (updating these
> fields) is done by the target. Since the state is managed by the
> target, target methods make sense.
>
> I will add a "target_thread_pending_parent" in this patch, a
> "target_thread_pending_child" in patch 3, and in your series you can add
> a way to get the kind. Either a new method, or I was thinking of an
> output parameter on target_thread_pending_child. Sounds good?
Yes, output parameter sound great.
next prev parent reply other threads:[~2021-11-29 15:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 20:33 [PATCH 1/2] " Simon Marchi
2021-10-29 20:33 ` [PATCH 2/2] gdb, gdbserver: detach fork child when detaching from fork parent Simon Marchi
2021-11-12 20:54 ` [PATCH 1/2] gdbserver: hide fork child threads from GDB (ping) Simon Marchi
2021-11-24 20:04 ` [PATCH 0/3] Fix handling of pending fork events Simon Marchi
2021-11-24 20:04 ` [PATCH 1/3] gdbserver: hide fork child threads from GDB Simon Marchi
2021-11-26 22:51 ` Pedro Alves
2021-11-29 12:46 ` Simon Marchi
2021-11-29 15:37 ` Pedro Alves [this message]
2021-11-24 20:04 ` [PATCH 2/3] gdb/linux-nat: factor ptrace-detach code to new detach_one_pid function Simon Marchi
2021-11-26 22:51 ` Pedro Alves
2021-11-24 20:04 ` [PATCH 3/3] gdb, gdbserver: detach fork child when detaching from fork parent Simon Marchi
2021-11-26 22:54 ` Pedro Alves
2021-11-29 18:27 ` Simon Marchi
2021-11-24 20:56 ` [PATCH 0/3] Fix handling of pending fork events Simon Marchi
2021-11-26 22:50 ` Pedro Alves
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=342f0bb2-5b42-24e3-b2bf-a6d5e3a00e33@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=simon.marchi@polymtl.ca \
/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).