Yes, right, it's all about debugging here as mentioned in initial post.
Ehm, no this isn't mentioned in your initial post. While there is a
TDbgLinuxThread type in the code example this does in no way explain what you're trying to do. It could after all simply be some thread in your own application that has this name for providing information about other threads in the same application. Nothing hints at you trying to extend
FpDebug.
Well, is there really no way to get pthread_t from tid?
No, there isn't because
pthread_t is a type provided by the C library,
not the kernel and an application might not use the C library to create its threads (e.g. by using the
clone syscall directly). Thus your safest bet
is the
comm file as that is provided by the kernel.
I am thinking of adding a lookup array to Threadmanager (rtl/unix/cthreads.pp) which is updated in CBeginThread.
...
AddThread(Do_SysCall(syscall_nr_gettid)), threadid);
...
That would be rejected.