I have implemented l_private accessor in ptrace(2). By default this uses l_private from the lwp struct. PT_SET_LWP_PRIVATE uses lwp_setprivate() directly and this call abstracts internally MI and MD code. The PT_SET_LWP_PRIVATE operation uses by default l_private from the struct lwp, however whenever appropriate, picks MD logic that grabs this value from a MD filed (register or pcb). MD code is implemented for: - sparc, sparc64 - alpha - hppa - powerpc - sh3 There is included compat32 support and ATF tests. http://netbsd.org/~kamil/patch-00202-PT_GET_LWP_PRIVATE.txt This ptrace operation is inspired by PTRACE_GET_THREAD_AREA / PTRACE_SET_THREAD_AREA from linux. Please review. After merging this, I will add an entry in man-page ptrace(2) and implement core(5) generation of PT_GET_LWP_PRIVATE for each LWP within a process.
Attachment:
signature.asc
Description: OpenPGP digital signature