US 11,853,151 B1
Task abnormality detection system and embedded device detection method
Siwei Jiang, Jiangsu Province (CN); Kun-Hsuan Wu, Hsinchu (TW); Hong Zhang, Jiangsu Province (CN); and Shuyu Deng, Jiangsu Province (CN)
Assigned to Realtek Semiconductor Corporation, Hsinchu (TW)
Filed by Realtek Semiconductor Corporation, Hsinchu (TW)
Filed on Feb. 7, 2023, as Appl. No. 18/165,925.
Claims priority of application No. 202211435780.3 (CN), filed on Nov. 16, 2022.
Int. Cl. G06F 11/00 (2006.01); G06F 11/07 (2006.01); G06F 11/28 (2006.01)
CPC G06F 11/079 (2013.01) [G06F 11/0736 (2013.01); G06F 11/0793 (2013.01); G06F 11/28 (2013.01)] 11 Claims
OG exemplary drawing
 
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.