I have process with some threads and every thread has its own name:
char* th_buff = “sysinfo.main_thread”;
pthread_key_create( &th_key, NULL );
pthread_setspecific( th_key, (void *)th_buff );
When I get tls data (in other process):
struct _thread_local_storage tls;
devctl( fd, DCMD_PROC_TIDSTATUS, … );
lseek64( fd, … )
read( fd, &tls, sizeof(struct _thread_local_storage) );
it gives me pointer to th_buff string,
but it is not within my process so I cannot read it:
How to read this pointer (outside owner process)?
/or how to set thread name and than get it?