CN112286820A - Software debugging method and device, computer equipment and storage medium - Google Patents

Software debugging method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112286820A
CN112286820A CN202011209205.2A CN202011209205A CN112286820A CN 112286820 A CN112286820 A CN 112286820A CN 202011209205 A CN202011209205 A CN 202011209205A CN 112286820 A CN112286820 A CN 112286820A
Authority
CN
China
Prior art keywords
data
port
command
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.)
Pending
Application number
CN202011209205.2A
Other languages
Chinese (zh)
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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202011209205.2A priority Critical patent/CN112286820A/en
Publication of CN112286820A publication Critical patent/CN112286820A/en
Pending legal-status Critical Current

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (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 direct-through command aiming at a task execution port; controlling the task execution port to be in a data direct connection state according to the data direct connection command; sending an input debugging command to target software through the task execution port in the data through state; the target software is software to be debugged; returning an execution result through the execution task port in the data through state; the execution result is the result obtained by the target software executing the debugging command. By adopting the method, the efficiency of software debugging can be improved.

Description

Software debugging method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a software debugging method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, debugging problematic software becomes one of the daily work contents of technicians. At present, a method for debugging software with problems is to debug the software with problems through a welding serial port line, or to debug the software with problems through a debugging bridge port after switching to a mode of debugging the bridge port through an input command.
However, currently used methods require a reboot of the problematic software to be effective. However, restarting the software with problems destroys the problem site where the software is located, and it takes a long time to reproduce the problem with low occurrence probability or the problem that occurs only in a specific environment, so that the log of the software with problems cannot be timely and effectively captured, and the efficiency of software debugging is reduced.
Disclosure of Invention
In view of the above, it is necessary 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 direct-through command aiming at a task execution port;
controlling the task execution port to be in a data direct connection state according to the data direct connection command;
sending an input debugging command to target software through the task execution port in the data through state; the target software is software to be debugged;
returning an execution result through the execution task port in the data through state; the execution result is the result obtained by the target software executing the debugging command.
In one embodiment, the controlling the task execution 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 execution task port to be in a data through state through a pre-configured control program.
In one embodiment, after receiving the data pass-through command for the task execution port, and before controlling the task execution 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 data through command received according to the received data through command, and controlling the task execution port to be in a data through state.
In one embodiment, the debug command is used 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 task execution port.
In one embodiment, the method further comprises:
and after the control execution task port is in a 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 an execution result through the executive task port in the data pass-through state includes:
and returning the execution result to a serial port tool through the execution task port in the data through state.
In one embodiment, the target software includes at least one of an application and a kernel; the execution result is a debugging log;
the returning the execution result to the serial port tool through the task execution port in the data through state includes:
when the target software is a kernel, returning a debugging log of the kernel to a serial port tool through the task execution port in the data direct connection state;
and when the target software is an application program, returning the debugging log of the application program to a serial port tool through the execution task port in the data through state.
A software debugging apparatus, the apparatus comprising:
the receiving module is used for receiving a data direct-connection command aiming at a task execution port;
the control module is used for controlling the task execution port to be in a data direct connection state according to the data direct connection command;
the sending module is used for sending the input debugging command to target software through the task execution port in the data direct connection state; the target software is software to be debugged;
the return module is used for returning an execution result through the task execution port in the data direct connection state; the execution result is the result obtained by the target software executing the debugging command.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a data direct-through command aiming at a task execution port;
controlling the task execution port to be in a data direct connection state according to the data direct connection command;
sending an input debugging command to target software through the task execution port in the data through state; the target software is software to be debugged;
returning an execution result through the execution task port in the data through state; the execution result is the result obtained by the target software executing the debugging command.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a data direct-through command aiming at a task execution port;
controlling the task execution port to be in a data direct connection state according to the data direct connection command;
sending an input debugging command to target software through the task execution port in the data through state; the target software is software to be debugged;
returning an execution result through the execution task port in the data through state; the execution result is the 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 task execution port to be in a data through state according to the received data through command aiming at the task execution port. At the moment, the target software does not need to be restarted, and the terminal sends the debugging command input by the user to the target software through the task execution port in the data through state as long as the user inputs the debugging command under the condition of keeping the problem site of the target software needing debugging. And 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, returning the execution result 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 flowchart illustrating a software debugging method according to an embodiment;
FIG. 2 is a flowchart illustrating software debugging steps in one embodiment;
FIG. 3 is a flowchart illustrating a software debugging method according to another embodiment;
FIG. 4 is a block diagram showing the configuration of a software debugging apparatus according to one embodiment;
FIG. 5 is a block diagram showing the construction of a software debugging apparatus according to another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a software debugging method is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be 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 is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 102, receiving a data through command for executing a task port.
The task execution port is a port which is opened by a preset program and then faces a user. It will be appreciated that the native function of the task execution port in the system is not user-oriented, i.e. only commands sent internally in the system, but commands entered by the user, are accepted. The scheme of the application is that the task execution port is improved, so that the task execution port can face a user, and a command input by the user can be received. Then, when the executive task port is opened by the terminal and faces the user, the executive task port can be used for transmitting the debugging command input by the user and for returning the result corresponding to the debugging command to the user. The data through command is a command for causing the execution task port to be in a data through state.
Specifically, the user inputs a data through command for executing the task port. The terminal receives a data through command input by the port for executing the task.
In one embodiment, the data through command may be an "at (entry)".
In one embodiment, the executive task port may be an "AT" port.
And step 104, controlling the task execution port to be in a data through state according to the data through command.
The data through state is a state in which the task execution port is opened and faces the user.
It can be understood that the task execution port in the data pass-through state may be configured to receive and forward an instruction input by a user, and return corresponding data obtained by executing the instruction. That is, 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 the corresponding data to the user through the task execution port.
Specifically, the terminal opens the executive task port according to the received data direct connection command for the executive task port, so that the executive task port is in a data direct connection state.
In one embodiment, the function implemented by the data PASS-through command may be a "PASS function".
In one embodiment, after the terminal controls the task execution port to be in the data through state, the task execution port can have a debug serial port function.
Step 106, sending the input debugging command to target software through the task execution port in the data direct connection 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 debugging 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 task execution port in the data direct connection state.
In one embodiment, the debugging command may be a debugging analysis command which is input by a user on a terminal and is commonly used by an operating system for debugging target software. For example, the Linux system commonly uses a debug analysis command.
Step 108, returning an execution result through the task execution port in the data direct connection state; the execution result is the result of the target software executing the debug command.
Specifically, the terminal monitors the task execution port after sending the debugging command input by the user to the target software through the task execution port in the data through state. The target software can execute the debugging command, obtain an execution result corresponding to the debugging command, and send the execution result to the execution task port in the data through state. And when the terminal monitors that the execution task port has an execution result corresponding to the debugging command sent by the target software, returning the execution result 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 task execution port to be in a data through state according to the received data through command aiming at the task execution port. At the moment, the target software does not need to be restarted, and the terminal sends the debugging command input by the user to the target software through the task execution port in the data through state as long as the user inputs the debugging command under the condition of keeping the problem site of the target software needing debugging. And 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, returning the execution result 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 execution 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 execution task port to be in a data through state through a pre-configured control program.
The pre-configured control program is a control program pre-configured for the execution task port and is used for controlling the execution task port to be in a data through state according to the data through command.
Specifically, the user inputs a data through command at the terminal. The terminal responds to a data through command input by a user, and controls the task execution port to be in a data through state through a pre-configured control program.
In one embodiment, after the user calls the interface for inputting the data through command through the shortcut command, the data through command is input 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. And the terminal responds to a command that the user inputs 'AT + GTDEBUGPASS ═ 1', and controls the task execution port to be in a data through state through a pre-configured control program.
In this embodiment, the terminal may control the task execution port to be in the data through state according to the data through command through a pre-configured control program. The user can use the task execution port as long as inputting the data through command, thereby improving the efficiency of using the task execution port by the user.
In one embodiment, after receiving the data through command for the task port, before controlling the task port to be in the data through state according to the data through command, the method further includes: acquiring an input verification password; verifying the input verification password; and when the password is verified to be correct, controlling the task execution port to be in a data through state according to the received data through command.
The verification password is a password applied by a user for debugging the target software in advance and is used for verifying whether the identity of the user has the qualification of debugging the target software.
Specifically, the terminal prompts the user to input an authentication password in response to a data through command input by the user. And the user inputs the verification password according to the prompt. And 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 task execution 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, the terminal can return to the state of listening for the data through command. And after the user needs to re-input the data direct connection command, re-inputting the verification password 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 terminal can directly prompt the user to re-input the verification password. The user re-inputs the verification password according to the prompt to verify the identity.
In one embodiment, the terminal may prompt the user to enter an authentication password at the same interface as the data through command is 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 a data through command input by the user, and prompt the user to input an authentication password in the authentication password interface. The password verification interface and the interface for inputting the data direct connection command are displayed independently.
In the embodiment, the user identity is verified through the verification password input by the user, the user who does not use the qualification of the task execution port can be prevented from using the task execution port, and the management and control of the task execution 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 carried by the terminal system and is used for processing corresponding data according to the received command.
Specifically, the user inputs a corresponding debugging command for the target software to be debugged. And the terminal receives a debugging command input by a user through the task execution port and sends the debugging command to the target software. Then, the target software executes the debugging command input by the user by calling the system function. The target software finishes executing the debugging command input by the user and sends an execution result obtained by executing the debugging command to the task execution port.
In one embodiment, when the target software has a problem of network unavailability, the user may send a plurality of debug commands to check the network status, and determine what problem specifically occurs in the target software according to the execution result returned by the target software and corresponding to the debug command.
In one embodiment, the user may send an "ifconfig" debug command to check the status of the network card, and see whether the network card has acquired the 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., an iptables debug command) to view the associated network information table.
In one embodiment, the user may also view the contents of files on the target software using the system's modem debug commands (i.e., cat debug commands).
In one embodiment, the user may also view the kernel's most recent print information using the "dmesg" debug command.
In one embodiment, a 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 able to connect communications, etc.
In this embodiment, the terminal directly sends the debugging command input by the user to the target software by executing the task port. Then, the target software can call the system function to execute according to the debugging command input by the user, and return the corresponding execution result to the task execution port. Through the steps, the corresponding execution result can be obtained on the premise of not destroying the problem site of the target software, so that the relevant execution result of the target software can be quickly obtained.
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.
Specifically, after the terminal control execution task port is in a data through state, a command input by a user is monitored. And when the terminal receives a command of exiting the data through state, controlling the execution task port to exit the data through state.
In one embodiment, the terminal receives a command that "AT + GTDEBUGPASS" is 0, and the control execution task port exits the data through state and returns to the state before receiving the data through command.
In the embodiment, the terminal can control the executive task port to exit the data direct connection state through the received command for exiting the data direct connection state, so that the process of controlling the executive task port is simplified, and the workload of related workers is reduced.
In one embodiment, returning the execution result through the execution task port in the data pass-through state includes: and returning the execution result to the serial port tool through the task execution port in the data direct connection state.
The serial port tool is software connected with the task execution port and used for receiving an execution result returned from the task execution port.
Specifically, after the terminal sends the debugging command input by the user to the target software through the executive task port, the executive task port in the data through state is monitored. When the terminal monitors that the execution result sent by the target software exists in the task execution port, the execution result is returned to the serial port tool through the task execution 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 task execution port. And the software for downloading the file calls a system function to execute the debugging command, and an execution result obtained by executing the debugging command is written into the task execution port. And the terminal returns the execution result to the serial port tool through the task execution port. When the task execution port is in a data direct-connection state, a user can look up a corresponding execution result on the serial port tool only by inputting a debugging command.
In the embodiment, the execution result corresponding to the debugging command input by the user is returned to the serial port tool through the task execution port, so that the user can obtain the execution result of the target software for analyzing 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 debugging log; returning an execution result to the serial port tool through the task execution port in the data through state, comprising: when the target software is a kernel, returning a debugging log of the kernel to the serial port tool through the task execution port in the data direct connection state; and when the target software is the application program, returning the debugging log of the application program to the serial port tool through the execution task port in the data through state.
The application program is a computer program used by the terminal to complete at least one specific task. And the debugging log is a result generated after the target software executes the debugging command. The kernel is software for controlling hardware-related operations of the terminal.
Specifically, the terminal judges whether the target software to be debugged by the user is an application program or a kernel according to a debugging command input by the user. And when the terminal judges that the target software required to be debugged by the user is the kernel, returning the debugging log of the kernel to the serial port tool through the task execution port in the data direct connection state. And when the terminal judges that the target software required to be debugged by the user is the application program, returning the debugging log of the application program to the serial port tool through the execution task port in the data direct connection state.
In this embodiment, the task execution port in the data through state may return a debug log of the kernel to the serial port tool or return a debug log of the application program. Therefore, on the premise of not destroying the problem site of the target software, a user can conveniently and quickly obtain the debugging log of the kernel 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 direct connection 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 not correct, the state before the data through command is received is returned, and the state is represented by 'end' in the figure. And when the terminal verifies that the verification password is correct, controlling the task execution port 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 the command of exiting the data through state, the control execution task port exits the data through state and returns to the state before receiving the data through command, which is represented by 'end' in the figure. And when the terminal receives a debugging command which is input by a user and debugs the target software, the debugging command is sent to the target software through the task execution port. And after the target software acquires the debugging command, executing the debugging command through a system call function. And finally, the target software writes an execution result obtained by executing the debugging command into the task execution port.
As shown in fig. 3, in an embodiment, another software debugging method is provided, which specifically includes the following steps:
step 302 listens for a data pass-through command to the port executing the task.
Step 304 receives a data pass-through command for executing a task port.
Step 306, acquiring an input verification password; and verifying the input verification password.
It is to be appreciated that step 308 is performed when the verification password is correct, and that step 302 is performed when the verification password is incorrect.
Step 308 is to control the execution task port to be in the data through state through the pre-configured control program in response to the data through command.
It is understood that after the control execution task port is in the data pass-through state, when a command to exit the data pass-through state is received, step 311 is executed, and when a debug command is received, step 312 is executed.
Step 311 controls the executive task port to exit the data pass-through state.
Step 312 sends the input debug command to the target software through the executive task port in the data pass-through state.
Wherein 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 task execution port.
It is understood 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 through state.
Wherein, the execution result is a debugging log.
Step 316 returns the debugging log of the application program to the serial port tool through the execution task port in the data through state.
And the execution result is the result obtained by the target software executing the debugging command.
It should be understood that although the steps in the flowcharts of fig. 1 to 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in fig. 4, there is provided a software debugging apparatus 400 including: a receive module 402, a control module 404, a send module 406, and a return module 408, wherein:
a receiving module 402, configured to receive a data through command for executing a task port.
And the control module 404 is configured to control the task execution port to be in a data pass-through state according to the data pass-through command.
A sending module 406, configured to send the input debugging command to the target software through the task execution port in the data through state; the target software is the software to be debugged.
A return module 408, configured to return an execution result through the task execution 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 the executive task port to be in a data pass-through state in response to the data pass-through command via a pre-configured control program.
As shown in fig. 5, in one embodiment, the apparatus further comprises:
an authentication module 403, configured to obtain an input authentication password; verifying the input verification password; and when the password is verified to be correct, controlling the task execution port to be in a data through state according to the received data through command.
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 executive task port to exit the data-through state when a command to exit the data-through state is received after the executive task port is in the data-through state.
In one embodiment, the returning 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 returning module 408 is further configured to return the debugging log of the kernel to the serial port tool through the execution task port in the data through state when the target software is the kernel.
In one embodiment, the returning module 408 is further configured to return the debug log of the application program to the serial port tool through the execution task port in the data pass-through state when the target software is the application program.
For specific limitations of the software debugging apparatus, reference may be made to the above limitations of the software debugging method, which will not be described herein again. The modules in the software debugging device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram 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 comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement 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, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain 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 a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a data direct-through command aiming at a task execution port;
controlling the task execution port to be in a data direct connection state according to the data direct connection command;
sending the input debugging command to target software through an execution task port in a data direct connection state; the target software is software to be debugged;
returning an execution result through the execution task port in the data direct connection 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 execution task 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 password is verified to be correct, controlling the task execution port to be in a data through state according to the received data through command.
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: 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 processor, when executing the computer program, further performs the steps of: and returning the execution result to the serial port tool through the task execution port in the data direct connection 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 the debugging log of the kernel to the serial port tool through the task execution port in the data direct connection state.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the target software is the application program, returning the 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 direct-through command aiming at a task execution port;
controlling the task execution port to be in a data direct connection state according to the data direct connection command;
sending the input debugging command to target software through an execution task port in a data direct connection state; the target software is software to be debugged;
returning an execution result through the execution task port in the data direct connection 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 execution task 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 password is verified to be correct, controlling the task execution port to be in a data through state according to the received data through command.
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: 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 computer program when executed by the processor further performs the steps of: and returning the execution result to the serial port tool through the task execution port in the data direct connection 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 the debugging log of the kernel to the serial port tool through the task execution port in the data direct connection state.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the target software is the application program, returning the debugging log of the application program to the serial port tool through the execution task port in the data through state.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for debugging software, the method comprising:
receiving a data direct-through command aiming at a task execution port;
controlling the task execution port to be in a data direct connection state according to the data direct connection command;
sending an input debugging command to target software through the task execution port in the data through state; the target software is software to be debugged;
returning an execution result through the execution task port in the data through state; the execution result is the result obtained by the target software executing the debugging command.
2. The method according to claim 1, wherein the controlling the task execution port to be in the data pass-through state according to the data pass-through command comprises: and 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.
3. The method according to claim 1, wherein after receiving the data pass-through command for the executive task port and before controlling the executive 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 data through command received according to the received data through command, and controlling the task execution port to be in a data through state.
4. The method according to claim 1, wherein the debug command is used 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 task execution port.
5. The method of claim 1, further comprising:
and after the control execution task port is in a 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 returning execution results through the executive task port in the data pass-through state comprises:
and returning the execution result to a serial port tool through the execution task port in the data 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 debugging log;
the returning the execution result to the serial port tool through the task execution port in the data through state includes:
when the target software is a kernel, returning a debugging log of the kernel to a serial port tool through the task execution port in the data direct connection state;
and when the target software is an application program, returning the debugging log of the application program to a serial port tool through the execution task port in the data through state.
8. A software debugging apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving a data direct-connection command aiming at a task execution port;
the control module is used for controlling the task execution port to be in a data direct connection state according to the data direct connection command;
the sending module is used for sending the input debugging command to target software through the task execution port in the data direct connection state; the target software is software to be debugged;
the return module is used for returning an execution result through the task execution port in the data direct connection state; the execution result is the 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, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011209205.2A 2020-11-03 2020-11-03 Software debugging method and device, computer equipment and storage medium Pending CN112286820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011209205.2A CN112286820A (en) 2020-11-03 2020-11-03 Software debugging method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011209205.2A CN112286820A (en) 2020-11-03 2020-11-03 Software debugging method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112286820A true CN112286820A (en) 2021-01-29

