show size of stack needed by functions
Ian Lance Taylor
iant@google.com
Wed Oct 13 20:15:00 GMT 2010
Sebastian <sebastianspublicaddress@googlemail.com> writes:
> can gcc show the size of the stackframe of functions, so you can, given
> a callgraph without cycles, calculate the worst case stack size?
>
> (Assuming no use of alloca or C99 variable size arrays)
>
> Can gcc (or ld) dump a callgraph?
The mailing list gcc@gcc.gnu.org is for the development of gcc itself.
This question would be more appropriate for the mailing list
gcc-help@gcc.gnu.org. Please take any followups to gcc-help. Thanks.
See the -fstack-usage option.
gcc can not dump a callgraph. Both GNU ld and gold can dump a
cross-reference table, which is not a call graph but could perhaps be
used to produce a call graph. See the --cref option.
Ian
More information about the Gcc
mailing list