发明名称 Stack underflow debug with sticky base
摘要 A stack pointer is copied to a stack pointer base to debug stack underflow. A move instruction, used to initialize the stack pointer, is modified to additionally copy the stack pointer to a stack pointer base register. During a course of execution in a single context, the stack pointer base sticks to the initial base value while the stack pointer is altered by a succession of PUSH and POP instructions. By monitoring for equivalence in the stack pointer and the stack pointer base values, a balanced number of PUSH and POP instructions is detected. If an equal number of PUSH and POP instructions is detected and an additional POP instruction is programmed, a stack underflow condition exists, an exception condition signaled, and exception flag produced. The exception condition allows the stack to be protected from an excessive POP instruction retrieving data out of context and subsequent loss of stack data.
申请公布号 US7752427(B2) 申请公布日期 2010.07.06
申请号 US20050298155 申请日期 2005.12.09
申请人 ATMEL CORPORATION 发明人 LAMBRACHE EMIL;FROEMMING BENJAMIN F.
分类号 G06F7/38 主分类号 G06F7/38
代理机构 代理人
主权项
地址