Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Function call stack analyzing method and device based on VxWorks operation system

A function call and operating system technology, applied in software testing/debugging, hardware monitoring, etc., can solve problems such as the inability to accurately provide function names of local functions, analysis content, and cumbersome methods

Active Publication Date: 2014-02-05
FENGHUO COMM SCI & TECH CO LTD
View PDF5 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When analyzing the call stack, the parsed function name is the global function name, and the local function name cannot be parsed out. The local function name is identified by adding the address offset to the global function name. Therefore, use the tt command on the VxWorks target machine to run When the function calls the program for stack analysis, the function name of the local function cannot be provided accurately
[0008] (2) In the prior art, the method of searching for the first instruction of the function to which the PC is based on the PC value on the target machine is cumbersome and unreliable, because the assumption is that there is a function in front of the function
[0009] (3) The call stack analysis depends on the characteristic instructions. For example, the embedded assembly subroutine under the MIPS system may not have an explicit push instruction, so the call stack cannot be analyzed or the content of the analysis is incorrect.
[0010] (4) Most of the commands for call stack analysis run on the target machine. In an embedded system, due to the limited resources of the target machine, there are restrictions on the size of a single function that can be traced and the depth of function calls that can be traced. Therefore, when When the size of the function exceeds the length of the tracked instruction preset by the system, or when the depth of the function call exceeds the preset depth of the system, the obtained function call stack information is incomplete

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Function call stack analyzing method and device based on VxWorks operation system
  • Function call stack analyzing method and device based on VxWorks operation system
  • Function call stack analyzing method and device based on VxWorks operation system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0101] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0102] The embodiment of the present invention provides a function call stack analysis device based on the VxWorks operating system, including a host computer and a target computer. It is mainly used to execute the operation instructions of the host and return the actual running status.

[0103] see figure 1 As shown, the embodiment of the present invention provides a method for analyzing a function call stack based on the VxWorks operating system, comprising the following steps:

[0104] S1. Input the ELF file of the VxWorks image currently running on the target machine on the host computer, and generate a symbol table file of the image file on the host computer at the same time by using existing tools.

[0105] S2. Assuming that the task that needs to analyze the function call stack is t1, the host sends a request command to the t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a function call stack analyzing method and device based on a VxWorks operation system and relates to the field of function call stack analyzing. The method includes the following steps that a main machine requests for TCB information of a task t1 from a target machine, and the target machine returns the TCB information of the task t1; the main machine obtains stack point (SP) value, program counter (PC) value and return address (RA) value from the returned TCB information, the main machine requests for information of stack space from the target machine according to the SP value and stack bottom information, and the target machine returns corresponding stack information; the main machine conducts function call stack analyzing according to the TCB information of the target machine, information of the stack space and disassembling files. A function name of a local function can be analyzed, a first command of a function of the PC value is found conveniently, function call stack analyzing can be conducted under the situation of no feature command, and meanwhile, the method and device is not subjected to limit of resources of the target machine, provides complete function call stack and is favorable for locating faults and abnormity.

Description

technical field [0001] The invention relates to the field of function call stack analysis, in particular to a function call stack analysis method and device based on a VxWorks operating system. Background technique [0002] In computer science, a stack is defined as a special container that obeys the rule that the data that is pushed into the stack first is popped out of the stack. The user can push data into the stack, that is, push the stack, or pop the data that has been pushed into the stack, that is, pop the stack. The stack plays an important role in the running of the program. Most importantly, the stack stores the maintenance information required by a function call, which is often called a stack frame. The stack frame of a function occupies a continuous area, and each stack frame corresponds to for a function that did not finish running. When the function starts, the corresponding stack frame has been completely established; when the function exits, the function st...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36G06F11/34
Inventor 曾颜
Owner FENGHUO COMM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products