CPC G06F 11/079 (2013.01) [G06F 11/0736 (2013.01); G06F 11/0793 (2013.01); G06F 11/28 (2013.01)] | 11 Claims |
1. An embedded device detection method, comprising:
executing a task, by an embedded device, wherein the task comprises a plurality of functions;
when an abnormal interruption occurs to the task, obtaining, by a detection device, a stack pointer and a program counter corresponding to the abnormal interruption from a status file, wherein the program counter is configured to record a memory address in use when the abnormal interruption occurs to the task, wherein the abnormal interruption indicates that an error occurs in execution or call of a function;
obtaining a stack space corresponding to a first target function being executed when the abnormal interruption occurs to the task according to the program counter;
forwarding a position indicated by the stack pointer for a size of the stack space in the status file to find a register which is configured to record an address of an second target function before the first target function is executed; and
correcting the task according to the second target function.
|