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

Method and system of debugging static library function

A technology of library functions and static libraries, which is applied in the field of debugging static library functions, can solve the problems of difficult work, users cannot obtain source code, and cannot add debugging information, etc., and achieve the effect of easy modification

Active Publication Date: 2014-09-17
OPZOON TECH
View PDF7 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In fact, when writing C language programs, library functions should be used as much as possible, which can not only improve the operating efficiency of the program, but also improve the quality of programming, but due to improper use by developers, many errors often occur, and many errors In the end, it is reflected in the library function, so there needs to be a way to add debugging code to find the cause of the error
[0004] In the prior art, in order to debug library functions, it is usually necessary to modify the source code of the library, add debugging information, and recompile. Specific source code, debugging information cannot be added, resulting in failure to debug

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 and system of debugging static library function
  • Method and system of debugging static library function

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0029] The method of the present invention is described below with a specific embodiment, but the protection scope of the present invention is not limited. The method of the present embodiment comprises the following steps:

[0030] Step 101: receiving the function name malloc input by the user, and searching in the static library according to the received function name malloc;

[0031] Step 102: Obtain the library function to be debugged (i.e. the function named malloc in the static library), and modify the function name malloc of the library function to be debugged to the function name Malloc (taking Malloc as an example here, it can also be Other names), at this time, the location where malloc is called in the currently executing program, and there is actually no specific function corresponding to it at this time;

[0032] Step 103: create a debugging function called malloc in the source code of the program to be executed;

[0033] Step 104: When the program to be execute...

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 and a system of debugging a static library function and relates to the technical field of library function debugging. The method comprises the steps of S1, obtaining a library function to be debugged, and changing a function name A of the library function to be debugged into a function name B; S2, building a new debugging function with a function name A in a source code of a program to be executed; S3, when the library function to be debugged needs to be called by the program to be executed, calling the debugging function by the function name A, calling the library function to be debugged by the function name B so as to realize the debugging of the library function to be debugged. According to the method and the system, the function name of the library function is simply changed, the debugging of the library function is realized, the code of the library function does not need to be modified, the library function does not need to be recompiled, the functions of the library function are not changed, only the function name of the library function is changed, the operation is simple, and the modification is easy.

Description

technical field [0001] The invention relates to the technical field of library function debugging, in particular to a method and system for debugging static library functions. Background technique [0002] Static library functions generally refer to the functions provided by the compiler that can be called in the C language source program. It can be divided into two categories, one is the library function stipulated by the C language standard, and the other is the compiler-specific library function. Due to copyright reasons, the source code of the library function is generally invisible, but its external interface can be seen in the header file. The statement of C language is very simple. If you want to use the statement of C language to directly calculate the sin or cos function, you need to write a rather complicated program. Because there is no statement in the C language statement to directly calculate the sin or cos function. Another example is to display a piece of ...

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/36
Inventor 李鹏
Owner OPZOON TECH
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