CN110347601A - The interruption processing method and device of script process - Google Patents

The interruption processing method and device of script process Download PDF

Info

Publication number
CN110347601A
CN110347601A CN201910625996.8A CN201910625996A CN110347601A CN 110347601 A CN110347601 A CN 110347601A CN 201910625996 A CN201910625996 A CN 201910625996A CN 110347601 A CN110347601 A CN 110347601A
Authority
CN
China
Prior art keywords
script process
interrupt status
script
code
shared drive
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.)
Granted
Application number
CN201910625996.8A
Other languages
Chinese (zh)
Other versions
CN110347601B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910625996.8A priority Critical patent/CN110347601B/en
Publication of CN110347601A publication Critical patent/CN110347601A/en
Application granted granted Critical
Publication of CN110347601B publication Critical patent/CN110347601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment provides a kind of interruption processing method of script process and devices.The interruption processing method of the script process includes: in the script process of shared drive and the code calling process of non-script process, if monitoring, the non-script process enters interrupt status, and interrupt status information is written in the shared drive;If monitoring, there are the interrupt status information in the shared drive, control the script process and enter interrupt status;After controlling the script process and entering interrupt status, the code at the interruption position of the script process is shown.The technical solution of the embodiment of the present invention may be implemented quickly and accurately to position scripted code performed by script process, so that commissioning staff can in time modify debugging to scripted code performed by script process, improves and modify the efficiency of debugging to scripted code performed by script process.

Description

