CN112286820B - Software debugging method, device, computer equipment and storage medium - Google Patents
Software debugging method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112286820B CN112286820B CN202011209205.2A CN202011209205A CN112286820B CN 112286820 B CN112286820 B CN 112286820B CN 202011209205 A CN202011209205 A CN 202011209205A CN 112286820 B CN112286820 B CN 112286820B
- Authority
- CN
- China
- Prior art keywords
- data
- command
- state
- port
- execution task
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000012795 verification Methods 0.000 claims description 42
- 238000004590 computer program Methods 0.000 claims description 27
- 230000006870 function Effects 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000012797 qualification Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Environmental & Geological Engineering (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 application relates to a software debugging method, a software debugging device, computer equipment and a storage medium. The method comprises the following steps: receiving a data through command for an execution task port; according to the data through command, controlling an execution task port to be in a data through state; the input debugging command is sent to target software through the execution task port in the data straight-through state; the target software is software to be debugged; returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command. The method can improve the efficiency of software debugging.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a software debugging method, a device, a computer device, and a storage medium.
Background
With the development of computer technology, debugging of software with problems becomes one of the daily work contents of technicians. At present, the method for debugging the software with problems is to debug the software with problems through a welded serial port line, or to debug the software with problems through a debug bridge port after switching to a mode of the debug bridge port through an input command.
However, all of the methods currently in use require software to restart the problem. However, restarting the problem-generating software damages the problem site where the software is located, and it takes a long time to reproduce the problem with a low probability of occurrence or the problem that occurs only in a specific environment, so that the log of the problem-generating software cannot be effectively captured in time, and the efficiency of software debugging is reduced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a software debugging method, apparatus, computer device, and storage medium capable of improving the efficiency of software debugging.
A method of software debugging, the method comprising:
receiving a data through command for an execution task port;
according to the data through command, controlling an execution task port to be in a data through state;
The input debugging command is sent to target software through the execution task port in the data straight-through state; the target software is software to be debugged;
Returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command.
In one embodiment, the controlling the task port to be in the data pass-through state according to the data pass-through command includes: and responding to the data through command, and controlling the task executing port to be in a data through state through a pre-configured control program.
In one embodiment, after the receiving the data pass-through command for the task port, before the controlling the task port to be in the data pass-through state according to the data pass-through command, the method further includes:
Acquiring an input verification password;
Verifying the input verification password;
And when the verification password is correct, executing the received data through command, and controlling an execution task port to be in a data through state.
In one embodiment, the debug command is configured to instruct the target software to call a system function to execute the debug command, and write an execution result obtained by executing the debug command into the execution task port.
In one embodiment, the method further comprises:
and after the control execution task port is in the data through state, when a command for exiting the data through state is received, the control execution task port exits the data through state.
In one embodiment, the returning, through the execution task port in the data pass-through state, an execution result includes:
and returning the execution result to the serial port tool through the execution task port in the data straight-through state.
In one embodiment, the target software includes at least one of an application and a kernel; the execution result is a debug log;
The step of returning the execution result to the serial port tool through the execution task port in the data straight-through state comprises the following steps:
when the target software is a kernel, returning a debugging log of the kernel to a serial port tool through the execution task port in the data straight-through state;
and when the target software is an application program, returning a debugging log of the application program to a serial port tool through the execution task port in the data straight-through state.
A software debugging apparatus, the apparatus comprising:
the receiving module is used for receiving a data through command aiming at an execution task port;
The control module is used for controlling the execution task port to be in a data straight-through state according to the data straight-through command;
the sending module is used for sending the input debugging command to the target software through the execution task port in the data straight-through state; the target software is software to be debugged;
the return module is used for returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
receiving a data through command for an execution task port;
according to the data through command, controlling an execution task port to be in a data through state;
The input debugging command is sent to target software through the execution task port in the data straight-through state; the target software is software to be debugged;
Returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving a data through command for an execution task port;
according to the data through command, controlling an execution task port to be in a data through state;
The input debugging command is sent to target software through the execution task port in the data straight-through state; the target software is software to be debugged;
Returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command.
According to the software debugging method, the software debugging device, the computer equipment and the storage medium, the terminal controls the execution task port to be in a data straight-through state according to the received data straight-through command for the execution task port. At this time, the target software is not required to be restarted, and under the condition that the problem site of the target software to be debugged is maintained, the terminal sends the debug command input by the user to the target software through the execution task port in the data straight-through state as long as the user inputs the debug command. When the terminal monitors that the execution task port has an execution result corresponding to the debugging command input by the user and returned by the target software, the execution result is returned through the execution task port. Therefore, the user can obtain the execution result corresponding to the input debugging command, and the software debugging efficiency is improved.
Drawings
FIG. 1 is a flow diagram of a software debugging method in one embodiment;
FIG. 2 is a flow diagram of a software debugging step in one embodiment;
FIG. 3 is a flowchart of a software debugging method according to another embodiment;
FIG. 4 is a block diagram of a software debugging apparatus in one embodiment;
FIG. 5 is a block diagram of a software debugging apparatus in another embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a software debugging method is provided, and this embodiment is applied to a terminal for illustration, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
Step 102, a data pass-through command for an execution task port is received.
The task execution port is a port which is opened by a preset program and then faces to a user. It will be appreciated that the native functionality of the task execution port in the system is not user-oriented, i.e., can only accept commands sent internally to the system, but cannot accept commands entered by the user. The scheme of the application improves the execution task port, so that the execution task port can face a user, and can receive commands input by the user. Then, when the execution task port is opened by the terminal and faces the user, the execution task port may be used to transmit a debug command input by the user and to return a result corresponding to the debug command to the user. The data pass-through command is a command for putting the execution task port in a data pass-through state.
Specifically, the user inputs a data pass-through command for the execution task port. And the terminal receives the data through command input for the execution task port.
In one embodiment, the data pass-through command may be an "AT (attention)" command.
In one embodiment, the execution task port may be an "AT" port.
Step 104, according to the data pass-through command, the execution task port is controlled to be in a data pass-through state.
The data through state is a state that an execution task port is opened and faces a user.
It can be understood that the execution task port in the data pass-through state can be used for receiving and forwarding the instruction input by the user and returning the corresponding data obtained by executing the instruction. When the task execution port is in a data through state, the terminal forwards the related command input by the user through the task execution port and returns corresponding data to the user through the task execution port.
Specifically, the terminal opens any execution task port according to the received data pass-through command for the execution task port, so that the execution task port is in a data pass-through state.
In one embodiment, the function implemented by the data PASS-through command may be a "PASS function".
In one embodiment, after the terminal control task port is in the data pass-through state, the task port may have a "debug serial port" function.
Step 106, the input debugging command is sent to the target software through the execution task port in the data through state; the target software is the software to be debugged.
The debug command is a command for debugging the target software.
Specifically, the user inputs a corresponding debug command for the target software to be debugged. And the terminal sends the debugging command input by the user to the target software through the execution task port in the data through state.
In one embodiment, the debug command may be a debug analysis command commonly used by an operating system for debugging the target software entered by a user on the terminal. For example, the debugging analysis commands commonly used in Linux systems.
Step 108, returning an execution result through the execution task port in the data straight-through state; the execution result is the result of the target software executing the debug command.
Specifically, after the terminal sends the debug command input by the user to the target software through the execution task port in the data through state, the execution task port is monitored. The target software can execute the debug command to obtain an execution result corresponding to the debug command, and send the execution result to the execution task port in the data pass-through state. When the terminal monitors that the execution task port has an execution result corresponding to the debugging command sent by the target software, the execution result is returned to the user through the execution task port.
According to the software debugging method, the software debugging device, the computer equipment and the storage medium, the terminal controls the execution task port to be in a data straight-through state according to the received data straight-through command for the execution task port. At this time, the target software is not required to be restarted, and under the condition that the problem site of the target software to be debugged is maintained, the terminal sends the debugging command input by the user to the target software through the execution task port in the data straight-through state as long as the user inputs the debugging command. When the terminal monitors that the execution task port has an execution result corresponding to the debugging command input by the user and returned by the target software, the execution result is returned through the execution task port. Therefore, the user can obtain the execution result corresponding to the input debugging command, and the software debugging efficiency is improved.
In one embodiment, controlling the task port to be in a data pass-through state according to the data pass-through command includes: and responding to the data through command, and controlling the task executing port to be in a data through state through a pre-configured control program.
The pre-configured control program is a pre-configured control program for the task executing port and is used for controlling the task executing port to be in a data through state according to the data through command.
Specifically, the user inputs a data pass-through command at the terminal. And the terminal responds to the data through command input by the user, and controls the task executing port to be in a data through state through a pre-configured control program.
In one embodiment, the user may call out the interface for inputting the data-through command via the shortcut command and then input the data-through command on the interface.
In one embodiment, the terminal may present an interface for inputting a data-through command in response to a user's trigger operation of the button.
In one embodiment, the user enters an "at+ GTDEBUGPASS =1" command. The terminal responds to a user input 'AT+ GTDEBUGPASS =1' command, and controls the task executing port to be in a data through state through a pre-configured control program.
In this embodiment, the terminal may control the execution task port to be in the data through state according to the data through command by using a control program configured in advance. The user can use the task executing port only by inputting the data through command, so that the efficiency of using the task executing port by the user is improved.
In one embodiment, after receiving the data pass-through command for the execution task port, before controlling the execution task port to be in the data pass-through state according to the data pass-through command, the method further comprises: acquiring an input verification password; verifying the input verification password; and when the verification password is correct, executing the received data through command, and controlling the execution task port to be in a data through state.
The verification password is a password pre-applied by a user for debugging the target software and is used for verifying whether the identity of the user has the qualification of debugging the target software.
Specifically, the terminal responds to a data through command input by a user, and prompts the user to input an authentication password. The user inputs the authentication password according to the prompt. The terminal acquires the verification password input by the user and verifies the verification password. And when the terminal verifies that the verification password is correct, controlling the execution task port to be in a data through state.
In one embodiment, when the terminal verifies that the verification password input by the user is incorrect, a state of monitoring the data through command may be returned. And after the user needs to input the data through command again, the user inputs the verification password again according to the prompt to verify the identity.
In one embodiment, when the terminal verifies that the verification password input by the user is incorrect, the user can be directly prompted to re-input the verification password. The user then re-inputs the verification password to verify the identity according to the prompt.
In one embodiment, the terminal may prompt the user for an authentication password at the same interface that the data pass-through command was entered. And the user inputs the verification password according to the prompt on the same interface for inputting the data through command.
In one embodiment, the terminal can automatically pop up an authentication password interface after the data input by the user is passed through the command, so as to prompt the user to input an authentication password in the authentication password interface. The password verification interface and the data direct-through command input interface are displayed independently.
In this embodiment, the user identity is verified by the verification password input by the user, so that the user who does not use the qualification of the execution task port can be prevented from using the execution task port, and management and control of the execution task port are enhanced.
In one embodiment, the debug command is used for instructing the target software to call the system function to execute the debug command, and writing an execution result obtained by executing the debug command into the execution task port.
The system function is a function of the terminal system and is used for processing corresponding data according to the received command.
Specifically, the user inputs a corresponding debug command for the target software to be debugged. And the terminal receives the debugging command input by the user through the execution task port and sends the debugging command to the target software. The target software then executes the user-entered debug command by invoking the system function. And the target software executes the debugging command input by the user and sends an execution result obtained by executing the debugging command to the execution task port.
In one embodiment, when the target software has a problem of network failure, the user may send a plurality of debug commands to view the network state, and determine what problem the target software specifically has according to the execution result returned by the target software and corresponding to the debug commands.
In one embodiment, the user may send an "ifconfig" debug command to see the status of the network card, see if the network card has acquired IP.
In one embodiment, the user may also send a route debug command to see if the routing table is correct.
In one embodiment, the user may also send a network information table debug command (i.e., iptables debug command) to view the relevant network information table.
In one embodiment, the user may also view the contents of the file on the target software using a modem debug command (i.e., cat debug command) of the system.
In one embodiment, the user may also view the latest print information for the kernel using the "dmesg" debug command.
In one embodiment, the user may also use a communication connection debug command (e.g. a "ping 8.8.8.8" debug command) to see if the network is capable of connecting to a communication, etc.
In this embodiment, the terminal directly sends the debug command input by the user to the target software through the execution task port. Then, the target software can call the system function to execute according to the debug command input by the user, and the corresponding execution result is returned to the execution task port. Through the steps, the corresponding execution result can be obtained on the premise of not damaging the problem site of the target software, and therefore the execution result related to the target software can be obtained quickly.
In one embodiment, the method further comprises: after the control execution task port is in the data through state, when a command for exiting the data through state is received, the control execution task port exits the data through state.
Specifically, after the terminal controls the task executing port to be in a data through state, a command input by a user is monitored. And when the terminal receives a command for exiting the data through state, controlling the execution task port to exit the data through state.
In one embodiment, when the terminal receives the "at+ GTDEBUGPASS =0" command input by the user, the task port is controlled to exit the data through state, and returns to the state before receiving the data through command.
In this embodiment, the terminal may control the task executing port to exit the data through state by receiving the command for exiting the data through state, thereby simplifying the process of controlling the task executing port and reducing the workload of the related staff.
In one embodiment, returning the execution result through the execution task port in the data pass-through state includes: and returning an execution result to the serial port tool through the execution task port in the data straight-through state.
The serial port tool is software connected with the execution task port and is used for receiving an execution result returned from the execution task port.
Specifically, after the terminal sends the debug command input by the user to the target software through the execution task port, the terminal monitors the execution task port in the data through state. When the terminal monitors the execution result sent by the target software in the execution task port, the execution result is returned to the serial port tool through the execution task port.
In one embodiment, problems occur with software, such as for downloading files. And the terminal sends the debugging command input by the user to the software for downloading the file through the execution task port. And the software for downloading the file calls the system function to execute the debugging command, and writes an execution result obtained by executing the debugging command into the execution task port. And the terminal returns the execution result to the serial port tool through the execution task port. When the port for executing the task is in the data through state, the user can look up the corresponding execution result on the serial port tool only by inputting the debugging command.
In this embodiment, the execution result corresponding to the debug command input by the user is returned to the serial port tool through the execution task port, so that the user can obtain the execution result of the target software for analyzing the occurrence of the problem, the efficiency of obtaining the execution result by the user is improved, and the efficiency of debugging the target software by the user is improved.
In one embodiment, the target software includes at least one of an application and a kernel; the execution result is a debug log; returning an execution result to the serial port tool through the execution task port in the data through state, including: when the target software is a kernel, returning a debugging log of the kernel to the serial port tool through an execution task port in a data straight-through state; and when the target software is an application program, returning a debugging log of the application program to the serial port tool through the execution task port in the data through state.
Wherein the application program is a computer program for the terminal to perform at least one specific job. The debug log is a result generated after the target software executes the debug command. The kernel is software for controlling the hardware-related work of the terminal.
Specifically, the terminal judges whether target software required to be debugged by the user is an application program or a kernel according to a debugging command input by the user. When the terminal judges that the target software required to be debugged by the user is the kernel, the terminal returns a debugging log of the kernel to the serial port tool through the execution task port in the data straight-through state. And when the terminal judges that the target software required to be debugged by the user is the application program, returning a debugging log of the application program to the serial port tool through the execution task port in the data straight-through state.
In this embodiment, the debug log of the kernel or the debug log of the application program may be returned to the serial port tool through the execution task port in the data pass-through state. Therefore, under the precondition that the problem site of the target software is not damaged, a user can conveniently and rapidly acquire the debugging log of the kernel with the problem or the application program with the problem, and the efficiency of debugging the target software is improved.
In one embodiment, as shown in the flow diagram of the software debugging step of FIG. 2. And the terminal receives the data through command and prompts the user to input the verification password. The terminal acquires the verification password input by the user (namely, acquires the verification code), and verifies the verification password. When the terminal verifies that the verification password is incorrect, the state before the data direct-through command is received is returned, and the state is indicated by 'end' in the figure. When the terminal verifies that the verification password is correct, the execution task port is controlled to be in a data through state according to the received data through command. Next, the terminal waits for the user to input a debug command. When the terminal receives a command for exiting the data through state, the execution task port is controlled to exit the data through state and return to a state before receiving the data through command, and the state is indicated by 'end' in the figure. When the terminal receives a debugging command input by a user for debugging the target software, the debugging command is sent to the target software through the execution task port. After the target software obtains the debugging command, the target software is executed by a system call function. And finally, the target software writes the execution result obtained by executing the debugging command into the execution task port.
As shown in fig. 3, in one embodiment, another software debugging method is provided, which specifically includes the following steps:
step 302 listens for a data pass-through command for an executing task port.
Step 304 receives a data pass-through command for an execution task port.
Step 306, acquiring an input verification password; and verifying the input verification password.
It will be appreciated that when the verification password is correct, step 308 is performed, and when the verification password is incorrect, step 302 is performed back.
Step 308 controls the task port to be in the data pass-through state by a pre-configured control program in response to the data pass-through command.
It will be appreciated that after the control task port is in the data pass-through state, when a command to exit the data pass-through state is received, step 311 is performed, and when a debug command is received, step 312 is performed.
Step 311 controls the execution task port to exit the data pass-through state.
Step 312 sends the input debug command to the target software through the execution task port that is in the data pass-through state.
The target software is software to be debugged; the target software comprises at least one of an application program and a kernel; and the debugging command is used for indicating the target software to call the system function to execute the debugging command and writing an execution result obtained by executing the debugging command into the execution task port.
It will be appreciated that step 314 is performed when the target software is a kernel, and step 316 is performed when the target software is an application.
Step 314 returns the debug log of the kernel to the serial tool through the execution task port in the data pass-through state.
Wherein, the execution result is a debug log.
Step 316 returns the debug log of the application to the serial tool through the execution task port in the data pass-through state.
The execution result is a result obtained by the target software executing the debug command.
It should be understood that, although the steps in the flowcharts of fig. 1 to 3 are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps of fig. 1-3 may include a plurality of steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in FIG. 4, there is provided a software debugging apparatus 400 comprising: a receiving module 402, a control module 404, a sending module 406, and a returning module 408, wherein:
A receiving module 402, configured to receive a data pass-through command for an execution task port.
The control module 404 is configured to control the execution task port to be in a data pass-through state according to the data pass-through command.
A sending module 406, configured to send an input debug command to the target software through an execution task port in a data pass-through state; the target software is the software to be debugged.
A return module 408, configured to return an execution result through the execution task port in the data pass-through state; the execution result is the result of the target software executing the debug command.
In one embodiment, the control module 404 is further configured to control, in response to the data pass-through command, the task port to be executed in the data pass-through state by a pre-configured control program.
As shown in fig. 5, in one embodiment, the apparatus further comprises:
A verification module 403, configured to obtain an input verification password; verifying the input verification password; and when the verification password is correct, executing the received data through command, and controlling the execution task port to be in a data through state.
In one embodiment, the debug command is used for instructing the target software to call the system function to execute the debug command, and writing an execution result obtained by executing the debug command into the execution task port.
In one embodiment, the control module 404 is further configured to control the execution task port to exit the data pass-through state when receiving the command to exit the data pass-through state after the execution task port is in the data pass-through state.
In one embodiment, the return module 408 is further configured to return the execution result to the serial port tool through the execution task port in the data pass-through state.
In one embodiment, the return module 408 is further configured to return, when the target software is a kernel, a debug log of the kernel to the serial port tool through the execution task port in the data pass-through state.
In one embodiment, the return module 408 is further configured to, when the target software is an application program, return a debug log of the application program to the serial port tool through the execution task port in the data pass-through state.
For specific limitations of the software debugging apparatus, reference may be made to the above limitation of the software debugging method, and no further description is given here. The respective modules in the software debugging apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a software debugging method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
receiving a data through command for an execution task port;
according to the data through command, controlling the execution task port to be in a data through state;
The method comprises the steps that an input debugging command is sent to target software through an execution task port in a data straight-through state; the target software is the software to be debugged;
returning an execution result through the execution task port in the data straight-through state; the execution result is the result of the target software executing the debug command.
In one embodiment, the processor when executing the computer program further performs the steps of: and responding to the data through command, and controlling the task executing port to be in a data through state through a pre-configured control program.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring an input verification password; verifying the input verification password; and when the verification password is correct, executing the received data through command, and controlling the execution task port to be in a data through state.
In one embodiment, the debug command is used for instructing the target software to call the system function to execute the debug command, and writing an execution result obtained by executing the debug command into the execution task port.
In one embodiment, the processor when executing the computer program further performs the steps of: after the control execution task port is in the data through state, when a command for exiting the data through state is received, the control execution task port exits the data through state.
In one embodiment, the processor when executing the computer program further performs the steps of: and returning an execution result to the serial port tool through the execution task port in the data straight-through state.
In one embodiment, the processor when executing the computer program further performs the steps of: and when the target software is the kernel, returning a debugging log of the kernel to the serial port tool through the execution task port in the data through state.
In one embodiment, the processor when executing the computer program further performs the steps of: and when the target software is an application program, returning a debugging log of the application program to the serial port tool through the execution task port in the data through state.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a data through command for an execution task port;
according to the data through command, controlling the execution task port to be in a data through state;
The method comprises the steps that an input debugging command is sent to target software through an execution task port in a data straight-through state; the target software is the software to be debugged;
returning an execution result through the execution task port in the data straight-through state; the execution result is the result of the target software executing the debug command.
In one embodiment, the computer program when executed by the processor further performs the steps of: and responding to the data through command, and controlling the task executing port to be in a data through state through a pre-configured control program.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring an input verification password; verifying the input verification password; and when the verification password is correct, executing the received data through command, and controlling the execution task port to be in a data through state.
In one embodiment, the debug command is used for instructing the target software to call the system function to execute the debug command, and writing an execution result obtained by executing the debug command into the execution task port.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the control execution task port is in the data through state, when a command for exiting the data through state is received, the control execution task port exits the data through state.
In one embodiment, the computer program when executed by the processor further performs the steps of: and returning an execution result to the serial port tool through the execution task port in the data straight-through state.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the target software is the kernel, returning a debugging log of the kernel to the serial port tool through the execution task port in the data through state.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the target software is an application program, returning a debugging log of the application program to the serial port tool through the execution task port in the data through state.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (10)
1. A method of software debugging, the method comprising:
Receiving a data through command for an execution task port; the data through command is a command for enabling the execution task port to be in a data through state;
responding to the data through command, and controlling an execution task port to be in a data through state through a pre-configured control program; the data through state is a state that an execution task port is opened and faces a user; the execution task port in the data straight-through state is used for receiving and forwarding the instruction input by the user and returning corresponding data obtained by executing the instruction;
the input debugging command is sent to target software through the execution task port in the data straight-through state; the target software is software to be debugged; the debug command is a command to debug the target software;
Returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command.
2. The method of claim 1, wherein after receiving the data pass-through command for the execution task port, the controlling the execution task port to be in the data pass-through state according to the data pass-through command further comprises:
Acquiring an input verification password;
Verifying the input verification password;
And when the verification password is correct, executing the received data through command, and controlling an execution task port to be in a data through state.
3. The method of claim 2, wherein the verification password is a password pre-applied by a user debugging the target software for verifying whether the identity of the user qualifies for debugging the target software.
4. The method according to claim 1, wherein the debug command is configured to instruct the target software to call a system function to execute the debug command, and write an execution result obtained by executing the debug command into the execution task port.
5. The method according to claim 1, wherein the method further comprises:
and after the control execution task port is in the data through state, when a command for exiting the data through state is received, the control execution task port exits the data through state.
6. The method of claim 1, wherein the returning the execution result through the execution task port in the data pass-through state comprises:
and returning the execution result to the serial port tool through the execution task port in the data straight-through state.
7. The method of claim 6, wherein the target software comprises at least one of an application and a kernel; the execution result is a debug log;
The step of returning the execution result to the serial port tool through the execution task port in the data straight-through state comprises the following steps:
when the target software is a kernel, returning a debugging log of the kernel to a serial port tool through the execution task port in the data straight-through state;
and when the target software is an application program, returning a debugging log of the application program to a serial port tool through the execution task port in the data straight-through state.
8. A software debugging apparatus, the apparatus comprising:
The receiving module is used for receiving a data through command aiming at an execution task port; the data through command is a command for enabling the execution task port to be in a data through state;
The control module is used for responding to the data through command and controlling the execution task port to be in a data through state through a pre-configured control program; the data through state is a state that an execution task port is opened and faces a user; the execution task port in the data straight-through state is used for receiving and forwarding the instruction input by the user and returning corresponding data obtained by executing the instruction;
The sending module is used for sending the input debugging command to the target software through the execution task port in the data straight-through state; the target software is software to be debugged; the debug command is a command to debug the target software;
the return module is used for returning an execution result through the execution task port in the data straight-through state; and the execution result is a result obtained by the target software executing the debugging command.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011209205.2A CN112286820B (en) | 2020-11-03 | 2020-11-03 | Software debugging method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011209205.2A CN112286820B (en) | 2020-11-03 | 2020-11-03 | Software debugging method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112286820A CN112286820A (en) | 2021-01-29 |
CN112286820B true CN112286820B (en) | 2024-09-06 |
Family
ID=74350848
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011209205.2A Active CN112286820B (en) | 2020-11-03 | 2020-11-03 | Software debugging method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112286820B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101493791A (en) * | 2008-01-23 | 2009-07-29 | 希姆通信息技术(上海)有限公司 | Computer debugging method and apparatus based on AT command of WINDOWS MOBILE |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9734358B2 (en) * | 2015-01-02 | 2017-08-15 | High Sec Labs Ltd | Self-locking USB protection pug device having LED to securely protect USB jack |
US10372588B2 (en) * | 2016-07-08 | 2019-08-06 | International Business Machines Corporation | Providing debug information on production containers using debug containers |
US20190034318A1 (en) * | 2017-07-26 | 2019-01-31 | Western Digital Technologies, Inc. | Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator |
CN111813614B (en) * | 2020-09-03 | 2020-12-15 | 湖北芯擎科技有限公司 | Debugging processing method and device and debugging processing system |
-
2020
- 2020-11-03 CN CN202011209205.2A patent/CN112286820B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101493791A (en) * | 2008-01-23 | 2009-07-29 | 希姆通信息技术(上海)有限公司 | Computer debugging method and apparatus based on AT command of WINDOWS MOBILE |
Also Published As
Publication number | Publication date |
---|---|
CN112286820A (en) | 2021-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109446068B (en) | Interface test method, device, computer equipment and storage medium | |
CN107451040B (en) | Method and device for positioning fault reason and computer readable storage medium | |
CN111966530A (en) | Disaster recovery switching method and device for application system, computer equipment and storage medium | |
CN113127285B (en) | Error data debugging method, device, chip and computer equipment | |
CN112286820B (en) | Software debugging method, device, computer equipment and storage medium | |
CN111176986B (en) | Thread script debugging method and device, computer equipment and storage medium | |
CN113094052A (en) | Application construction method and device, computer equipment and storage medium | |
CN114327648B (en) | Driving debugging method and device, electronic equipment and storage medium | |
CN114579473B (en) | Application testing method, device, equipment and storage medium | |
CN112491799B (en) | Remote repair method and device for communication module, computer equipment and storage medium | |
CN110704218B (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN105260257A (en) | Method and device for solving response stopping of program during operation | |
CN113535143B (en) | Stack information processing method, device, electronic device and storage medium | |
CN113282516A (en) | Method and device for processing test case result | |
CN112416640A (en) | Exception handling method and device, computer equipment and storage medium | |
CN112884441A (en) | Test result recording method and device, computer equipment and storage medium | |
CN112559248A (en) | Preprocessing service recovery method, device, equipment and storage medium | |
CN115509855B (en) | A thread monitoring method, device, computer equipment and storage medium | |
CN113806118A (en) | Self-repairing method, device and equipment for application program and storage medium | |
CN112241283B (en) | Software upgrading method, device, computer equipment and storage medium | |
CN114266037B (en) | Sample detection method and device, electronic equipment and storage medium | |
CN117170987B (en) | Monitoring method, system and related equipment of embedded real-time operating system | |
CN116860630B (en) | Equipment testing method and device, storage medium and computer equipment | |
CN113407438B (en) | Module testing method, computer device, and storage medium | |
CN114518997A (en) | Application testing method and device, computer equipment and storage medium |
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 |