Idea Originally Posted by Dave 20/04/2009
The idea is to have the debugger examine an area of memory, and search from the "end" back for a specific character, and report how far back it got before the character was not found. When compiled with INITIALIZE_STACKS this could be used to report, grap
Ben, you don't need to do that. You can use these to prevent you from having to look at the map file extern uint8_t __stack_start__; extern uint8_t __stack_end__;
This would be good but I'm not sure of the implementation. I do this manually by reading the map file to find the stack start and end, do a fill function at the start of the program and then periodically check the change from the fill value to see my usage. But I have to re-do it every time I add something to the program. The compiler knows the stack size and position so could do the fill, the debugger could do the check on a pause fairly simply I'd have thought.
21/07/2009 Jonathan Elliott (Admin)
Ahh, that's much easier. I have a prototype set of tools to monitor stack depth for CTL, our own tasking library, but never really considered the necessity to have a GUI-based display system. I don't think there would be a lot to getting this working.
13/07/2009 Jonathan Elliott (Admin)
Ok, we've considered this for GCC and non-GCC compilers. In a way, it's easier with our own compilers because the stack adjustment is known on each instruction of a C-compiled file. For GCC, it seems that we need to run a static analysis of each function's code in order to glean this. In short, it's possible to do, but it will take a lot of effort.
Please sign in to leave a comment.