The interruption processing method and device of script process
Technical field
The present invention relates to field of computer technology, in particular to the interruption processing method and dress of a kind of script process It sets.
Background technique
There are when code calling between the script process and non-script process in computer equipment, it is difficult to know non-script There are call relations for which section scripted code of the non-scripted code of which section of process and script process, so that in needs pair Scripted code performed by script process is modified when debugging, and be cannot achieve and is quickly and accurately positioned performed by script process Scripted code so that commissioning staff can not in time modify debugging to scripted code performed by script process, into And a large amount of debug time of developer can be wasted.
Summary of the invention
The embodiment provides a kind of interruption processing method of script process and device may be implemented it is quick and quasi- Scripted code performed by script process really is positioned, so that commissioning staff can be in time to script performed by script process Code is modified debugging.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention Practice and acquistion.
According to an aspect of an embodiment of the present invention, a kind of interruption processing method of script process is provided, comprising: altogether It enjoys in the script process of memory and the code calling process of non-script process, if monitoring, the non-script process enters interruption shape Interrupt status information is then written in state in the shared drive;If monitoring, there are the interrupt status in the shared drive Information then controls the script process and enters interrupt status;After controlling the script process and entering interrupt status, described in displaying Code at the interruption position of script process.
According to an aspect of an embodiment of the present invention, a kind of interrupt processing device of script process is provided, comprising: write-in Unit, in shared drive script process and non-script process code calling process in, if monitoring the non-script Process enters interrupt status, then interrupt status information is written in the shared drive;First interrupt location, if for monitoring There are the interrupt status information in the shared drive, then control the script process and enter interrupt status;Display unit is used In after controlling the script process and entering interrupt status, the code at the interruption position of the script process is shown.
In some embodiments of the invention, aforementioned schemes, said write unit, if for monitoring the non-foot are based on This process enters interrupt status, it is determined whether monitors that the request of the interrupt status information is written in the shared drive; If monitoring that the request of the interrupt status information is written in the shared drive, shape is interrupted in write-in in the shared drive State information.
In some embodiments of the invention, aforementioned schemes are based on, are added with first in the code of the non-script process Breakpoint information, the interrupt processing device of the script process further include: the second interrupt location, if for monitoring the non-script The code of process goes to the position where first breakpoint information, then controls the non-script process and enter interrupt status.
In some embodiments of the invention, aforementioned schemes, the interrupt processing device of the script process are based on further include: Third interrupt location, if the request for monitoring to enter interrupt status for controlling the non-script process, described in control Non- script process enters the interrupt status.
In some embodiments of the invention, be based on aforementioned schemes, first interrupt location, for the script into The second breakpoint information is added in the code of journey;If the second breakpoint information being resolved in the code of the script process, controls The script process enters interrupt status.
In some embodiments of the invention, aforementioned schemes, the interrupt processing device of the script process are based on further include: First deletes unit, in the code for deleting the script process after controlling the script process and entering interrupt status Second breakpoint information.
In some embodiments of the invention, aforementioned schemes, the interrupt processing device of the script process are based on further include: Second deletes unit, for showing the interruption position of the script process after controlling the script process and entering interrupt status After the code at place, the interrupt status information in the shared drive is deleted.
In some embodiments of the invention, aforementioned schemes, the interrupt processing device of the script process are based on further include: Running unit, for after controlling the script process and entering interrupt status, if monitoring for releasing the script process Interrupt status request, then control the script process and enter operating status.
In some embodiments of the invention, aforementioned schemes, the interrupt processing device of the script process are based on further include: Execution unit, if the identification information for monitoring to have for identifying the interrupt status information in the shared drive, Then determination monitors that there are the interrupt status information in the shared drive.
According to an aspect of an embodiment of the present invention, a kind of electronic equipment is provided, comprising: one or more processors; Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors When row, so that one or more of processors realize the interruption processing method such as above-mentioned script process as described in the examples.
According to an aspect of an embodiment of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with Program realizes the interrupt processing side such as above-mentioned script process as described in the examples when the computer program is executed by processor Method.
In the technical solution provided by some embodiments of the present invention, shared drive script process and non-script into In the code calling process of journey, when need when the scripted code run to script process is modified and is debugged, pass through control Non- script process enters interrupt status, if monitoring, non-script process enters interrupt status, is written and interrupts in shared drive Status information, in order to which script process timely learning enters to non-script process the information of interrupt status, if monitoring to share There are interrupt status information in memory, then control script process and enter interrupt status, enter interrupt status in control script process Afterwards, it shows the code at the interruption position of script process, is quickly and accurately positioned performed by script process so as to realize Scripted code improve pair so that user can in time modify debugging to scripted code performed by script process Scripted code performed by script process is modified the efficiency of debugging.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 is shown can be using the schematic diagram of the exemplary system architecture of the technical solution of the embodiment of the present invention;
Fig. 2 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
Fig. 3 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
Fig. 4 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
If Fig. 5 is diagrammatically illustrated and according to an embodiment of the invention is monitored that the non-script process enters interruption The flow chart of interrupt status information is then written in state in the shared drive;
Fig. 6 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
Fig. 7 diagrammatically illustrates the control script process according to an embodiment of the invention and enters interrupt status Flow chart;
Fig. 8 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
Fig. 9 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
Figure 10 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure;
Figure 11 diagrammatically illustrates the block diagram of the interrupt processing device of script process according to an embodiment of the invention;
Figure 12 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However, It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
Fig. 1 is shown can be using the schematic diagram of the exemplary system architecture of the technical solution of the embodiment of the present invention.
As shown in Figure 1, system architecture may include one of terminal device 101,102,103 or a variety of, 104 He of network Server 105.Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link. Network 104 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..Terminal device 101,102,103 the various electronic equipments with display screen, including but not limited to desktop computer, portable computing be can be Machine, smart phone and tablet computer etc..It should be understood that the number of terminal device, network and server in Fig. 1 is only to show Meaning property.According to needs are realized, any number of terminal device, network and server can have.For example server 105 can be with It is the server cluster etc. of multiple server compositions.
In terminal device 101,102,103 or server 105, in the script process of shared drive and the generation of non-script process In code calling process, need when the scripted code run to script process is modified and debugged, by monitor non-script into Whether journey enters interrupt status, if monitoring, non-script process enters interrupt status, and interrupt status is written in shared drive Information, in order to which script process timely learning enters to non-script process the information of interrupt status, if monitoring shared drive In there are interrupt status information, then control script process and enter interrupt status, control script process enter interrupt status after, exhibition Show the code at the interruption position of script process, and then positions and obtain generation performed before script process enters interrupt status Code.
As it can be seen that the technical solution of the embodiment of the present invention may be implemented quickly and accurately to position script process and enter interruption shape Performed code before state, so that user can in time modify debugging to scripted code performed by script process, It improves and modifies the efficiency of debugging to scripted code performed by script process.
The interruption processing method of script process provided by the embodiment of the present invention is generally by terminal device 101,102,103 It executes.But it will be readily appreciated by those skilled in the art that the interruption processing method of script process provided by the embodiment of the present invention It can also be executed in the present exemplary embodiment by server 105 and not do particular determination to this.
The realization details of the technical solution of the embodiment of the present invention is described in detail below:
Fig. 2 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure, the interruption processing method of the script process can be by terminal device (such as terminal device 101,102 or 103) as shown in Figure 1 Or server 105 executes, the present embodiment is illustrated for executing by terminal device.Refering to what is shown in Fig. 2, the script process Interruption processing method include at least step S210 to step S230, be described in detail as follows:
In step S210, in the script process of shared drive and the code calling process of non-script process, if monitoring Enter interrupt status to the non-script process, then interrupt status information is written in the shared drive.
In one embodiment of the invention, shared drive refers to that one kind between the different processes in terminal device is logical Letter mode, the memory are generally referred to as the physical memory in terminal device.At least two processes in terminal device are shared interior When depositing, a certain memory in terminal device can be simultaneously mapped to there are the respective process of the two of shared drive relationship process Location space, two processes can be updated the data in shared drive, and working as, the data in shared drive are any one When a process updates, another process also can the data in timely learning shared drive the case where being updated.
In one embodiment of the invention, script is a kind of autoexec by scripting language, specially one The collection of programs that kind of plain text saves, scripting language in the present embodiment can for Lua, Python, vbscrip or Javascript etc.;A series of computer script journey that controlling electronic devicess carry out arithmetic operation movement is generally comprised in script Sequence, script process are the process of the program in terminal device perform script file, it should be noted that script process is executing foot When program in this, need to explain the program in script by interpreter.Non- script process is then to hold in terminal device The process of the non-shell script of row, the program that non-shell script is write by other common programming languages except scripting language, Such as the program that the programming languages such as C, C++, VB or Java are write, wherein non-script process is when executing non-shell script, no It needs to explain non-shell script by interpreter.Can be called mutually between non-script process and script process it is corresponding into Code in program performed by journey, i.e., non-script process can call the code in program performed by script process, script into Journey can also call the code in program performed by non-script process, it should be noted that non-script process calls script process Code and script process in performed program call the code in program performed by non-script process that can carry out simultaneously.
In one embodiment of the invention, interrupt status refers to program performed by the process interrupt in terminal device And enter the state waited.In the script process of shared drive and the code calling process of non-script process, terminal device meeting Constantly monitor whether non-script process enters interrupt status, when monitoring that non-script process enters interrupt status, in non-foot Interrupt status information is written in the default memory address of the shared drive of this process and script process, above-mentioned interruption status information is The information of interrupt status is entered for identification process, the information that the process of will be used to identify that enters interrupt status is written to shared In memory, script process timely learning can be enabled to enter the information of interrupt status to non-script process.
Fig. 3 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure, refering to what is shown in Fig. 3, the interruption processing method of the script process further include:
Step S201, if monitoring the request for entering interrupt status for controlling the non-script process, described in control Non- script process enters the interrupt status.
In one embodiment, when the non-script process of control enters interrupt status, need whether verification reaches and can control Make the condition that non-script process enters interrupt status, specifically, can by monitor whether to receive for control non-script into Journey enters the request of interrupt status to determine whether to reach the condition for controlling non-script process and entering interrupt status.When monitoring to use When controlling non-script process and entering the request of interrupt status, then it can be determined as reaching the non-script process of control and enter interruption shape The condition of state can control non-script process at this time and enter interrupt status;If not monitoring to enter for controlling non-script process The request of interrupt status can then be determined as not up to controlling the condition that non-script process enters interrupt status, not control non-foot This process enters interrupt status.It should be noted that the above-mentioned request for entering interrupt status for controlling non-script process can be with Be it is default for controlling the interrupt requests that non-script process enters interrupt status in terminal device, which can be by The physical button or virtual control that user is provided by operating terminal equipment trigger, and can also input preset program by user Debugging instruction is triggered.Terminal device can be enabled to control non-foot according to the actual test demand of user through the above way This process enters interrupt status, and then conveniently in non-script process after entering interrupt status, shows the interruption of non-script process Code at position, and then position and obtain code performed before non-script process enters interrupt status, so that user's energy It modifies debugging to scripted code performed by non-script process in time.
Fig. 4 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure, in the present embodiment, in the code of the non-script process be added with the first breakpoint information, refering to what is shown in Fig. 4, the script into The interruption processing method of journey further include:
Step S202, if monitoring the position that the code of the non-script process is gone to where first breakpoint information It sets, then controls the non-script process and enter interrupt status.
In one embodiment, terminal device needs whether verification reaches when the non-script process of control enters interrupt status Enter the condition of interrupt status to the non-script process of control, wherein terminal device can add in the code of non-script process There is the first breakpoint information, which is used for so that terminal device determines whether non-script process reaches into interruption shape The condition of state.Above-mentioned first breakpoint information can be addition in one of the code of non-script process identification information, specifically, First breakpoint information can generally add the tail portion of the instruction of certain Codabar code in the non-shell script performed by non-script process. Terminal device go to the first breakpoint information in the code for monitoring non-script process where position when, it is determined that reach control Non- script process enters the condition of interrupt status, and terminal device controls non-script process and enters interrupt status.Through the above way It can be accurately located according to the first breakpoint information non-while the non-script process of control enters interrupt status The code that script process is run before entering interrupt status, and then user is facilitated to enter interrupt status to non-script process The code run before is modified debugging.
If Fig. 5 is diagrammatically illustrated and according to an embodiment of the invention is monitored that the non-script process enters interruption State, then in the shared drive be written interrupt status information flow chart, if as shown in figure 5, it is described monitor it is described non- Script process enters interrupt status, then interrupt status information is written in the shared drive, comprising:
Step S2101, if monitoring, the non-script process enters interrupt status, it is determined whether monitors described total Enjoy the request that the interrupt status information is written in memory;
Step S2102, if monitoring that the request of the interrupt status information is written in the shared drive, described total Enjoy write-in interrupt status information in memory.
In step S2101, in the script process of shared drive and the code calling process of non-script process, if terminal When equipment monitoring enters interrupt status to non-script process, is written and interrupts in the shared drive of script process and non-script process Before status information, it is also necessary to determine whether to monitor that interrupt status is written in the shared drive of script process and non-script process The request of information.The above-mentioned request in the shared drive of script process and non-script process write-in interrupt status information is preset For controlling the request in shared drive write-in interrupt status information, the reality which can be provided by user's operation terminal device Body key or virtual control are triggered.
In step S2102, in the case where terminal device monitors that non-script process enters interrupt status, terminal device Also by whether monitoring that the request of interrupt status information is written in shared drive to determine whether to execute and write in shared drive Enter the operation of interrupt status information.If terminal device monitors that the request of interrupt status information is written in shared drive, altogether Write-in interrupt status information in memory is enjoyed, so that script process can be believed by the interrupt status being written in shared drive The case where breath non-script process of timely learning enters interrupt status.Shape is interrupted for controlling to be written in shared drive by setting The request of state information can be realized and be controlled with being customized by the user altogether in the case where non-script process enters interrupt status Enjoy memory write-in interrupt status information operation so that user can make by oneself free burial ground for the destitute control script process come know non-script into Journey enters the case where interrupt status.
Also with continued reference to FIG. 2, in step S220, if monitoring, there are interrupt status letters in the shared drive Breath, then control the script process and enter interrupt status.
In one embodiment of the invention, terminal device is determining whether that reaching control script process enters interrupt status Condition when, can by whether be written in the shared drive of monitoring script process and non-script process interrupt status information come it is true It is fixed.When interrupt status information is written in the shared drive that terminal device monitors script process and non-script process, it is determined that Reach control script process and enter the condition of interrupt status, and controls script process and enter interrupt status;Otherwise, when end equipment is supervised Survey when interrupt status information not being written in the shared drive of script process and non-script process, it is determined that not up to control script into Journey enters the condition of interrupt status, will not control script process and enter interrupt status.Terminal device by control script process into Enter interrupt status, after control script process enters interrupt status, shows the code at the interruption position of script process, Jin Erding Position obtains code performed before script process enters interrupt status.
Fig. 6 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure, with reference to Fig. 6, the interruption processing method further include:
Step S211, if monitoring that the mark existed in the shared drive for identifying the interrupt status information is believed Breath, it is determined that monitor that there are the interrupt status information in the shared drive.
In one embodiment of the invention, above-mentioned interruption status information can be a kind of preset identification information, such as A kind of specific character string information " ABCBA12321 ".Terminal device in monitoring shared drive by whether there is in for identifying The identification information of disconnected status information whether there is interrupt status information to determine in shared drive.When terminal device monitors to share When there is the identification information for identifying interrupt status information in memory, it is determined that monitor that there are interrupt status in shared drive Information, when terminal device does not monitor to have the identification information for identifying interrupt status information in shared drive, it is determined that Do not monitor that there are interrupt status information in shared drive.
In one embodiment of the invention, above-mentioned interruption status information can also be a kind of preset status identifier, For example, when status identifier is " flag=1 ", then it represents that there are interrupt status information in shared drive;When status identifier is " flag=0 ", then it represents that interrupt status information is not present in shared drive.Terminal device can be by monitoring shared drive Whether status identifier is " flag=1 " to determine in shared drive with the presence or absence of interrupt status information.
Fig. 7 diagrammatically illustrates the control script process according to an embodiment of the invention and enters interrupt status Flow chart, with reference to Fig. 7, the control script process enters interrupt status, comprising:
Step S2201 adds the second breakpoint information in the code of the script process.
Step S2202, if the second breakpoint information being resolved in the code of the script process, control the script into Journey enters interrupt status.
In step S2201, terminal device, can be in script process when realizing that control script process enters interrupt status The second breakpoint information is added in the scripted code of operation, which is used for so that terminal device determines script process is The no condition reached into interrupt status.Above-mentioned second breakpoint information is specifically as follows the script of operation of the addition in script process One of code identification information, it should be noted that second breakpoint information generally adds some generation in scripted code The tail portion of code instruction.
In step S2202, script process specifically needs to carry out scripted code parsing and turns in perform script code It translates, in order to according to the program of parsing result perform script code.In script process perform script code, if being resolved to script When the second breakpoint information in process execution script code, then controls script process and enter interrupt status, if not being resolved to foot When the second breakpoint information in this process execution script code, then script process is not controlled and enters interrupt status.By in foot The second breakpoint information is added in the scripted code of this process operation, control script process may be implemented and enter interrupt status, in addition, While realizing that control script process enters interrupt status, since the second breakpoint information generally adds certain in scripted code The tail portion of a code command, therefore script process can be entered to the code run before interrupting according to the second breakpoint information Next line code is shown, thus according to next line code for being shown determine script process enter interrupt before run Code, and then realize and be accurately located code performed before script process enters interrupt status.Even if in script process In multiple program instructions when calling code corresponding to the same program instruction to non-script process, can also be directly targeted to It is convenient to exist to script process to improve the accuracy of positioning at the code position that script process is run before entering interruption The code run before into interruption is modified debugging.
In one embodiment of the invention, the control script process enters interrupt status, is controlling the foot This process enters after interrupt status, the interruption processing method further include:
Delete second breakpoint information in the code of the script process.
In the present embodiment, terminal device can will be added in script after control script process enters interrupt status The second breakpoint information in the code of process is deleted, and is avoided in the subsequent implementation procedure of script process, due to being resolved to The second breakpoint information and the unnecessary interrupt status of entrance in the code of script process.
Also with continued reference to FIG. 2, in step S230, after controlling the script process and entering interrupt status, institute is shown State the code at the interruption position of script process.
In step S230, terminal device is specifically held in script process when control script process enters interrupt status It has gone and has stopped after current code command, the interruption position of interrupt status can be entered according to script process at this time, in control institute It states after script process enters interrupt status, shows the code at the interruption position of script process.It, can when being shown to code Code to be showed on the Debugging interface of terminal device, to facilitate user to modify debugging.
Above as can be seen that working as needs in the script process of shared drive and the code calling process of non-script process When the scripted code run to script process is modified and debugged, enter interrupt status by controlling non-script process, if Monitor that non-script process enters interrupt status, then interrupt status information be written in shared drive, in order to script process and When learn that non-script process enters the information of interrupt status, if monitoring in shared drive there are interrupt status information, Control script process enters interrupt status, after control script process enters interrupt status, shows the interruption position of script process The code at place quickly and accurately positions scripted code performed by script process so as to realize, so that debugging people Member can in time modify debugging to scripted code performed by script process, improve to script generation performed by script process Code is modified the efficiency of debugging.
Fig. 8 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure shows the generation at the interruption position of the script process after controlling the script process and entering interrupt status with reference to Fig. 8 After the step S230 of code, further includes:
Step S240 deletes the interrupt status information in the shared drive.
In step S240, for the interrupt status information in shared drive, terminal device is in showing script process It after code at disconnected position, is deleted, to avoid in the subsequent implementation procedure of script process, due to monitoring to share Interrupt status information in memory and enter unnecessary interrupt status.
Fig. 9 diagrammatically illustrates the process of the interruption processing method of script process according to an embodiment of the invention Figure, with reference to Fig. 9, after controlling the script process and entering interrupt status, the interruption processing method further include:
Step S250 controls the script if monitoring the request of the interrupt status for releasing the script process Process enters operating status.
In step s 250, above-mentioned for releasing the request of the interrupt status of script process, it is that terminal device is default For releasing the request of the interrupt status of script process after control script process enters interrupt status, which can be permissible The physical button or virtual control provided by user by operating terminal equipment triggers, and can also input preset journey by user Sequence debugging instruction is triggered.When need to control script process continue to run when, then can input release script process interruption shape The request of state continues to execute scripted code so that script process, which releases interrupt status, enters operating status.
Figure 10 diagrammatically illustrates the flow chart of the interruption processing method of the script process of one embodiment of the present of invention, should The interruption processing method of script process can be by terminal device (such as terminal device 101,102 or 103) as shown in Figure 1 or service Device 105 executes, and the present embodiment is illustrated for executing by terminal device.
With reference to Figure 10, in the present embodiment, the script process with non-script process shared drive is Lua process, with script The non-script process of process shared drive is C++ process.The Lua function in Lua process is called in the C++ process of shared drive In the process, need to modify to the corresponding code of Lua function in Lua process debug when, C++ process can be monitored whether Into interrupt status, when monitoring that C++ process enters interrupt status, interrupt status information is written in shared drive, and in Lua Add breakpoint information in the corresponding code tail portion of Lua function in process.When monitoring that there are interrupt status information in shared drive When, and during being parsed to the Lua function in Lua process, it is resolved to the breakpoint of the corresponding code tail portion of Lua function Information is called Lua debugging mode then to control Lua process and enter interrupt status, and then is realized quickly and quasi- according to breakpoint information It really positions at the corresponding code position of Lua function performed by Lua process, so that commissioning staff can be in time to Lua letter The corresponding codes of number are modified debugging, are improved and are modified the efficiency of debugging to the corresponding code of Lua function.
The device of the invention embodiment introduced below, can be used for executing the script process in the above embodiment of the present invention Interruption processing method.For undisclosed details in apparatus of the present invention embodiment, the above-mentioned script process of the present invention is please referred to The embodiment of interruption processing method.
Figure 11 diagrammatically illustrates the block diagram of the interrupt processing device of script process according to an embodiment of the invention. Referring to Fig.1 shown in 1, the interrupt processing device 300 of script process according to an embodiment of the invention, comprising: writing unit 310, the first interrupt location 320 and display unit 330.
Wherein, writing unit 310 is used in the script process of shared drive and the code calling process of non-script process, If monitoring, the non-script process enters interrupt status, and interrupt status information is written in the shared drive;In first If disconnected unit 320 for monitor to control in the shared drive there are the interrupt status information script process into Enter interrupt status;Display unit 330 is used for after controlling the script process and entering interrupt status, shows the script process Code at interruption position.
In one embodiment of the invention, said write unit 310 is used for, if monitoring, the non-script process enters Interrupt status, it is determined whether monitor that the request of the interrupt status information is written in the shared drive;If monitoring The request of the interrupt status information is written in the shared drive, then interrupt status information is written in the shared drive.
In one embodiment of the invention, the first breakpoint information is added in the code of the non-script process, it is described The interrupt processing device 300 of script process further include: the second interrupt location, if for monitoring the code of the non-script process The position where first breakpoint information is gone to, then controls the non-script process and enters interrupt status.
In one embodiment of the invention, the interrupt processing device of the script process further include: third interrupt location, If the request for monitoring to enter interrupt status for controlling the non-script process, controls the non-script process and enter The interrupt status.
In one embodiment of the invention, first interrupt location 320, in the code of the script process Add the second breakpoint information;If the second breakpoint information being resolved in the code of the script process, control the script into Journey enters interrupt status.
In one embodiment of the invention, the interrupt processing device of the script process further include: first deletes unit, For deleting second breakpoint in the code of the script process after controlling the script process and entering interrupt status Information.
In one embodiment of the invention, the interrupt processing device of the script process further include: second deletes unit, For after controlling the script process and entering interrupt status, after showing the code at the interruption position of the script process, Delete the interrupt status information in the shared drive.
In one embodiment of the invention, the interrupt processing device of the script process further include: running unit is used for After controlling the script process and entering interrupt status, if monitoring asking for the interrupt status for releasing the script process It asks, then controls the script process and enter operating status.
In one embodiment of the invention, the interrupt processing device of the script process further include: execution unit is used for If monitoring the identification information for having for identifying the interrupt status information in the shared drive, it is determined that monitor institute State in shared drive that there are the interrupt status information.
Figure 12 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
It should be noted that the computer system 1500 of the electronic equipment shown in Figure 12 is only an example, it should not be to this The function and use scope of inventive embodiments bring any restrictions.
As shown in figure 12, computer system 1500 include central processing unit (Central Processing Unit, CPU) 1501, it can be according to the program being stored in read-only memory (Read-Only Memory, ROM) 1502 or from depositing It stores up the program that part 1508 is loaded into random access storage device (Random Access Memory, RAM) 1503 and executes each Kind movement appropriate and processing, such as execute method described in above-described embodiment.In RAM 1503, it is also stored with system behaviour Various programs and data needed for making.CPU 1501, ROM 1502 and RAM 1503 are connected with each other by bus 1504.It is defeated Enter/export (Input/Output, I/O) interface 1505 and is also connected to bus 1504.
I/O interface 1505 is connected to lower component: the importation 1506 including keyboard, mouse etc.;Including such as cathode Ray tube (Cathode Ray Tube, CRT), liquid crystal display (Liquid Crystal Display, LCD) etc. and loudspeaking The output par, c 1507 of device etc.;Storage section 1508 including hard disk etc.;And including such as LAN (Local Area Network, local area network) card, modem etc. network interface card communications portion 1509.Communications portion 1509 is via such as The network of internet executes communication process.Driver 1510 is also connected to I/O interface 1505 as needed.Detachable media 1511, such as disk, CD, magneto-optic disk, semiconductor memory etc., are mounted on as needed on driver 1510, in order to It is mounted into storage section 1508 as needed from the computer program read thereon.
Particularly, according to an embodiment of the invention, may be implemented as computer below with reference to the process of flow chart description Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 1509, and/or from detachable media 1511 are mounted.When the computer program is executed by central processing unit (CPU) 1501, executes in the system of the application and limit Various functions.
It should be noted that computer-readable medium shown in the embodiment of the present invention can be computer-readable signal media Or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (Erasable Programmable Read Only Memory, EPROM), flash memory, optical fiber, Portable, compact Disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In the present invention, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this hair In bright, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device or device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to: wireless, wired etc. or above-mentioned is any appropriate Combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution, so that the electronic equipment realizes method described in above-described embodiment.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of interruption processing method of script process characterized by comprising
In the script process of shared drive and the code calling process of non-script process, if monitor the non-script process into Enter interrupt status, then interrupt status information is written in the shared drive;
If monitoring, there are the interrupt status information in the shared drive, control the script process and enter interruption shape State;
After controlling the script process and entering interrupt status, the code at the interruption position of the script process is shown.
2. the interruption processing method of script process according to claim 1, which is characterized in that if it is described monitor it is described non- Script process enters interrupt status, then interrupt status information is written in the shared drive, comprising:
If monitoring, the non-script process enters interrupt status, it is determined whether monitor the shared drive be written described in The request of interrupt status information;
If monitoring that the request of the interrupt status information is written in the shared drive, in the shared drive in write-in Disconnected status information.
3. the interruption processing method of script process according to claim 1, which is characterized in that the generation of the non-script process The first breakpoint information is added in code;The interruption processing method further include:
If monitoring the position that the code of the non-script process is gone to where first breakpoint information, control described non- Script process enters interrupt status.
4. the interruption processing method of script process according to claim 1, which is characterized in that the interruption processing method is also Include:
If monitoring the request for entering interrupt status for controlling the non-script process, controls the non-script process and enter The interrupt status.
5. the interruption processing method of script process according to claim 1, which is characterized in that the control script into Journey enters interrupt status, comprising:
The second breakpoint information is added in the code of the script process;
If the second breakpoint information being resolved in the code of the script process controls the script process and enters interruption shape State.
6. the interruption processing method of script process according to claim 5 enters interruption shape controlling the script process After state, the interruption processing method further include:
Delete second breakpoint information in the code of the script process.
7. the interruption processing method of script process according to claim 1, which is characterized in that controlling the script process Into after interrupt status, after showing the code at the interruption position of the script process, the interruption processing method further include:
Delete the interrupt status information in the shared drive.
8. the interruption processing method of script process according to claim 1, which is characterized in that controlling the script process Into after interrupt status, the interruption processing method further include:
If monitoring the request of the interrupt status for releasing the script process, controls the script process and enter operation shape State.
9. the interruption processing method of script process according to claim 1, which is characterized in that the interruption processing method is also Include:
If monitoring the identification information for having for identifying the interrupt status information in the shared drive, it is determined that monitoring Into the shared drive, there are the interrupt status information.
10. a kind of interrupt processing device of script process characterized by comprising
Writing unit, in shared drive script process and non-script process code calling process in, if monitoring institute It states non-script process and enters interrupt status, then interrupt status information is written in the shared drive;
First interrupt location, if for monitoring to control the foot there are the interrupt status information in the shared drive This process enters interrupt status;
Display unit, for showing the interruption position of the script process after controlling the script process and entering interrupt status The code at place.
CN201910625996.8A 2019-07-11 2019-07-11 Interrupt processing method and device for script process Active CN110347601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910625996.8A CN110347601B (en) 2019-07-11 2019-07-11 Interrupt processing method and device for script process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910625996.8A CN110347601B (en) 2019-07-11 2019-07-11 Interrupt processing method and device for script process

