Error tracking method of embedded system and device thereof
An embedded system and error tracking technology, applied in the field of error tracking methods and devices of embedded systems, can solve problems such as system stability impact, system crash, ineffective and timely system debugging and recovery, etc., to protect memory pages, Improved stability and reliability effects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051] Embodiment 1, an error tracking method for an embedded system, comprising:
[0052] When an exception occurs in the system, save the processor operating environment, and find the stack frame of the currently running function according to the frame pointer;
[0053] Repeat the following steps until the entire function call relationship chain that runs when an exception occurs in the system is traced back:
[0054] From the found stack frame, obtain the register information saved when the function to which the stack frame belongs begins to execute, and the function parameter information, as well as the starting address of the function code, and further obtain the name of the function, and obtain the function that calls the function The bottom of the stack frame; the stack frame of the function calling the function is found through the bottom of the stack frame.
[0055] In this embodiment, the method is as figure 1 As shown, it specifically includes the following steps:...
Embodiment 2
[0070] Embodiment 2, an error tracking device for an embedded system, such as figure 2 shown, including:
[0071] The exception handling unit is used to obtain and save the processor operating environment when an exception occurs in the system;
[0072] The stack frame backtracking unit is used to find the stack frame of the currently running function according to the frame pointer when the system is abnormal; and then repeat the following steps until the entire function call relationship chain running when the system is abnormal is traced back:
[0073] From the found stack frame, obtain the register information saved when the function to which the stack frame belongs begins to execute, and the function parameter information, as well as the starting address of the function code, and further obtain the name of the function, and obtain the function that calls the function The bottom of the stack frame; find the stack frame of the function that calls the function through the b...
Embodiment 3
[0088] Embodiment 3, a specific example of error tracking.
[0089] Such as image 3 As shown, after the system is powered on, the hardware device environment and software resources are initialized, and the access attributes of each memory area are set through the mmu, such as read-only, read-write, etc. After that, the application program starts to run. If the operating system supports it, the application program will schedule the function to run in the thread mode; if not, the application program will execute in the function call mode.
[0090] In this example, the memory area where the memory 0x0 is located is pre-set as a read-only attribute, so that the following content in the application program will cause a data access abort exception because there is no write permission:
[0091] unsigned int x = 0; / / global variable
[0092] int func1(unsigned int*c)
[0093] {
[0094] int d = 0;
[0095] *(unsigned int*)c=0x100;
[0096] d=*(unsigned int*)c;
[0097] return ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com