|
how to get stack frame size for each function from disassembly -- Posted by inturi on Friday, July 16 2010
Once you have stack trace, for each function, look at starting instruction in the function disassembly.
It looks some thing like
save %sp, -0x70, %sp
The above instruction shows that this function stack frame size is 112(0x70)bytes and stack grows down towards lower address.
$sp or %sp register holds current top of stack pointer $fp or %fp register holds current function frame pointer address. Base address for this function stack frame.
In Solaris you can look at stack frame structure definition in include file /usr/include/sys/frame.h
|