Publications (2)

Publication Number Publication Date
CN110347601A true CN110347601A (en) 2019-10-18
CN110347601B CN110347601B (en) 2023-10-24

Family

ID=68175078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910625996.8A Active CN110347601B (en) 2019-07-11 2019-07-11 Interrupt processing method and device for script process

Country Status (1)

Country Link
CN (1) CN110347601B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825031A (en) * 2019-12-04 2020-02-21 上海维宏电子科技股份有限公司 System and method for realizing real-time custom control of numerical control system
CN113010407A (en) * 2019-12-20 2021-06-22 上海汽车集团股份有限公司 System information acquisition method, device and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693162A (en) * 2011-12-29 2012-09-26 中国科学技术大学苏州研究院 Method for process communication among multiple virtual machines on multi-core platform based on shared memory and intercore interruption
CN105787371A (en) * 2016-03-18 2016-07-20 山东华软金盾软件股份有限公司 Method and system for monitoring computer process

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693162A (en) * 2011-12-29 2012-09-26 中国科学技术大学苏州研究院 Method for process communication among multiple virtual machines on multi-core platform based on shared memory and intercore interruption
CN105787371A (en) * 2016-03-18 2016-07-20 山东华软金盾软件股份有限公司 Method and system for monitoring computer process

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825031A (en) * 2019-12-04 2020-02-21 上海维宏电子科技股份有限公司 System and method for realizing real-time custom control of numerical control system
CN110825031B (en) * 2019-12-04 2023-03-31 上海维宏电子科技股份有限公司 System and method for realizing real-time custom control of numerical control system
CN113010407A (en) * 2019-12-20 2021-06-22 上海汽车集团股份有限公司 System information acquisition method, device and system

