Keil™, An ARM® Company

Technical Support

DSCOPE: DETECTING STACK OVERFLOW

QUESTION

How do I check to see if my program is overflowing the stack?

ANSWER

It is easy to use the dScope debugger to check if you program overflows the stack.

Set a memory access breakpoint at the end of the stack. When your program WRITES to this location (using the PUSH instruction or when a function is CALLed), dScope halts program execution on the line that overflows the stack.

The following dScope command:

BS WRITE BYTE(D:0x78)

sets a WRITE access breakpoint on the byte at data memory location 0x78. When anything writes to that location, dScope halts program execution.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Friday, November 16, 2001


Did this article provide the answer you needed?
 
Yes
No
Not Sure