lkml.org 
[lkml]   [2010]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectPtrace : reading process user area, stack size etc
From
Hi

I am trying to read the stack size from user area for processes which
I am ptracing, for some reason
the stack is being reported as ffffffff.

This is how I am trying read the stack size, using struct user from
sys/user.h, I am on x86,

stack_size = ptrace (PTRACE_PEEKUSER, getpid(), offsetof (struct user,
u_ssize), 0);


Any idea? What is the best way to read stack size of each thread? I
know getrlimit() but that just talks about
size of main thread. Each thread on my system can have different stack
size and I cant use pthread_* functions
here.


-Leo.


\
 
 \ /
  Last update: 2010-04-03 20:17    [W:0.024 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site