From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: Merge of nickrob-async-20060513 to mainline?
Date: Tue, 26 Sep 2006 23:40:00 -0000 [thread overview]
Message-ID: <17689.47563.949450.420418@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20060926222406.GA30535@nevyn.them.org>
> Right - but you don't need to put the actual data (e.g. the PID and
> status) through the fd. I guess it doesn't hurt, but it does make
> things harder to debug. Instead, you can save them in memory, and
> just push a byte through the fd - that will make it show up in select.
OK, if that's simpler.
> > > Moving the call to waitpid out of linux-nat.c, and to a target
> > > independent file, is a mistake - presumably that's just how you got it
> > > to work quickly? That's related to why it doesn't work for threads.
> > > The vital line is "options ^= __WCLONE" in the loop in linux_nat_wait.
> > > Without __WCLONE, you'll never see a wait status from a thread; with
> > > it you'll never see a wait status from the main program.
> >
> > Perhaps I can use __WALL as a catch all.
>
> There's supposedly some supported kernel versions left where that
> didn't work. Why can't you use the same code the existing support
> uses?
AFAICS the problem is one of timing. GDB uses the status information in
linux_nat_wait but must detect that the status has changed in the event loop
(gdb_wait_for_event). However linux_nat_wait makes many calls to waitpid (at
least in the multi-threaded case). I am/was hoping that, for asynchronous
operation, I only need to replace the first call to waitpid with another one,
which I've called gdb_fetch_event, to read the status information which has
already been waited on. That's probably a bit naive but I can't see how
I can dart back and forth between gdb_wait_for_event and a single call
to linux_nat_wait.
> I'm sorry I haven't been able to pitch in and help with this. I
> checked it out last week and started looking at it, but I'm buried
> in work past my eyeballs right now.
I'm just grateful for any help you can give me.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2006-09-26 23:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-30 2:27 Nick Roberts
2006-08-30 2:33 ` Daniel Jacobowitz
2006-08-30 3:21 ` Nick Roberts
2006-08-30 4:01 ` Daniel Jacobowitz
2006-08-30 12:31 ` Eli Zaretskii
2006-08-30 21:34 ` Nick Roberts
2006-08-30 21:43 ` Daniel Jacobowitz
2006-08-30 23:45 ` Nick Roberts
2006-09-26 8:41 ` Nick Roberts
2006-09-26 12:38 ` Daniel Jacobowitz
2006-09-26 22:12 ` Nick Roberts
2006-09-26 22:24 ` Daniel Jacobowitz
2006-09-26 23:40 ` Nick Roberts [this message]
2006-09-29 1:50 ` Nick Roberts
2006-10-06 0:53 ` Nick Roberts
2006-10-06 1:26 ` Daniel Jacobowitz
2006-10-06 2:13 ` Nick Roberts
2006-10-06 3:24 ` Daniel Jacobowitz
2006-10-08 3:46 ` Nick Roberts
2006-10-09 18:00 ` async implies sync, was " Michael Snyder
2006-10-09 20:28 ` async implies sync Nick Roberts
2006-08-31 21:03 ` Merge of nickrob-async-20060513 to mainline? Mark Kettenis
2006-08-31 21:49 ` Nick Roberts
2006-08-31 22:29 ` Daniel Jacobowitz
2006-08-31 22:40 ` Nick Roberts
2006-08-31 22:53 ` Michael Snyder
2006-08-31 23:33 ` Nick Roberts
2006-08-31 23:37 ` Daniel Jacobowitz
2006-08-31 23:59 ` Jim Ingham
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=17689.47563.949450.420418@kahikatea.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=drow@false.org \
--cc=gdb@sources.redhat.com \
/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