Code dynamic switching method and system for debugging process

A dynamic and code-based technology, applied in memory systems, program control design, software engineering design, etc., can solve problems such as slow program running speed and memory resource consumption, and achieve the effects of saving memory usage, high performance, and maintaining performance

CN104063258AActive Publication Date: 2014-09-24IBM CORP
7 Cites 8 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2014-09-24

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to a code dynamic switching method and a system for a debugging process. The method comprises the steps as follows: firstly, the binary code of a first version and a second version is created for each compilation unit in a source code program to be debugged, wherein the first version is an optimized version, while the second version is a non-optimized easily-debugging version; secondly, the binary code of the first version of each compilation unit is loaded into a memory; thirdly, the debugging operation of a user is monitored; fourthly, for responding to the determination that one of the compilation unit in the source code program is to be debugged, the binary code of the second version of the compilation unit is dynamically reloaded to the storage address with the same binary code as that of the first version of the compilation unit in the memory; fifthly, for responding to the determination that the debugging of one of the compilation unit in the source code program is cancelled, the binary code of the first version of the compilation unit is dynamically reloaded to the storage address with the same binary code as that of the second version of the compilation unit in the memory.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to program debugging, in particular, the present invention relates to a method and system for dynamically switching codes in the debugging process. Background technique

[0002] When programming, most applications are debugged at the source code level. The source code is generally written in a high-level language, and the high-level language is mainly compared to the assembly language. It is a programming that is closer to natural language and mathematical formulas. It is basically separated from the hardware system of the machine and written in a way that is easier for people to understand. program. Therefore, the programmer's debugging operations such as stepping, setting breakpoints, etc. are based on the high-level language source code view. However, in fact, what the debugger receives, runs, and operates is the binary code (binary) (compiled version of the source code) of the program to generate the running result. ...

Examples

Embodiment Construction

[0028] Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0029]Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can also be complete software (including firmware, resident software, microcode, etc.), and it can also be a combination of hardware and software. Called a "circuit", "module" or "sys...