Kernel function calling stack analyzing and debugging method in case of Linux system breakdown

A technology of kernel functions and debugging methods, applied in software testing/debugging, hardware monitoring, etc., can solve problems such as difficult to find, waste of registers, performance degradation, etc., to achieve the effect of improving efficiency and practicability

Active Publication Date: 2013-05-15
CHINA STANDARD SOFTWARE
View PDF3 Cites 40 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Specifically, the frame pointer register is used in the traditional function call stack analysis and debugging. When the function is called, the size of a function frame can be obtained in the stack space saved by the frame pointer register, but this will waste a register, which will Resulting in performance degradation, the GCC compiler has a function omit-frame-pointer, which does not use the frame register, which can save a register and improve system performance, but it is difficult to find the frame of the function when analyzing the function call stack

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
  • Kernel function calling stack analyzing and debugging method in case of Linux system breakdown
  • Kernel function calling stack analyzing and debugging method in case of Linux system breakdown
  • Kernel function calling stack analyzing and debugging method in case of Linux system breakdown

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The implementation of the present invention will be described in detail below in conjunction with the accompanying drawings and examples, so as to fully understand and implement the process of how to apply technical means to solve technical problems and achieve technical effects in the present invention. It should be noted that, as long as there is no conflict, each embodiment and each feature in each embodiment of the present invention can be combined with each other, and the formed technical solutions are all within the protection scope of the present invention.

[0032] In addition, the steps shown in the flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and, although a logical order is shown in the flow diagrams, in some cases, the sequence may be different. The steps shown or described are performed in the order herein.

[0033] Figure 4 It is a flow chart illustrating a method for analyzing and...

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 kernel function calling stack analyzing and debugging method in case of Linux system breakdown. The method comprises the following steps of: reading a kernel with debugging information and a kernel dump file during breakdown; reading the value of a function stack pointer register r29 during breakdown, and acquiring a function return address directing a function which is running during system breakdown according to the r29; judging whether an instruction directed by the current program counter meets a requirement that an operating code is a daddiu instruction and source and target operating values are both r29; if the instruction meets the requirement, performing sign expansion on an immediate field in the current instruction, and subtracting the value of the r29 from the expanded immediate field to obtain the size of a function stack frame; and obtaining the address of the previous function of the current function according to the value of the r29. By the method, during system breakdown, a function calling relation in a stack space during breakdown can be still quickly analyzed even if the pointer register is not distributed.

Description

technical field [0001] The invention relates to a Linux operating system kernel technology, a compiler technology and a MIPS architecture technology, in particular to a method for analyzing and debugging a kernel function call stack when a Linux system crashes under the MIPS architecture. Background technique [0002] As the country pays more and more attention to self-control, the MIPS-based Loongson processor is being promoted more and more deeply, and it is becoming more and more important to solve the problems of its software support and debugging capabilities, especially to support the operation of the Linux operating system on it. . Existing crash debugging tools cannot well support the analysis and debugging of crash kernel function calls under the domestic MIPS-based Loongson server. Without the ability to analyze the function call stack when the system crashes, it will be very difficult for kernel developers to find out and solve the detailed information of the cau...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/34G06F11/36
Inventor 张志
Owner CHINA STANDARD SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products