about analyze object's stack usage
Marcus Wanner
marcusw at cox.net
Wed Jul 29 08:34:09 EDT 2009
On 7/29/2009 3:51 AM, hch wrote:
> Is there a python script can get a list of how much stack space each
> function in your program uses?
I don't think so.
You could try raw reading of the memory from another thread using ctypes
and pointers, but that would be madness.
> ( the program is compiled by gcc)
If you're talking about a c program, almost certainly not. What you
should do is just use gdb and disas each function and look at what it
subtracts off of %esp at the third instruction in the function.
I can explain it to you if you are not very experienced in gdb and
assembly...
Marcus
More information about the Python-list
mailing list