I have a condition where in after running the project for say 30hrs or so the project execution goes wierd. I suspect a stack overflow because , when i do attach to ruuning terget and do step by step execution the program execution is not fine. It is not doing sequential execution of code.
How to find out whether any stack overflow has occured or not and the reasons why stack overflow occurs?
Being a GNU novice this may be useless, but sounds like it may help
I can see in both Call stack and trying to do step by step execution , the way the program jumps from one point to other . What are the reasons for such a behaviour. What can cause my stack overflows - any function returns (because while building the project i saw "all functions do not return a value"), interrupts?????
Nobody suggested to step through your program AFTER a stack-overflow has occured but to look at the stack BEFORE that happens. So the advise to set an access breakpoint near TOS
There are other chances to wreck a program:
Are there ANY warnings after a re-build? Get rid of each of them!
Are you using malloc() and free()? Set the pointer to NIL after a free.
Check each pointer befor usage for vadility.
While stack overflow could be the problem, It can also be a software bug. and is easiy missed as the program works MOST of the time.
Here is an article that may help
Also, if you can post your project, people here may be able to help as well.