摘要 |
A debugging method using a stack of a CPU is provided to perform a smooth debugging though a user makes a program excluding a dangerous attempt code and then there occurs a problem. A debugging method comprises the following several steps. A CPU having a set amount of stacks in its inner space determines whether an instruction to a memory or to a register is performed(S201). In case of the instruction to the memory, the CPU receives an entry from plural executing codes records via a core and records the entry at the stacks wherein the entry is composed of changed position of a memory, a value before data is changed and a value after data is changed whenever the data at the memory is changed(S203). In case of the instruction to the register, the CPU records an entry at the stacks wherein the entry is composed of an address of the register, a value before data at the register is changed and a value after data at the register is changed(S205). If there occurs an error, the CPU executes a debugging unit(S207,S209). The debugging unit debugs a value of the memory or the register to a state before data at the memory or the register is changed while reading the latest inputted data by using the entry of the changed value of the memory or the register stored at the stacks just before there occurs the error(S211).
|