Forum Discussion
Altera_Forum
Honored Contributor
15 years agoGcc4 Frame Pointer Issue
I've been trying to write some code in an MPU exception handler to trap and dump the call stack when an intermittent exception occurs in our system and am pretty sure I've found a bug in the latest G...
Altera_Forum
Honored Contributor
12 years agoAny news concerning this frame pointer issue?
I am trying to store/dump a backtrace in case of an exception in a NiosII system (without MPU) with ACDS 13.01 sp1 (gcc version 4.5.3). My observation matches exactly the OPs description. The compiler seems to calculate the frame pointer correctly as long as the called functions do not hold a lot of local variables. But with a more complex chain of function calls, the fp points somewhere near the stack pointer but NOT to the actual back link. As for the__builtin_return_address(): still the same in gcc 4.5.3. Does anyone know if this behaviour is still the same with the new compiler in Quartus/Nios 13.1?