Multi-language debugger design method oriented to domestic operating system and hardware platform
1. A multi-language debugger design method oriented to a domestic operating system and a hardware platform is characterized by comprising the following steps:
A. basic information investigation;
B. constructing a hardware framework;
C. inputting a program language;
D. filling software content;
E. trial calculation and execution of the program;
F. and (5) program debugging and modifying.
2. The multi-language debugger designing method for domestic operating system and hardware platform according to claim 1, wherein said step a basic information research comprises the following concrete contents:
a1: selecting a domestic operating system secondarily developed based on Linux and a common hardware platform, investigating the types of program languages mainly adopted by the system and the hardware platform, acquiring related information, and simultaneously recording data.
3. The multi-language debugger designing method oriented to domestic operating system and hardware platform according to claim 1, wherein said step B hardware framework construction includes the following concrete contents:
b1: establishing a software framework structure of the multi-language debugger on the basis of a domestic operating system, and setting an integrated chip of a hardware platform as an operating environment of the multi-language debugger;
and B2, designing an actual processing flow, designing hardware parameters, related configuration and a packaging paradigm of the integrated chip, and reserving connection interfaces with other components.
4. The multi-language debugger design method oriented to domestic operating system and hardware platform of claim 1, wherein said step C program language entry comprises the following specific contents:
c1, selecting the program language type used by the domestic operating system and the hardware platform, and inputting the program language and the related information into the program language storage module built in the multi-language debugger;
and C2, simultaneously inputting multiple program language types, classifying the commonly used main program language type and other program language types, giving a larger running memory to the commonly used main program language type, reasonably distributing the used memory and improving the use efficiency.
5. The multi-language debugger design method oriented to domestic operating system and hardware platform of claim 1, wherein said step D software content filling comprises the following concrete contents:
d1, embedding the relative module units of program language identification module, program language reading module, program language processing module, program language translation module, program language output module, etc. into the hardware platform of the integrated chip of the multi-language debugger;
and D2, electrically connecting the module units according to the running sequence of the system program and ensuring that the connection mode is correct.
6. The multi-language debugger designing method oriented to domestic operating system and hardware platform according to claim 1, wherein said step E program trial execution includes the following specific contents:
e1: setting uniform language source codes, enabling various program language modules to correspond to the language source codes one by one, interactively controlling the running of a program by setting breakpoints, stepping and the like, and checking the real-time running condition of the program;
e2, when the code information needs to be checked in the runtime, the program language needs to be translated, and the translation can be performed by: source program language-language source code-translated form of machine language.
7. The multi-language debugger designing method for domestic operating system and hardware platform according to claim 1, wherein said step F program debugging modification includes the following specific contents:
f1, using record-replay technique to realize operation debugging, inputting analog data to test operation, comparing output result with correct result, analyzing error program statement in recording process, recording occurrence time of debugging execution event, and finding out error part conveniently and rapidly;
f2, if the program is debugged, replacing the program language and its chip in the error part in time, and executing the steps D-F again until obtaining the development and debugging multilingual debugger which operates correctly, thus completing the design and execution steps of the multilingual debugger.
Background
The working principle of the debugger is based on the abnormal mechanism of the central processing unit, and the subsystem (or module) of the abnormal distribution/event distribution of the operating system is responsible for carrying out encapsulation processing on the debugger and then carrying out real-time interaction with the debugger in a friendly mode. Every time the debugger captures an exception \ event, it will determine whether to take over the exception \ event according to the debugger's own logic, and decide which function of the debugger to take over. After the debugger takes over the exception/event, the debugger further processes the exception/event according to the requirement of the user, and after the processing is finished, the system is informed that the processing is finished, and at this time, a new round of exception/event capturing and distributing cycle begins.
The existing multi-language debugger is mostly designed in a software form, but not matched with a certain independent hardware platform, so that a software program needs to occupy a larger memory when running, is mostly in a single language form, has a smaller application range, and is not convenient to find out an execution error part in the debugging process.
Disclosure of Invention
The invention aims to provide a multi-language debugger design method facing a domestic operating system and a hardware platform, and solves the problems that the existing multi-language debugger proposed in the background technology is mostly designed into a software form instead of being matched with an independent hardware platform, so that a software program needs to occupy a larger memory when running, mostly is in a single language form, has a smaller application range, and is inconvenient to find out an execution error part in the debugging process.
In order to achieve the purpose, the invention adopts the following technical scheme:
a multi-language debugger design method oriented to a domestic operating system and a hardware platform comprises the following steps:
A. basic information investigation;
B. constructing a hardware framework;
C. inputting a program language;
D. filling software content;
E. trial calculation and execution of the program;
F. and (5) program debugging and modifying.
Preferably, the basic information investigation of step a includes the following details:
a1: selecting a domestic operating system secondarily developed on the basis of Linux and a common hardware platform, investigating the types of program languages mainly adopted by the system and the hardware platform, acquiring related information, and simultaneously recording data;
preferably, the step B hardware framework construction includes the following specific contents:
b1: establishing a software framework structure of the multi-language debugger on the basis of a domestic operating system, and setting an integrated chip of a hardware platform as an operating environment of the multi-language debugger;
and B2, designing an actual processing flow, designing hardware parameters, related configuration and a packaging paradigm of the integrated chip, and reserving connection interfaces with other components.
Preferably, the step C program language entry includes the following specific contents:
c1, selecting the program language type used by the domestic operating system and the hardware platform, and inputting the program language and the related information into the program language storage module built in the multi-language debugger;
and C2, simultaneously inputting multiple program language types, classifying the commonly used main program language type and other program language types, giving a larger running memory to the commonly used main program language type, reasonably distributing the used memory and improving the use efficiency.
Preferably, the step D software content filling includes the following specific contents:
d1, embedding the relative module units of program language identification module, program language reading module, program language processing module, program language translation module, program language output module, etc. into the hardware platform of the integrated chip of the multi-language debugger;
and D2, electrically connecting the module units according to the running sequence of the system program and ensuring that the connection mode is correct.
Preferably, the trial execution of the program in step E includes the following specific contents:
e1: setting uniform language source codes, enabling various program language modules to correspond to the language source codes one by one, interactively controlling the running of a program by setting breakpoints, stepping and the like, and checking the real-time running condition of the program;
e2, when the code information needs to be checked in the runtime, the program language needs to be translated, and the translation can be performed by: source program language-language source code-translated form of machine language.
Preferably, the program debugging and modifying in step F includes the following details:
f1, using record-replay technique to realize operation debugging, inputting analog data to test operation, comparing output result with correct result, analyzing error program statement in recording process, recording occurrence time of debugging execution event, and finding out error part conveniently and rapidly;
f2, if the program is debugged, replacing the program language and its chip in the error part in time, and executing the steps D-F again until obtaining the development and debugging multilingual debugger which operates correctly, thus completing the design and execution steps of the multilingual debugger.
The invention has at least the following beneficial effects:
the multi-language debugger design method facing the domestic operating system and the hardware platform comprises the steps of firstly carrying out basic information investigation to facilitate the subsequent establishment of a software framework structure of the multi-language debugger based on the domestic operating system secondarily developed on the basis of Linux, being suitable for the domestic main domestic system, having better market prospect, firstly designing the hardware framework and then carrying out software content filling so that the program corresponds to an independent chip part, enabling a plurality of program languages to be recorded in a chip of the hardware platform through a program language recording step, supporting a plurality of program languages and facilitating the running of the software, enabling the running software to directly extract corresponding data from a built-in program language storage module, not occupying larger memory when the program runs, and also providing a running memory with larger types than the commonly used main program languages, the use of the memory is reasonably distributed, the use efficiency can be effectively improved, the uniform language source codes are set in the process of program trial calculation execution, translation among program languages is facilitated, time information is additionally arranged in the process of program debugging, and the error part is conveniently and quickly compared and found out, so that the program errors corresponding to error time can be corrected in time in the execution process.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A multi-language debugger design method oriented to a domestic operating system and a hardware platform comprises the following steps:
A. basic information investigation;
B. constructing a hardware framework;
C. inputting a program language;
D. filling software content;
E. trial calculation and execution of the program;
F. and (5) program debugging and modifying.
The scheme has the following working processes:
the multi-language debugger design method facing the domestic operating system and the hardware platform comprises the following specific steps:
the basic information investigation in the step A comprises the following specific contents:
a1: selecting a domestic operating system secondarily developed on the basis of Linux and a common hardware platform, investigating the types of program languages mainly adopted by the system and the hardware platform, acquiring related information, and simultaneously recording data;
the step B hardware framework construction comprises the following specific contents:
b1: establishing a software framework structure of the multi-language debugger on the basis of a domestic operating system, and setting an integrated chip of a hardware platform as an operating environment of the multi-language debugger;
and B2, designing an actual processing flow, designing hardware parameters, related configuration and a packaging paradigm of the integrated chip, and reserving connection interfaces with other components.
The step C program language input comprises the following specific contents:
c1, selecting the program language type used by the domestic operating system and the hardware platform, and inputting the program language and the related information into the program language storage module built in the multi-language debugger;
and C2, simultaneously inputting multiple program language types, classifying the commonly used main program language type and other program language types, giving a larger running memory to the commonly used main program language type, reasonably distributing the used memory and improving the use efficiency.
Step D, filling the software content, which comprises the following specific contents:
d1, embedding the relative module units of program language identification module, program language reading module, program language processing module, program language translation module, program language output module, etc. into the hardware platform of the integrated chip of the multi-language debugger;
and D2, electrically connecting the module units according to the running sequence of the system program and ensuring that the connection mode is correct.
The trial calculation execution of the program in the step E comprises the following specific contents:
e1: setting uniform language source codes, enabling various program language modules to correspond to the language source codes one by one, interactively controlling the running of a program by setting breakpoints, stepping and the like, and checking the real-time running condition of the program;
e2, when the code information needs to be checked in the runtime, the program language needs to be translated, and the translation can be performed by: source program language-language source code-translated form of machine language.
The step F of program debugging and modifying comprises the following specific contents:
f1, using record-replay technique to realize operation debugging, inputting analog data to test operation, comparing output result with correct result, analyzing error program statement in recording process, recording occurrence time of debugging execution event, and finding out error part conveniently and rapidly;
f2, if the program is debugged, replacing the program language and its chip in the error part in time, and executing the steps D-F again until obtaining the development and debugging multilingual debugger which operates correctly, thus completing the design and execution steps of the multilingual debugger.
According to the working process, the following steps are known:
the multi-language debugger design method facing the domestic operating system and the hardware platform comprises the following specific steps:
A. basic information research
A1: selecting a domestic operating system secondarily developed on the basis of Linux and a common hardware platform, investigating the types of program languages mainly adopted by the system and the hardware platform, acquiring related information, and simultaneously recording data;
B. hardware framework construction
B1: establishing a software framework structure of the multi-language debugger on the basis of a domestic operating system, and setting an integrated chip of a hardware platform as an operating environment of the multi-language debugger;
b2, designing an actual processing flow, designing hardware parameters, related configuration and packaging paradigm of the integrated chip, and reserving connection interfaces with other components;
C. programming language input
C1, selecting the program language type used by the domestic operating system and the hardware platform, and inputting the program language and the related information into the program language storage module built in the multi-language debugger;
c2, inputting multiple program language types at the same time, classifying the common main program language type and other program language types, giving larger operation memory to the common main program language type, reasonably distributing the used memory and improving the use efficiency;
D. software content filling
D1, embedding the relative module units of program language identification module, program language reading module, program language processing module, program language translation module, program language output module, etc. into the hardware platform of the integrated chip of the multi-language debugger;
d2, electrically connecting the module units according to the running sequence of the system program and ensuring the connection mode to be correct;
E. trial execution of a program
E1: setting uniform language source codes, enabling various program language modules to correspond to the language source codes one by one, interactively controlling the running of a program by setting breakpoints, stepping and the like, and checking the real-time running condition of the program;
e2, when the code information needs to be checked in the runtime, the program language needs to be translated, and the translation can be performed by: a source program language-language source code-machine language translation form;
F. program debugging modification
F1, using record-replay technique to realize operation debugging, inputting analog data to test operation, comparing output result with correct result, analyzing error program statement in recording process, recording occurrence time of debugging execution event, and finding out error part conveniently and rapidly;
f2, if the program is debugged, replacing the program language and its chip in the error part in time, and executing the steps D-F again until obtaining the development and debugging multilingual debugger which operates correctly, thus completing the design and execution steps of the multilingual debugger.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are merely illustrative of the principles of the invention, but that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种面向复杂装备进行协同研发管理系统