This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: MI output during program execution


On Mon, Oct 03, 2005 at 02:50:27PM -0700, Jim Ingham wrote:
> This isn't just Mac OS X.  Any ptrace based system that wants to  
> write a real async target is going to have to spawn a thread  
> somewhere to do it, since ptrace is a blocking call.

That's wrong.  First of all, ptrace never blocks.  Second of all,
ptrace returns events through wait4, which generates SIGCHLD.  All very
amenable to handling in select().

> This isn't so bad, though.  If the platform doesn't have a reliable  
> pthreads implementation, it won't get a flakey gdb, rather, it just  
> won't get an async native target.

Well, I'd rather only have one set of targets than maintain both...
if we can make the target loop fully asynchronous, then we should do
that.  Otherwise one code path is absolutely promised to bit-rot.

As an aside, it's not so much a question of a reliable pthreads
implementation, as being able to use GDB to debug the pthreads
implementation.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]