How to get other process data ?

I have process with some threads and every thread has its own name:
pthread_key_t th_key;
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:
(char *)tls.keydata[0]

How to read this pointer (outside owner process)?
/or how to set thread name and than get it?

if this are different processes, the memory would be protected against another access.
So try putting your data into a shared memory object, whicht could be read
from other processes too. (shm_*)

Why not send the name instead of a pointer to the name? Micro, I think if he uses shared memory that it will defeat the purpose as he most likely will no longer be able to distinguish one thread from another, which sounds important. On top of that, the address will not be the same unless the shared memory is aligned, although an offset would be.