Hi, Nguyen Anh Phu wrote:
Oh, of course I don't want to modify registers from within program, in fact, I want to monitor stack usage of my program, so I want to read esp register and compare it with start address of stack. Is there a "non-asm" way to do?
Maybe you can have a look at the GCC Built-in function __builtin_frame_address() (http://gcc.gnu.org/onlinedocs/gcc-4.0.1/gcc/Return-Address.html#Return-Address).
Sincerly, Thomas -- Thomas Petazzoni thomas.petazzoni@xxxxxxxx -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/