CN104536892B - A kind of software on-line debugging method and system - Google Patents

A kind of software on-line debugging method and system Download PDF

Info

Publication number
CN104536892B
CN104536892B CN201510003876.6A CN201510003876A CN104536892B CN 104536892 B CN104536892 B CN 104536892B CN 201510003876 A CN201510003876 A CN 201510003876A CN 104536892 B CN104536892 B CN 104536892B
Authority
CN
China
Prior art keywords
tracked
software
instruction
debugging
little
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510003876.6A
Other languages
Chinese (zh)
Other versions
CN104536892A (en
Inventor
何保安
余海群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201510003876.6A priority Critical patent/CN104536892B/en
Publication of CN104536892A publication Critical patent/CN104536892A/en
Application granted granted Critical
Publication of CN104536892B publication Critical patent/CN104536892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a kind of software on-line debugging method and system, wherein, methods described includes:Determine being tracked a little in software;When going to described be tracked, be tracked described in preservation at software current operating environment;The on-line debugging instruction stored is called, debugging task is performed, exports on-line debugging information;Recover the software current operating environment, the software down-stream is continued executing with described be tracked.Software on-line debugging method and system provided by the invention, debugging instruction is called in the form of routine call, the modification and deletion of debugging instruction is facilitated, avoids and debugging instruction is write into software program directly in the form of hard coded;Simultaneously, it is not required that restart software program;Realize and debugging instruction is arbitrarily changed in debugging process.

Description

A kind of software on-line debugging method and system
Technical field
The present invention relates to program debugging field, more particularly to a kind of software on-line debugging method and system.
Background technology
At present, during the use after software development and software development, inevitably various softwares are asked Topic.The existing method for positioning software problem includes:Running log, debug command, single step tracking.
In the above method, running log and debug command need to pass through the debugging instruction for producing daily record and Debugging message hard The mode of coding is previously written the relevant position of software program.The debugging instruction write by hard coded is not easy to change and deleted, Also because the debugging write by hard coded is not easy to delete, internal memory is occupied so that put to enter software error in any soft bits Row positioning becomes infeasible.In addition, when debugging instruction is write the corresponding of software program by technical staff by way of hard coded Behind position, it is also necessary to scheduling, compiling, connection and operation are re-started to the software program for writing debugging instruction, in software program After reruning, loss/change may occur for the running environment of original software error, make software error be not easy to reappear.
In the above method, it after single step tracking is often has performed a sentence, will stop, show running situation, this Kind of method requires that technical staff at the scene to analyze the operation result of every sentence, has found mistake in time always, and And this method is more suitable for the debugging of the software program of single task.And often have simultaneously in the real-time software program of the network equipment Tens tasks are interrelated between operation and task, and single step tracking has been not suitable with.
The content of the invention
It is any in debugging process to solve how to realize the invention provides a kind of software on-line debugging method and system The problem of changing debugging instruction.
In order to solve the above technical problems, the invention provides a kind of software on-line debugging method, methods described includes:
Determine being tracked a little in software;
When going to described be tracked, be tracked described in preservation at software current operating environment;
The on-line debugging instruction stored is called, debugging task is performed, exports on-line debugging information;
Recover the software current operating environment, the software down-stream is continued executing with described be tracked.
Alternatively, it is described to determine that being tracked in software a little specifically includes:
The setting that user's input is received by order line instructs, described to set instruction to include being tracked a little in the software Address;
It is assembler by the binary machine instruction dis-assembling being tracked at dot address;
Position a little is tracked according to determining the assembler.
Alternatively, it is described when going to described be tracked, be tracked described in preservation at software currently run ring Border specifically includes:
When going to described be tracked, according to a jump instruction for generation is being tracked, jumps to and be stored in institute State protection/recovery environmental directives in software;
The environmental protection instruction in the protection/recovery environmental directives is performed, a software at place is tracked described in preservation ought Preceding running environment.
Alternatively, it is described to call the on-line debugging instruction stored, debugging task is performed, output on-line debugging information is specific Including:
Perform the protection/recovery environmental directives;
When going to the jump-point in the protection/recovery environmental directives, by the jump-point, jump to it is described Line debugging instruction;
The on-line debugging instruction is performed, exports on-line debugging information.
Alternatively, it is described to recover the software current operating environment, continue executing with the software at described be tracked Down-stream specifically includes:
After on-line debugging information is exported, the jump-point is jumped back to from on-line debugging instruction;
Perform the recovery environmental directives in the protection/recovery environmental directives, and jump back to it is described be tracked a little, from described The software down-stream is continued executing with being tracked.
Alternatively, methods described also includes:
During debugging task is performed, by order line, the dotted state that is tracked for receiving user's input checks instruction;
It is described to be chased after according to the status information checked instruction, be tracked a little into software described in the user feedback The status information of track point includes one or more of:
Be tracked a little perform the time, the state of each registers of current CPU, current task stack information.
Alternatively, it is described to determine that being tracked in software a little also includes afterwards:
By order line, receive user's input is tracked point deletion instruction, and the point deletion that is tracked is instructed including treating The position being tracked a little deleted;
The position recovering being tracked described in will be to be deleted a little refers to for the binary machine before being tracked a little described in setting Order;
When go to position a little is tracked described in original when, perform binary machine instruction.
In order to solve the above technical problems, present invention also offers a kind of software on-line debugging system, the system includes:
A determining module is tracked, for determining being tracked a little in software;
Program execution module, it is current for the software at when going to described be tracked, being tracked described in preservation Running environment;And after debugging terminates, recover the software current operating environment, continue executing with institute at described be tracked State software down-stream;
Debugging module, for after software current operating environment is preserved, calling the on-line debugging instruction stored, perform tune Trial is engaged in, and exports on-line debugging information.
Alternatively, it is described to be tracked a determining module, for determining being tracked a little in software, specifically include:
The setting that user's input is received by order line instructs, described to set instruction to include being tracked a little in the software Address;
It is assembler by the binary machine instruction dis-assembling for being tracked dot address;
Position a little is tracked according to determining the assembler.
Alternatively, described program execution module, at when going to described be tracked, being tracked described in preservation Software current operating environment, specifically include:
When going to described be tracked, according to a jump instruction for generation is being tracked, jumps to and be stored in institute State protection/recovery environmental directives in software;
The environmental protection instruction in the protection/recovery environmental directives is performed, a software at place is tracked described in preservation ought Preceding running environment.
Alternatively, the debugging module, for calling the on-line debugging stored instruction, debugging task is performed, is exported Line Debugging message, is specifically included:
Perform the protection/recovery environmental directives;
When going to the jump-point in the protection/recovery environmental directives, by the jump-point, jump to it is described Line debugging instruction;
The on-line debugging instruction is performed, exports on-line debugging information.
Alternatively, described program execution module, for recovering the software current operating environment, at described be tracked The software down-stream is continued executing with, is specifically included:
After on-line debugging information is exported, the jump-point is jumped back to from on-line debugging instruction;
Perform the recovery environmental directives in the protection/recovery environmental directives, and jump back to it is described be tracked a little, from described The software down-stream is continued executing with being tracked.
Alternatively, the system also includes:
State checks module, in debugging task implementation procedure, by order line, receiving being tracked for user's input Dotted state checks instruction;
It is described to be chased after according to the status information checked instruction, be tracked a little into software described in the user feedback The status information of track point includes one or more of:
Be tracked a little perform the time, the state of each registers of current CPU, current task stack information.
Alternatively, the system also includes:
Point deletion module is tracked, for by order line, receive user's input to be tracked point deletion instruction, the quilt Tracking point deletion instruction includes the position being tracked a little to be deleted;
The position recovering being tracked described in will be to be deleted a little refers to for the binary machine before being tracked a little described in setting Order;
When go to position a little is tracked described in original when, perform binary machine instruction.
By applying a kind of software on-line debugging method and system provided by the invention, when software program is run, dynamic Setting is tracked a little, by being tracked a little for setting, preserves the software current operating environment at being tracked;Call what is stored On-line debugging instructs, and performs debugging task, exports on-line debugging information;And recover software current operating environment, from being tracked a little Place continues executing with software down-stream.Debugging instruction is called in the form of routine call, facilitates the modification of debugging instruction with deleting Remove, avoid and debugging instruction is write into software program directly in the form of hard coded, realize that any change is adjusted in debugging process Examination instruction;Simultaneously, it is not required that restart software program;In addition, above-mentioned technical proposal is calling debugging instruction, debugging routine is performed Software current operating environment is preserved before, and is terminated in debugging, is first recovered the software current operating environment preserved, is returned again to from quilt Tracking point, continue executing with software down-stream at being tracked so that software down-stream can continue in original operation Performed under environment, avoid the influence to original software program.
Brief description of the drawings
Fig. 1 is software on-line debugging method flow diagram provided in an embodiment of the present invention;
Fig. 2 is software debugging flow provided in an embodiment of the present invention and the software in currently running daily record and debug command Debug flow comparison diagram;
Fig. 3 is software on-line debugging system comprising modules figure provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application Feature can mutually be combined.
During use after software development and software development, inevitably various software issues.Work as skill Art personnel want before running software, even in software running process and in the case of not terminating existing running software process, right Software is debugged, you can records software on-line debugging method using following embodiments.
The software on-line debugging method that following embodiments are recorded calls online debugging instruction in the form of routine call, is not required to Restart software program;Software is preserved before on-line debugging program is performed and is being tracked current operating environment a little so that is adjusted Examination returns after terminating when being tracked, and program can continue executing with original running environment.
Describe software on-line debugging method provided in an embodiment of the present invention in detail by taking Fig. 1 as an example below, Fig. 1 is real for the present invention The software on-line debugging method flow diagram of example offer is provided.Subject of implementation can be communication equipment, terminal, clothes in embodiments of the present invention The equipment such as business device, the terminal are specially PC (Personal Computer, abbreviation:PC), desktop computer etc..Such as Shown in Fig. 1, the embodiment specifically includes following steps:
Step S101, being tracked a little in software is determined;
Specifically, step S101 includes:The setting that user's input is received by order line instructs, and the setting instruction includes Address a little is tracked in the software;It is assembler by the binary machine instruction dis-assembling for being tracked dot address; Position a little is tracked according to determining the assembler.
For example, in vxworks operating systems, commissioning staff can enable shell instructions by order line, pass through " lkup " order obtains address corresponding to C code function name;By ordering the address for providing function to " l " come the dis-assembling function Binary machine instruction.Commissioning staff can be as needed, is used as arbitrfary point in function by order line and is tracked a little.
Further, also function entrance point can be arranged to be tracked a little, now, can be directly by function by order line Name is as the address being tracked a little.
Being tracked a little in software program can be arbitrarily determined by step S101.
Step S102, when going to described be tracked, be tracked described in preservation at software current operating environment;
The software current operating environment includes:The content of CPU registers;
It is understood that the content by preserving CPU registers, can be after on-line debugging instruction have been performed so that former The execution for having software program is able to unaffected and continued executing with.
Specifically, step S102 includes:
When going to described be tracked, according to a jump instruction for generation is being tracked, jumps to and be stored in institute State protection/recovery environmental directives in software;The environmental protection instruction in the protection/recovery environmental directives is performed, preserves institute State the software current operating environment at being tracked.
Step S103, the on-line debugging instruction stored is called, debugging task is performed, exports on-line debugging information;
Specifically, step S103 includes:
Perform the protection/recovery environmental directives;When going to the jump-point in the protection/recovery environmental directives, By the jump-point, the on-line debugging instruction is jumped to;
The on-line debugging instruction is performed, exports on-line debugging information.
Further, in this step, the on-line debugging information of output includes:It is tracked execution time a little, current CPU The state of each register, current task stack information.Above- mentioned information, which includes, to be performed in on-line debugging instruction on current debugging All information that task performs at being tracked, according to above- mentioned information, to cause commissioning staff to judge be tracked holding a little Row positions with the presence or absence of exception, and when occurring abnormal to abnormal.
It should be noted that in embodiments of the present invention, the on-line debugging information may include multi-layer on-line debugging, example Such as, including the first level on-line debugging information, the second level on-line debugging information etc..
It is understood that in embodiments of the present invention, when performing the first level on-line debugging information, first can be passed through Jump-point in level on-line debugging information, jump in the second level on-line debugging information and continue to be modulated, and then realize Multi-layer on-line debugging.
Step S104, the software current operating environment is recovered, after continuing executing with the software at described be tracked Onward sequence.
Specifically, step S104 includes:
After on-line debugging information is exported, the jump-point is jumped back to from on-line debugging instruction;Perform it is described protection/ Recover the recovery environmental directives in environmental directives, and jump back to it is described be tracked a little, continue executing with institute at described be tracked State software down-stream.
Further, when being related to multi-layer on-line debugging, after current level on-line debugging terminates, redirect and be back to preceding layer At the jump-point of level, the program after previous level jump-point is performed, redirects be back in original software program successively.
It should be noted that in embodiments of the present invention, also equal numbers can be stored according to the number being tracked a little of setting The protection of amount/recovery environmental directives, during to go at each be tracked, easily and flexibly redirected.
Further, in embodiments of the present invention, also automatic storage be tracked position a little and be tracked at binary system A machine instruction, to be redirected or adjusted back to be chased after.For example, by directly writing internal memory mode, a ground will be tracked Internal memory at location is revised as at the initial address of " protection/recovery environmental directives " program segment, and then is realized and redirected;And it will be tracked Binary machine instruction is added at the end of " protection/recovery environmental directives " program segment at point, and then realizes readjustment.
Pass through the above-mentioned steps S101- step S104 of the application embodiment of the present invention, when software program is run, dynamic setting It is tracked a little, by being tracked a little for setting, preserves the software current operating environment at being tracked;Calling has stored online Debugging instruction, debugging task is performed, export on-line debugging information;And recover software current operating environment, at being tracked after It is continuous to perform software down-stream.Avoid and write debugging instruction in software program directly in the form of hard coded, but with journey The form that sequence is called calls debugging instruction, facilitates the modification and deletion of debugging instruction, realizes and arbitrarily changed in debugging process Debugging instruction;Simultaneously, it is not required that restart software program.
Alternatively, after being tracked a little during above-described embodiment determines software by step S101, in addition to receive User's input is tracked point deletion instruction, deletes the step of being tracked according to the instruction, can make to debug by the step Journey is more convenient and flexible.Comprise the following steps that:
By order line, receive user's input is tracked point deletion instruction, and the point deletion that is tracked is instructed including treating The position being tracked a little deleted;
The position recovering being tracked described in will be to be deleted a little refers to for the binary machine before being tracked a little described in setting Order;
When go to position a little is tracked described in original when, perform binary machine instruction, such program just shows To set the behavior before being tracked a little.
Specifically, by order line, receive user's input is tracked point deletion instruction, will be tracked position recovering a little To set the binary machine instruction before being tracked a little;And then when software goes to original and is tracked the position at a place, by It has not been tracked a little in this position, then has performed the binary machine instruction set before being tracked a little, make program recovery to set Put state before being tracked a little.As can be seen here, the embodiment of the present invention not only can online set and be tracked relative to prior art Point, it can also online delete and be tracked a little, make debugging process more flexible.
Alternatively, in the above method, during above-mentioned steps S103 performs debugging task, in addition to user's input is received The dotted state that is tracked check instruction, according to the instruction to user feedback be tracked status information a little the step of, pass through the step Suddenly commissioning staff can be facilitated to judge whether to be extremely tracked the action of execution a little, and reason is analyzed when occurring abnormal.Specifically Step is as follows:
During debugging task is performed, by order line, the dotted state that is tracked for receiving user's input checks instruction;
It is described to be chased after according to the status information checked instruction, be tracked a little into software described in the user feedback The status information of track point includes one or more of:
Be tracked a little perform the time, the state of each registers of current CPU, current task stack information.
Specifically, during debugging task is performed, when the dotted state that is tracked for receiving user's input checks instruction When, according to instruction is checked, status information a little is tracked into user feedback software.
Further, the status information being tracked a little also includes:The setting being tracked a little all set in software program Information, for example, being tracked set location a little, performing number etc..
The above-mentioned status information being tracked a little can facilitate commissioning staff to judge whether to be extremely tracked the action of execution a little, And reason is analyzed when occurring abnormal, meanwhile, commissioning staff can also be according to the status information being tracked a little to being tracked a progress Reset and put.
Alternatively, in the above method, after step S103 exports on-line debugging information, the on-line debugging information can also be protected Internal memory is deposited into, facilitates commissioning staff to consult, commissioning staff is avoided and waits for always at the scene.
By the software on-line debugging method of the offer of the application embodiment of the present invention, when software program is run, dynamically set Put and be tracked a little, by being tracked a little for setting, preserve the software current operating environment at being tracked;Call stored Line debugging instruction, debugging task is performed, export on-line debugging information;And recover software current operating environment, at being tracked Continue executing with software down-stream.Due in embodiments of the present invention, by setting be tracked call stored it is online A debugging instruction, and carry out at being tracked preservation/recovery of software current operating environment, avoid by debugging instruction directly with The form write-in software program of hard coded, but debugging instruction is called in the form of routine call, facilitate repairing for debugging instruction Change and delete, realize and debugging instruction is arbitrarily changed in debugging process;Simultaneously, it is not required that restart software program;It is in addition, above-mentioned Technical scheme is calling debugging instruction, preserves software current operating environment before performing debugging routine so that debugging is returned after terminating Return when being tracked, program can continue to perform under original running environment, avoid the influence to original software program.
Fig. 2 is that the software debugging flow in the embodiment of the present invention is adjusted with the software in currently running daily record and debug command Flow comparison diagram is tried, wherein, solid line represents that the software of currently running daily record and the debugged function instruction in debug command is adjusted Flow is tried, dotted line represents the software on-line debugging flow in the embodiment of the present invention.
In the software debugging flow of debugged function instruction, before software is run in internal memory, it is determined that be tracked a little, On-line debugging instruction is write being tracked a little for software program directly in the form of hard coded, is tracked when software program is gone to After point, an execution on-line debugging instruction is being tracked;After on-line debugging task to be done, the down-stream of software is continued executing with. If software has been run, by encoding, compiling, link step on-line debugging is instructed into being tracked a little in write-in software, Modified software is loaded into internal memory by software restarting program again and run.
Software on-line debugging flow in the embodiment of the present invention, refers to according to the binary machine for being tracked dot address dis-assembling Order determines being tracked a little in software, and this step is directly completed in internal memory;When go to be tracked when, jump to and deposited Protection/recovery the environmental directives of storage in software, the environmental protection instruction in protection/recovery environmental directives is performed, preserves and is chased after Software current operating environment at track point;Continue executing with protection/recovery environmental directives;When going to protection/recovery environmental directives In jump-point when, by jump-point, jump to on-line debugging instruction;On-line debugging instruction is performed, exports on-line debugging information. Whole process passes through routine call and completes debugging, it is not necessary to which by encoding, compiling, link step writes debugging instruction in software Be tracked a little, because software is run in internal memory always, therefore also without again will be modified by software restarting program Software be loaded into internal memory and run.
Software debugging flow provided in an embodiment of the present invention, after on-line debugging information is exported, instruct and jump from on-line debugging Go back to jump-point;The recovery environmental directives in protection/recovery environmental directives are performed, and jumps back to and is tracked a little, from being tracked a little Place continues executing with software down-stream.Because program can continue to perform under original running environment, debugging is avoided to original The influence of software program.
Describe software on-line debugging system provided in an embodiment of the present invention in detail by taking Fig. 3 as an example below, Fig. 3 is real for the present invention The software on-line debugging system comprising modules figure of example offer is provided.The software on-line debugging system can answer in embodiments of the present invention With or be carried in the equipment such as communication equipment, terminal, server, the terminal is specially PC (Personal Computer, referred to as:PC), desktop computer etc..As shown in Figure 3
The system includes:
A determining module 310 is tracked, for determining being tracked a little in software;
Program execution module 320, for when going to described be tracked, being tracked a software at place described in preservation ought Preceding running environment;And after debugging terminates, recover the software current operating environment, continued executing with described be tracked The software down-stream;
Debugging module 330, for after software current operating environment is preserved, calling the on-line debugging instruction stored, hold Row debugging task, export on-line debugging information.
It is described to be tracked a determining module 310, for determining being tracked a little in software, specifically include:
The setting that user's input is received by order line instructs, described to set instruction to include being tracked a little in the software Address;
It is assembler by the binary machine instruction dis-assembling for being tracked dot address;
Position a little is tracked according to determining the assembler.
Described program execution module 320, for soft at when going to described be tracked, being tracked described in preservation Part current operating environment, is specifically included:
When going to described be tracked, according to a jump instruction for generation is being tracked, jumps to and be stored in institute State protection/recovery environmental directives in software;
The environmental protection instruction in the protection/recovery environmental directives is performed, a software at place is tracked described in preservation ought Preceding running environment.
The debugging module 330, for calling the on-line debugging stored instruction, debugging task is performed, exports online adjust Information is tried, is specifically included:
Perform the protection/recovery environmental directives;
When going to the jump-point in the protection/recovery environmental directives, by the jump-point, jump to it is described Line debugging instruction;
The on-line debugging instruction is performed, exports on-line debugging information.
Described program execution module 320, for recovering the software current operating environment, continue at described be tracked The software down-stream is performed, is specifically included:
After on-line debugging information is exported, the jump-point is jumped back to from on-line debugging instruction;
Perform the recovery environmental directives in the protection/recovery environmental directives, and jump back to it is described be tracked a little, from described The software down-stream is continued executing with being tracked.
The system also includes:State checks module 340, in debugging task implementation procedure, by order line, connecing The dotted state that is tracked for receiving user's input checks instruction;
It is described to be chased after according to the status information checked instruction, be tracked a little into software described in the user feedback The status information of track point includes one or more of:
Be tracked a little perform the time, the state of each registers of current CPU, current task stack information.
The system also includes:Point deletion module 350 is tracked, for after being tracked in software determines, passing through Order line, receive user input be tracked point deletion instruction, it is described be tracked point deletion instruction include the quilt to be deleted The position of tracking point;
The position recovering being tracked described in will be to be deleted a little refers to for the binary machine before being tracked a little described in setting Order;
When go to position a little is tracked described in original when, perform binary machine instruction.
By the software on-line debugging system of the offer of the application embodiment of the present invention, when software program is run, dynamically set Put and be tracked a little, by being tracked a little for setting, preserve the software current operating environment at being tracked;Call stored Line debugging instruction, debugging task is performed, export on-line debugging information;And recover software current operating environment, at being tracked Continue executing with software down-stream.Due in embodiments of the present invention, by setting be tracked call stored it is online A debugging instruction, and carry out at being tracked preservation/recovery of software current operating environment, avoid by debugging instruction directly with The form write-in software program of hard coded, but debugging instruction is called in the form of routine call, facilitate repairing for debugging instruction Change and delete, realize and debugging instruction is arbitrarily changed in debugging process;Simultaneously, it is not required that restart software program;It is in addition, above-mentioned Technical scheme is calling debugging instruction, preserves software current operating environment before performing debugging routine so that debugging is returned after terminating Return when being tracked, program can continue to perform under original running environment, avoid the influence to original software program.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program Related hardware is completed, and described program can be stored in computer-readable recording medium, such as read-only storage, disk or CD Deng.Alternatively, all or part of step of above-described embodiment can also be realized using one or more integrated circuits, accordingly Ground, each module/unit in above-described embodiment can be realized in the form of hardware, can also use the shape of software function module Formula is realized.The present invention is not restricted to the combination of the hardware and software of any particular form.
It should be noted that the present invention can also have other various embodiments, without departing substantially from of the invention spiritual and its essence In the case of, those skilled in the art can make various corresponding changes and deformation according to the present invention, but these are corresponding Change and deform the protection domain that should all belong to appended claims of the invention.

Claims (12)

  1. A kind of 1. software on-line debugging method, it is characterised in that methods described includes:
    When software program is run, being tracked a little in software is determined, is specifically included:Setting for user's input is received by order line Instruction is put, it is described to set instruction to include being tracked address a little in software;By the binary machine being tracked at dot address Instruction dis-assembling is assembler;Position a little is tracked according to determining the assembler;
    When going to described be tracked, be tracked described in preservation at software current operating environment;
    The on-line debugging instruction stored is called, debugging task is performed, exports on-line debugging information;
    Recover the software current operating environment, the software down-stream is continued executing with described be tracked.
  2. 2. the method as described in claim 1, it is characterised in that it is described when going to described be tracked, preserve the quilt Software current operating environment at tracking point specifically includes:
    When going to described be tracked, according to a jump instruction for generation is being tracked, jump to be stored in it is described soft Protection/recovery environmental directives in part;
    Perform the environmental protection instruction in the protection/recovery environmental directives, be tracked described in preservation at software currently transport Row environment.
  3. 3. method as claimed in claim 2, it is characterised in that it is described to call the on-line debugging instruction stored, perform debugging Task, output on-line debugging information specifically include:
    Perform the protection/recovery environmental directives;
    When going to the jump-point in the protection/recovery environmental directives, by the jump-point, the online tune is jumped to Examination instruction;
    The on-line debugging instruction is performed, exports on-line debugging information.
  4. 4. method as claimed in claim 3, it is characterised in that it is described to recover the software current operating environment, from the quilt The software down-stream is continued executing with tracking point to specifically include:
    After on-line debugging information is exported, the jump-point is jumped back to from on-line debugging instruction;
    Perform the recovery environmental directives in the protection/recovery environmental directives, and jump back to it is described be tracked a little, chased after from described The software down-stream is continued executing with track point.
  5. 5. the method as described in claim 1, it is characterised in that methods described also includes:
    During debugging task is performed, by order line, the dotted state that is tracked for receiving user's input checks instruction;
    It is described to be tracked a little according to the status information checked instruction, be tracked a little into software described in the user feedback Status information include one or more of:
    Be tracked a little perform the time, the state of each registers of current CPU, current task stack information.
  6. 6. the method as described in claim 1, it is characterised in that described to determine that being tracked in software a little also includes afterwards:
    By order line, receive user's input is tracked point deletion instruction, it is described be tracked point deletion instruction include it is to be deleted The position being tracked a little;
    The position recovering being tracked described in will be to be deleted a little is the binary machine instruction before being tracked a little described in setting;
    When go to position a little is tracked described in original when, perform binary machine instruction.
  7. 7. a kind of software on-line debugging system, it is characterised in that the system includes:
    A determining module is tracked, for when software program is run, determining being tracked a little in software, specifically including:Soft When part program is run, the setting that user's input is received by order line instructs, described to set instruction to include being chased after in the software The address of track point;It is assembler by the binary machine instruction dis-assembling for being tracked dot address;According to the compilation journey Position a little is tracked described in sequence determination;
    Program execution module, currently run for the software at when going to described be tracked, being tracked described in preservation Environment;And after debugging terminates, recover the software current operating environment, continued executing with described be tracked described soft Part down-stream;
    Debugging module, for after software current operating environment is preserved, calling the on-line debugging instruction stored, perform debugging and appoint Business, export on-line debugging information.
  8. 8. system as claimed in claim 7, it is characterised in that described program execution module, for going to described chased after During track point, be tracked described in preservation at software current operating environment, specifically include:
    When going to described be tracked, according to a jump instruction for generation is being tracked, jump to be stored in it is described soft Protection/recovery environmental directives in part;
    Perform the environmental protection instruction in the protection/recovery environmental directives, be tracked described in preservation at software currently transport Row environment.
  9. 9. system as claimed in claim 8, it is characterised in that the debugging module, for calling the on-line debugging stored Instruction, debugging task is performed, export on-line debugging information, specifically include:
    Perform the protection/recovery environmental directives;
    When going to the jump-point in the protection/recovery environmental directives, by the jump-point, the online tune is jumped to Examination instruction;
    The on-line debugging instruction is performed, exports on-line debugging information.
  10. 10. system as claimed in claim 9, it is characterised in that described program execution module, it is current for recovering the software Running environment, the software down-stream is continued executing with described be tracked, is specifically included:
    After on-line debugging information is exported, the jump-point is jumped back to from on-line debugging instruction;
    Perform the recovery environmental directives in the protection/recovery environmental directives, and jump back to it is described be tracked a little, chased after from described The software down-stream is continued executing with track point.
  11. 11. system as claimed in claim 7, it is characterised in that the system also includes:
    State checks module, in debugging task implementation procedure, by order line, receive user's input to be tracked point-like State checks instruction;
    It is described to be tracked a little according to the status information checked instruction, be tracked a little into software described in the user feedback Status information include one or more of:
    Be tracked a little perform the time, the state of each registers of current CPU, current task stack information.
  12. 12. system as claimed in claim 7, it is characterised in that the system also includes:
    Point deletion module is tracked, for by order line, the point deletion that is tracked for receiving user's input to instruct, described to be tracked Point deletion instruction includes the position being tracked a little to be deleted;
    The position recovering being tracked described in will be to be deleted a little is the binary machine instruction before being tracked a little described in setting;
    When go to position a little is tracked described in original when, perform binary machine instruction.
CN201510003876.6A 2015-01-05 2015-01-05 A kind of software on-line debugging method and system Active CN104536892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510003876.6A CN104536892B (en) 2015-01-05 2015-01-05 A kind of software on-line debugging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510003876.6A CN104536892B (en) 2015-01-05 2015-01-05 A kind of software on-line debugging method and system

Publications (2)

Publication Number Publication Date
CN104536892A CN104536892A (en) 2015-04-22
CN104536892B true CN104536892B (en) 2018-03-27

Family

ID=52852422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510003876.6A Active CN104536892B (en) 2015-01-05 2015-01-05 A kind of software on-line debugging method and system

Country Status (1)

Country Link
CN (1) CN104536892B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204990B (en) * 2015-08-21 2017-11-28 上海斐讯数据通信技术有限公司 A kind of abnormal adjustment method and system
CN105824751A (en) * 2016-03-16 2016-08-03 上海斐讯数据通信技术有限公司 System and method for automatically debugging software of network device
CN112433945A (en) * 2020-11-26 2021-03-02 百富计算机技术(深圳)有限公司 Method and device for dynamically tracking program and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915509B1 (en) * 2000-06-28 2005-07-05 Microsoft Corporation Method and system for debugging a program
CN1752946A (en) * 2005-10-31 2006-03-29 大唐微电子技术有限公司 Debugging method of embedded system and its system
CN101295279A (en) * 2007-04-29 2008-10-29 国际商业机器公司 Method and system for debugging program in multi-threading surroundings
CN101482848A (en) * 2009-02-03 2009-07-15 中兴通讯股份有限公司 Dynamic debugging method and system in embedded software running state

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446918B (en) * 2008-12-10 2011-12-28 中兴通讯股份有限公司 Method for realizing debugging of single function by user state debugger and system thereof
US8473921B2 (en) * 2009-12-15 2013-06-25 Microsoft Corporation Debugging mechanisms in a cache-based memory isolation system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915509B1 (en) * 2000-06-28 2005-07-05 Microsoft Corporation Method and system for debugging a program
CN1752946A (en) * 2005-10-31 2006-03-29 大唐微电子技术有限公司 Debugging method of embedded system and its system
CN101295279A (en) * 2007-04-29 2008-10-29 国际商业机器公司 Method and system for debugging program in multi-threading surroundings
CN101482848A (en) * 2009-02-03 2009-07-15 中兴通讯股份有限公司 Dynamic debugging method and system in embedded software running state

Also Published As

Publication number Publication date
CN104536892A (en) 2015-04-22

Similar Documents

Publication Publication Date Title
CN110603527B (en) Method, system and apparatus for conditional debugging of server-side production code
US8443340B2 (en) Execution capture and replay based debugging
US8145944B2 (en) Business process error handling through process instance backup and recovery
US20050223360A1 (en) System and method for providing a generic user interface testing framework
CN105808266A (en) Code operation method and device
CN112486786A (en) Calling link tracking method and device
CN101763301B (en) System and method for testing a boot image
CN102306122A (en) Automated testing method and equipment
CN104346274A (en) Program debugger and program debugging method
CN104536892B (en) A kind of software on-line debugging method and system
CN110597552B (en) Configuration method, device, equipment and storage medium of project continuous integrated pipeline
CN104063319A (en) Debugging method of embedded system and device thereof
US6598181B1 (en) Method and system for debugging multiple function calls
JP2008033849A (en) Fault analysis system
US20050228644A1 (en) Generic user interface testing framework with rules-based wizard
US11249880B1 (en) Debugging and simulating application runtime execution
CN111880803B (en) Software construction method and device applied to multiple platforms
CN109857642A (en) A kind of the block type adjustment method and debugging tool of UI automatized script
US8966455B2 (en) Flow analysis in program execution
US9852048B2 (en) Simulating process variable changes during process runtime
CN107679088A (en) The file-type storage method and device of user behavior data
WO2017076244A1 (en) Method, device and related system for dynamically repairing application
CN109840133A (en) The operation method and device of application function
CN111736893A (en) Software package version verification method and related device
CN105630526A (en) Load control method and device for script

Legal Events

Date Code Title Description
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant