Unlock instant, AI-driven research and patent intelligence for your innovation.

Method, system and terminal equipment for outputting function execution streams

A technology for outputting functions and execution flow, applied in memory systems, program control design, electrical and digital data processing, etc. It can solve the problem of high software development and maintenance costs, inability to clearly understand the calling relationship of program functions, and inability to quickly and dynamically observe target program logic. and other problems, so as to shorten the development and debugging time, improve work efficiency, and reduce software development and maintenance costs.

Inactive Publication Date: 2012-08-22
融创天下(上海)科技发展有限公司
View PDF6 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The purpose of the embodiments of the present invention is to propose a method, system and terminal device for outputting function execution flow, aiming to solve the problem that the debugging technology in the prior art can only observe the test observation point, and only plays the role of partially understanding the source program; Unable to clearly understand the function call relationship in the program; unable to quickly and dynamically observe the logic of the actual operation of the target program; technical problems of high software development and maintenance costs, and low efficiency of software development and debugging

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
  • Method, system and terminal equipment for outputting function execution streams
  • Method, system and terminal equipment for outputting function execution streams
  • Method, system and terminal equipment for outputting function execution streams

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] figure 1 It is a flow chart of the first preferred embodiment of a method for outputting a function execution flow in the present invention. Described method comprises the following steps:

[0037] S101, compiling the source code to generate a target program, modifying the target program and writing the soft interrupt number;

[0038] S102. Run the modified target program;

[0039] S103, judging whether the function in the target program has the soft interrupt number, and if so, outputting the execution flow of the function;

[0040] The "compiling source code to generate a target program" includes: canceling the optimization option, compiling the source code to generate a target program, and generating stack frame information when all functions in the source code are compiled;

[0041] The "generating stack frame information when all functions in the source code are compiled" is specifically:

[0042] The ip register holds the value of sp: mov ip, sp;

[0043] The...

Embodiment 2

[0046] figure 2 It is a flow chart of the second preferred embodiment of a method for outputting a function execution flow in the present invention. Described method comprises the following steps:

[0047] S201, cancel the optimization option, compile the source code to generate a target program, and generate stack frame information when all functions in the source code are compiled;

[0048] When compiling the source code, the compiler cancels the optimization option, compiles the source code to generate a target program, and generates stack frame information when all functions in the source code are compiled;

[0049] S202, searching for the binary data of the instruction "the value in the ip register minus 4 is saved to the fp register" in the target program; that is, searching for the binary data of the sub fp, ip, #4 instruction in the target program;

[0050] In the case of canceling the optimization option, the mov ip, sp instruction is the first instruction that the...

Embodiment 3

[0061] image 3 It is a flow chart of the third preferred embodiment of a method for outputting a function execution flow in the present invention. Described method comprises the following steps:

[0062] S301, cancel the optimization option, compile the source code to generate a target program, and generate stack frame information when all functions in the source code are compiled;

[0063] S302, searching for the binary data of the instruction "the value in the ip register minus 4 is saved to the fp register" in the target program; that is, searching for the binary data of the sub fp, ip, #4 instruction in the target program;

[0064] S303, query back the binary data of the instruction "the value in the sp register is saved to the ip register"; that is, query back the binary data of the mov ip, sp instruction;

[0065] S304, modifying the machine code corresponding to the "save the value in the sp register to the ip register" instruction to a soft interrupt number, that is...

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 method, a system and terminal equipment for outputting function execution streams. Soft interrupt numbers are written in target program, the target program is operated, whether the function in the target program has the soft interrupt numbers or not is judged, and the function execution streams are output if the soft interrupt numbers exist. The function invoking relationship is clearly recorded by the execution streams, the practical operation logic of the target program can be fast and dynamically observed, the soft development and maintenance cost is reduced, and the software development and debugging time is shortened. When source codes are compiled, stack frame information when all functions in the source codes are compiled are generated, and meanwhile, the optimization options are omitted, so the soft interrupt numbers are accurately written in each function, and further, the function execution streams are accurately output.

Description

technical field [0001] The present invention relates to the field of function calls, in particular to a method, system and terminal equipment for outputting function execution streams. Background technique [0002] Traditional software debugging techniques are divided into the following two methods: [0003] 1. Execute to the breakpoint, and the ARM core enters the debug pause mode. At this time, you can input instructions to the JTAG interface signal for single-step execution; [0004] 2. Monitor the set data observation points and execution observation points through the monitoring method. At this time, ARM is in a real running environment; [0005] There is following technical problem in above two kinds of methods: [0006] 1. Only the test observation point can be observed, which only plays a role in partially understanding the source program; [0007] 2. Unable to clearly understand the function call relationship in the program; [0008] 3. It is impossible to quic...

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): G06F9/45
Inventor 刘骁
Owner 融创天下(上海)科技发展有限公司