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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 