Is there any elegant way to calculate the maximum possible stack depth utilization of a program, using IDAPython?
currently my best approach is iterating through all functions and counting stack-increasing instructions.
IDAPython-function get_frame_size(ea)
gives size of stack in bytes.
So you can get max stack through all available functions:
"0x%04X" % max(get_frame_size(f) for f in Functions(0, BADADDR))
getrlimit(2)
for more on this.