Family

ID=74350848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011209205.2A Pending CN112286820A (en) 2020-11-03 2020-11-03 Software debugging method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112286820A (en)

Citations (5)

* Cited by examiner, † Cited by third party
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
CA2916622A1 (en) * 2015-01-02 2016-07-02 High Sec Labs Ltd. Usb security device, apparatus, method and system
US20190034318A1 (en) * 2017-07-26 2019-01-31 Western Digital Technologies, Inc. Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator
CN109478161A (en) * 2016-07-08 2019-03-15 国际商业机器公司 Debugging message about production containers is provided using debugging container
CN111813614A (en) * 2020-09-03 2020-10-23 湖北芯擎科技有限公司 Debugging processing method and device and debugging processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
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
CA2916622A1 (en) * 2015-01-02 2016-07-02 High Sec Labs Ltd. Usb security device, apparatus, method and system
CN109478161A (en) * 2016-07-08 2019-03-15 国际商业机器公司 Debugging message about production containers is provided using debugging container
US20190034318A1 (en) * 2017-07-26 2019-01-31 Western Digital Technologies, Inc. Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator
CN111813614A (en) * 2020-09-03 2020-10-23 湖北芯擎科技有限公司 Debugging processing method and device and debugging processing system

Similar Documents

Publication Publication Date Title
US9836380B2 (en) Systems and methods for testing terminal applications
CN111008132B (en) Application debugging method and device for Android system, computer equipment and storage medium
CN110286998B (en) Virtual machine graphical user interface validation and execution process recording method and device
CN110958217B (en) Method and device for remotely controlling server, computer equipment and storage medium
CN110175101B (en) Abnormality capturing method and device and terminal
CN115543827A (en) Buried point data display method and device
CN112527416A (en) Task processing method and device, computer equipment and storage medium
CN112286820A (en) Software debugging method and device, computer equipment and storage medium
CN109783261B (en) Crash processing method and device for terminal application, electronic equipment and storage medium
CN111966530A (en) Disaster recovery switching method and device for application system, computer equipment and storage medium
CN114579473B (en) Application testing method, device, equipment and storage medium
CN114039760A (en) Security testing method and device, computer equipment and storage medium
CN110704218B (en) Data processing method, data processing device, computer equipment and storage medium
CN114706662B (en) Method and system for realizing dynamic simulation of business operation and data based on JVM sandbox
CN114266037B (en) Sample detection method and device, electronic equipment and storage medium
CN114327648B (en) Driving debugging method and device, electronic equipment and storage medium
CN111008375B (en) Data protection method and device
CN108228247A (en) The system and method that a kind of tool is interacted with target machine enhancing
CN110119615B (en) Android log leakage-prevention control method and device and computer equipment
CN116662136A (en) Data acquisition method and device
KR100270655B1 (en) Memory debuging method of real time multi-task operating system
CN112884441A (en) Test result recording method and device, computer equipment and storage medium
CN109324807B (en) Charging module installation method and system of OpenStack
CN115509855A (en) Thread monitoring method and device, computer equipment and storage medium
CN113886219A (en) Software 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