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

Variable debugging method of embedded program dynamic storage allocation

A technology of dynamic allocation and debugging methods, applied in the direction of memory address/allocation/relocation, etc., can solve the problems of no correspondence between addresses and variable names, unable to put all variables in the global area, unable to debug embedded programs, etc. Development cycle, improving program diagnostic efficiency, and expanding the scope of debugging

Inactive Publication Date: 2013-06-05
NR ELECTRIC CO LTD +1
View PDF4 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As the size of the program increases, the global data space is limited, and it is impossible to put all variables in the global area, and some data needs to be dynamically allocated according to the specific situation
Variables that dynamically allocate memory are applied for in the program constructor. The addresses of these variables are unknown before the program runs. Since the CPU runs binary instructions, there is no correspondence between addresses and variable names during the running process, so it is impossible to use the traditional The emulator debugging method is used to debug the actual value of the variable in the running mode of the dynamically allocated memory of the embedded program

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
  • Variable debugging method of embedded program dynamic storage allocation
  • Variable debugging method of embedded program dynamic storage allocation
  • Variable debugging method of embedded program dynamic storage allocation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] figure 1 Structure information table In the schematic diagram, the structure information table includes the following contents: structure type name, instance name, and start address.

[0018] exist figure 2 In the code example of calling the structure registration function, the structure type is named Current, memory is dynamically applied for in the constructor of Current, and the registerComponent function is called to register the structure instance information. In the Main function, the constructor is called twice, and the instance names cur1 and cur2 are defined in turn.

[0019] pass image 3 calculation process, the host computer software forms a structure member table Figure 4 As shown, the structure Current has 3 integer member variables, the names are IA, IB, and IC, and the relative offset addresses are 0, 4, and 8. according to Figure 6 It is an example of the visual debugging interface of the upper computer software. The user double-clicks the conne...

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

A variable debugging method of embedded program dynamic storage allocation is characterized in that the logining of an interface of the structural body of an embedded program is achieved, an upper computer is provided with a program sum of debugging the structural body of the embedded program, the communication protocol of the debugging of variables is achieved, the communication protocol is debugged through an upper computer program and the embedded program, the variable name of a level to be debugged is input on an upper computer software by a user, the upper computer software reads program header files, analyzes a data structural body, and calculates the relative offset address and the data type information of each member variable, and a variable debugging table is formed, and is downloaded in a device. The software records a structural body example word address of dynamic application in a constructor, and inquires an relative address according to a debugged level variable name, the structural body word address is added, the absolute address of each member variable is obtained, and the data of the absolute address are accessed and are sent to the upper computer to display. The variable debugging method of the embedded program dynamic storage allocation overcomes the defect that in the past only the global variable of the static allocation of a compiler can be debugged, and improves the diagnosis efficiency of the program.

Description

technical field [0001] The invention belongs to the category of program debugging, and in particular relates to a variable debugging method for dynamically allocating memory of an embedded program. Background technique [0002] In the process of software development and maintenance, software debugging is a very important step, through debugging to diagnose and solve program problems. The program running in the upper computer (PC) environment can easily carry out single-step debugging or output intermediate running information because of the man-machine interface tool for integrated development and debugging. Because the embedded software runs independently in the device, it is usually debugged by connecting the debug line through the emulator. This mode requires people to know the address of the variable in advance, and the device can only support simulation in the STOR (stop real-time running) mode. debugger. There is currently no way to debug dynamically allocated memory...

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): G06F12/02
Inventor 冯亚东陈宏君周强刘克金徐东方赵天恩
Owner NR ELECTRIC 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