Also Published As

Publication number Publication date
CN110347601B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
CN108733005B (en) Method and device for controlling linkage of intelligent equipment
CN109523187A (en) Method for scheduling task, device and equipment
CN112073994A (en) Method and device for over-the-air upgrading, electronic equipment and readable storage medium
CN108962244A (en) Method and apparatus for sending information
CN108733787A (en) Database operation method, device, electronic equipment and storage medium
CN110347601A (en) The interruption processing method and device of script process
CN109547261A (en) Service line switching method, device, electronic equipment and storage medium
CN110119386A (en) Data processing method, data processing equipment, medium and calculating equipment
CN112131092A (en) Page debugging method and device
CN107918555A (en) The method and apparatus for handling data based on physical host
US20240231567A1 (en) Method, apparatus and electronic device for session menu processing
CN109299124A (en) Method and apparatus for more new model
CN109684059A (en) Method and device for monitoring data
CN109656667A (en) Implementation method, device, equipment and the medium of suspended window in a kind of client
CN108763881A (en) Method and apparatus for controlling user right
CN108845946A (en) A kind of terminal, debugging system and terminal debugging method
CN108875355A (en) A kind of control method and device of access authority
US20230206756A1 (en) Method and system of controlling traffic lighting apparatus, electronic device and storage medium
CN109683942A (en) Script management method, device, medium and electronic equipment
CN116051031A (en) Project scheduling system, medium and electronic equipment
CN110347468A (en) Textures switching method, textures switching device and electronic equipment
CN110365839A (en) Closedown method, device, medium and electronic equipment
CN109614440A (en) Method of data synchronization and relevant device based on big data
CN109977011A (en) Automatic generation method, device, storage medium and the electronic equipment of test script
CN109597819A (en) Method and apparatus for more new database

Legal Events

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