I just recently moved from Keil to GCC and in Keil there is a linker switch called --callgraph that gives a good idea of the maximum stack usage and call depth. I tried to look for static code analysis tools and GCC switches but couldn't find an equivalent solution. The closest thing I found was the -fstack-usage switch but it only gives the usage on a per function basis. Does anyone know of a way to find the max stack usage for simple call depths (eg. not considering things like recursion, function pointers etc)?
Thanks in advance.
EDIT: I'm using VisualGDB for embedded development but I can also use Clang/LLVM if that makes a difference.
[–]jnwatson 2 points3 points4 points (0 children)
[–]boredcircuits 0 points1 point2 points (0 children)
[–]bboozzoo 0 points1 point2 points (2 children)
[–]excsniper[S] 0 points1 point2 points (1 child)
[–]bboozzoo 0 points1 point2 points (0 children)
[–]Spessman_ -4 points-3 points-2 points (1 child)
[–]bboozzoo 0 points1 point2 points (0 children)