Re: How to read register values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux