Let's continue our wandering in endless dead end
GCC has struct stack_usage and even field su inside struct function. And this last is accessible as global var cfun. So it's should be easy to patch dwarf2out.cc yet one more time for example to extract stack size (like function output_stack_usage_1 do) and put it inside
DW_AT_frame_base
block, right?NO
As you can see function allocate_stack_usage_info called only when
- flag_callgraph_info is set - corresponding to option -fcallgraph-info
- flag_stack_usage_info is set - corresponding to options -fstack-usage
There should probably be heartbreaking conclusion about quality of opensource in general and gcc and in particular...