Displaying 1 result from an estimated 1 matches for "reg_fsbase".
Did you mean:
reg_base
2008 Mar 04
0
Determining curthread pointer (ulwp_t) via libproc on i386
...}
if ((lwp = &Pstatus(Pr)->pr_lwp) == NULL) {
fprintf(stderr, "Couldn''t grab pr_lwp\n");
exit(1);
}
#if defined(__amd64)
if (Pstatus(Pr)->pr_dmodel == PR_MODEL_LP64) {
addr = lwp->pr_reg[REG_FSBASE];
} else {
addr = lwp->pr_reg[REG_GSBASE];
}
#else
#error "Need to figure this out"
#endif
printf("ulwp_t is 0x%lx\n", addr);
--------------------------------------------------------------------------------
But things don''t s...