Re: Merge of nickrob-async-20060513 to mainline?

Nick Roberts
2006-09-26T22:12:34Z

> Yes, this should work, though it seems cumbersome. When you've got
> a single thread, you don't need to pass actual data around an fd,
> just a marker "yes i'm ready now".

I don't quite follow, that's how the event loop works. Even user input
requires an fd through stdin_event_handler. There is a provision for other
events but currently only file events are used.

> 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.

> Ideally you'd be able to reuse the signal handler logic (see the calls
> to sigprocmask and sigsuspend) and thus not have a millisecond latency
> and excessive spinning. That's actually a pretty important feature,
> because context switching to gdb every millisecond or so is going to
> really hurt performance of the debuggee.

OK, a bit more homework then.

Thanks