[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Adjusting my debugger to work with NPTL

> How can PTRACE_CONT continue a single thread since ptrace wants a pid
> and all threads now have the same pid.

That is not true.  There are still individual PIDs for threads in the
kernel, also sometimes called TIDs or LWP IDs now.  The PID of the process
for POSIX purposes matches the TID of the initial thread from the kernel
perspective.  When you use a PID in ptrace, it refers to the single thread
with that TID.

> What is tkill. Do I need it? I found no tkill API in the header files.
> It appears to only be a system call. No docs.

It is not intended to be called by users.  pthread_kill uses it.

> > There isn't a way to stop a
> > single thread other than to stop all threads and then PTRACE_CONT a
> subset.
> This is bogus and a step backwards. Is this a temporary omission?

It's not a step backwards.  There has never before been anything like a
usable ptrace interface for a multithreaded process in Linux.  As I
mentioned, new ptrace features will probably come to pass.

> There is no reason Linux should take a second seat to Solaris and
> Windows. Both platforms which I have developed debugger for, and they
> have complete debugger APIs.

Money was spent to develop those APIs.  

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]