On Dec 16, 2015, at 9:22 AM, Jerome H. Fine <jhfinedp3k at compsys.to> wrote:
Note that for many CPUs, adding values (a push)
results in the
stack pointer becoming numerically smaller (unsigned of course).
Internally, the code would handle the actual arithmetic.
(Warning: assembly language noob talking, please disregard if I see to be making no
sense.)
1) Does the debugger enhancement trigger a stop on overall size of stack pointer or on
cumulative changes? Or could it be selectable (maybe via a negative argument?)
Here?s what I?m thinking: suppose a routine is expected to remove things from the stack
sequentially, then branch at some point to a subroutine. I want the debugger to halt
execution when it branches. So I want the stop to occur when the stack pointer first
increases, even if it has already decreased several times and its new value (on branching)
is lower than where it was when the debug command was issued.
2) Some machines (6809, which is the only one I?m familiar with) have a rapid-response
branching mechanism for real-time control applications (on the 6809 it?s a Fast Interrupt
input). Fewer registers are pushed onto the stack so the service routine can execute
sooner. Is there a way to handle this situation? Say I expect two levels of subroutine
calls, each stacking a full set of registers, but instead I get for the second subroutine
a Fast Interrupt and don?t stack enough registers to trigger the debug counter to halt
execution.
Hope this is useful.
- Mark