CN114116439A - Debugging information output method and device, software debugging equipment and storage medium - Google Patents

Debugging information output method and device, software debugging equipment and storage medium Download PDF

Info

Publication number
CN114116439A
CN114116439A CN202010903535.5A CN202010903535A CN114116439A CN 114116439 A CN114116439 A CN 114116439A CN 202010903535 A CN202010903535 A CN 202010903535A CN 114116439 A CN114116439 A CN 114116439A
Authority
CN
China
Prior art keywords
information
debugging
data
software
debug
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
CN202010903535.5A
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.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN202010903535.5A priority Critical patent/CN114116439A/en
Publication of CN114116439A publication Critical patent/CN114116439A/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

Landscapes

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

Abstract

The embodiment of the application relates to the technical field of software debugging, and provides a debugging information output method, a debugging information output device, software debugging equipment and a storage medium, wherein the method comprises the following steps: acquiring debugging data output when debugging software to be debugged, wherein the debugging data comprises positioning information; acquiring description information in a text string form according to the positioning information and a configuration file, wherein the configuration file comprises a corresponding relation between the positioning information and the description information; and outputting debugging information corresponding to the software to be debugged based on the description information. By the debugging information output method, the modification cost of the debugging information can be reduced.

Description

Debugging information output method and device, software debugging equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of software debugging, in particular to a debugging information output method and device, software debugging equipment and a storage medium.
Background
Software debugging refers to the process of reproducing the software defect problem, locating and analyzing the root cause of the defect problem and finally solving the software defect problem. In order to facilitate positioning and analyzing the problem source, corresponding debugging information is output according to a debugging result in the software debugging process, and meanwhile, description information for describing the debugging information is also required to be added in the corresponding software firmware in advance in order to output the debugging information for positioning and analyzing the problem source.
In a conventional software debugging method, to facilitate the interpretation of a debugger, description information is usually added to software firmware in advance, and debugging information is directly output through a chip when debugging software. Although the description information is added to the software firmware in advance, so that a debugger can understand the running logic of the program directly according to the debugging information output by the chip under the condition of code deviation, the inventor finds that, because the description information is added to the software firmware in advance, if the output debugging information needs to be modified, the description information added to the software firmware needs to be modified, and the modified software firmware is burned into the chip again, which wastes time and labor, and has high modification cost.
Disclosure of Invention
Some embodiments of the present application provide a method and an apparatus for outputting debug information, a software debug device, and a storage medium, which are used to reduce the modification cost of the debug information.
In order to solve the above technical problem, an embodiment of the present application provides a debug information output method, including:
acquiring debugging data output when debugging software to be debugged, wherein the debugging data comprises positioning information;
obtaining description information according to the positioning information and a configuration file, wherein the configuration file comprises a corresponding relation between the positioning information and the description information;
and outputting debugging information corresponding to the software to be debugged based on the description information.
An embodiment of the present application further provides a debug information output apparatus, including:
the debugging device comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring debugging data output when software to be debugged is debugged, and the debugging data comprises positioning information;
the processing unit is used for acquiring description information according to the positioning information and a configuration file, wherein the configuration file comprises the corresponding relation between the positioning information and the description information;
and the output unit outputs debugging information corresponding to the software to be debugged based on the description information.
An embodiment of the present application further provides a software debugging apparatus, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the above-mentioned debug information output method.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-mentioned debug information output method.
Compared with the prior art, the method and the device for debugging the software acquire debugging data output when the software to be debugged is debugged, acquire the description information according to the positioning information and the configuration file in the debugging data, and output the debugging information corresponding to the software to be debugged based on the description information. Compared with the scheme that description information for describing debugging information is added to software firmware in advance in the prior art, the debugging information output method provided by the embodiment of the application does not add the description information into the software firmware, but adds the positioning information for determining the description information into the software firmware, and when the description information is modified to modify the output debugging information, the configuration file can be modified to modify the description information corresponding to the positioning information without modifying the positioning information, so that the software firmware of the software to be debugged does not need to be modified, the software firmware does not need to be re-burned, the debugging information output method provided by the embodiment of the application can reduce the modification cost of the debugging information, and the flexibility of the debugging information is also increased.
In addition, the debugging data is a pure numeric character string consisting of at least one number, and the description information is a text character string. The positioning information in the form of the pure digital character string is added into the software firmware, and the description information in the form of the text character string is not required to be added into the software firmware, so that when the software to be debugged is debugged, the positioning information contained in the debugging data output by the chip is in the form of the pure digital character string, and the data volume of the pure digital character string is smaller than that of the text character string. In addition, the data volume output by the chip is reduced, and the data volume output by the chip is ensured not to exceed the output capacity of the chip output interface, so that the problem of data loss output by the chip is also avoided. In addition, because the data added in the software firmware is in a pure data format with a small data volume, the hardware cost of software operation can be effectively reduced.
In addition, the debug data further includes: a data header; the obtaining the description information according to the positioning information and the configuration file comprises: determining a target configuration file according to the data header; and acquiring the description information according to the positioning information and the target configuration file. By searching the description information corresponding to the positioning information in the target configuration file without searching the description information corresponding to the positioning information in all the configuration files, the interference of other configuration files can be avoided, the description information can be quickly obtained according to the positioning information, and the software debugging efficiency is improved.
In addition, the data header is used for indicating a debugging system to which the software to be debugged belongs, and the target configuration file is a configuration file corresponding to the debugging system to which the software to be debugged belongs. After the debugging system to which the software to be debugged belongs is determined, the description information corresponding to the positioning information only needs to be searched in the configuration file corresponding to the debugging system to which the software to be debugged belongs, so that the interference of the configuration files of other debugging systems can be avoided, and the software debugging efficiency is improved.
In addition, the debug data further includes: checking information, after obtaining the debugging data, the method further comprising: and verifying whether the debugging data is correct or not according to the verification information, and if the debugging data is wrong, outputting reminding information for reminding the debugging data that is wrong. According to the verification information, reminding information can be output in time aiming at the wrong debugging data, and therefore the wrong debugging information can be prevented from being obtained according to the wrong debugging data.
In addition, the debug data further includes: the category information is used for indicating the category of the description information, and the obtaining of the description information in the form of text character strings according to the positioning information and the configuration file comprises: determining the category of the description information based on the category information, determining a target corresponding relation set in the configuration file according to the category of the description information, and acquiring the description information according to the positioning information and the target corresponding relation set; and the target corresponding relation set is a set formed by corresponding relations the same as the type of the description information. The target corresponding relation set with the same type as the description information can be determined according to the type information, and then the description information is obtained according to the positioning information and the target corresponding relation set, so that the interference of corresponding relations of other types can be avoided, and the debugging information output efficiency can be improved.
Drawings
One or more embodiments are illustrated by the corresponding figures in the drawings, which are not meant to be limiting.
FIG. 1 is a system architecture diagram of a software debugging system for outputting debugging information in an embodiment of the present application;
fig. 2 is a flowchart of a debugging information output method according to a first embodiment of the present application;
FIG. 3 is a diagram illustrating a structure of debugging data according to a first embodiment of the present application;
FIG. 4 is a diagram illustrating another exemplary debugging data structure according to the first embodiment of the present application;
fig. 5 is a flowchart of a debugging information output method according to a second embodiment of the present application;
fig. 6 is a flowchart of a debugging information output method according to a third embodiment of the present application;
fig. 7 is a schematic structural diagram of a debugging information output apparatus according to a fourth embodiment of the present application;
fig. 8 is a schematic structural diagram of another debugging information output apparatus according to a fourth embodiment of the present application;
fig. 9 is a schematic hardware structure diagram of a software debugging apparatus according to a fifth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following describes each embodiment of the present application in detail with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in various embodiments of the present application in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present application, and the embodiments may be mutually incorporated and referred to without contradiction.
Referring to fig. 1, a software debugging system that can be used to implement the debugging information output method according to the embodiment of the present application includes: software running means 11, configuration file storage means 12 and parsing means 13. The software running device 11 records a software firmware of the software to be debugged, to which the positioning information is added, in a chip, and is used for running the software to be debugged and outputting debugging data through an output interface. The configuration file storage device 12 stores a configuration file including a correspondence relationship between the positioning information and the description information. The analysis device 13 is burned with analysis software for receiving debugging data output by the chip of the software running device 11, calling a configuration file from the configuration file storage device 12, obtaining description information through the positioning information and the configuration file in the debugging data, and finally generating and outputting debugging information based on the description information so that a tester can analyze and position problems in the software to be tested.
The software running device 11, the configuration file storage device 12, and the analysis device 13 in the software debugging system shown in fig. 1 may be independent devices, or may be functional modules that are integrated in the same device and can implement corresponding functions, for example, the configuration file storage device 12 and the analysis device 13 are integrated in one debugging information analysis device, and the software running device 11 is another independent device. The debugging information analysis device obtains debugging data output when the chip runs the software to be debugged from the software running device 11, obtains the description information in the character string form corresponding to the positioning information according to the positioning information contained in the debugging data and the pre-stored configuration file, and generates and outputs the debugging information based on the description information. The embodiment of the present application does not limit the form of the software debugging system shown in fig. 1.
The following description specifically describes an example of the application of the debug information output method to a debug information analysis device, where the debug information analysis device may be a server or other electronic devices. The specific flow is shown in fig. 2, and includes the following steps S201 to S203:
s201, the debugging information analysis device obtains debugging data output when the software to be debugged is debugged. Wherein the debug data comprises positioning information.
Specifically, the debugging data in the embodiment of the present application refers to data directly output by an output interface of a chip running software to be debugged when the software to be debugged is debugged. The positioning information is all or part of the debugging data, and the positioning information is used for searching the corresponding description information in the configuration file. In order to enable a chip running the software to be debugged to output debugging data containing positioning information when the software to be debugged is debugged, before the software to be debugged is debugged, the positioning information needs to be added to software firmware of the software to be debugged, and then the software firmware added with the positioning information needs to be burned into the chip. In this step, the debugging information analysis device obtains debugging data containing positioning information, which is output when the chip runs the software to be debugged.
It should be noted that the positioning information in the embodiment of the present application may be any form of information. For example, the positioning information may be a numeric string composed of binary digits, such as: 0001. 0010, etc. For example, the positioning information may also be a numeric string consisting of decimal numbers, such as: 0548. 0639, the location information may also be, for example, a text string consisting of text and numbers, such as: positioning information 1, positioning information 2, etc. The embodiment of the present application does not limit the form of the positioning information.
S202, the debugging information analysis device obtains the description information according to the positioning information and the configuration file. Wherein the configuration file comprises a corresponding relationship between the positioning information and the description information. The meaning of the debugging data is explained through the description information, so that the debugging data is analyzed into the debugging information which is easy to be read by a debugging person, and the running logic of the program can be understood. Optionally, the corresponding relationship between the positioning information and the description information may be stored in a configuration file in a form of a corresponding relationship table. Illustratively, the debugging data output by the chip and containing the positioning information is a pure numeric character string composed of at least one number, and the description information is a text character string, and the corresponding relationship between the positioning information and the description information may be as shown in table 1 below:
TABLE 1
Figure BDA0002660593400000051
As described in the above example, when the location information is 0001, since the description information corresponding to the location information 0001 in the configuration file is "this is a piece of debug information, which is a first piece of debug information", the description information can be determined to be: "this is a piece of debug information, which is the first piece of debug information".
S203, the debugging information analysis device outputs debugging information corresponding to the software to be debugged based on the description information. The debugging information refers to information output by a debugging person when the software to be debugged is debugged, and the debugging person can analyze and position problems in the software to be debugged based on the debugging information.
Specifically, the debug information may be divided into two types according to whether the debug data output by the chip includes the debug parameter, where one type includes only the description information, and the other type includes the description information and the debug parameter. For the first case, the description information obtained according to the positioning information and the configuration file can be directly output as debugging information; for the first case, the debug information may be output according to the obtained description information and the debug parameters included in the debug data. The debugging parameters are variables generated by the chip in real time when the to-be-tested software runs, and the debugging information may or may not include the debugging parameters and is determined according to the actual situation. In the debug information including the description information and the debug parameters, the data amount of the description information usually accounts for 90% or more of the total data amount of the debug information, and the data amount of the debug parameters usually accounts for only 10% or less of the total data amount of the debug information.
Compared with the prior art, the debugging information analysis device firstly acquires debugging data output when the software to be debugged is debugged, then acquires description information according to the positioning information and the configuration file in the debugging data, and finally outputs the debugging information corresponding to the software to be debugged based on the description information. Compared with the scheme that the description information is added to the software firmware in advance in the prior art, the debugging information output method provided by the embodiment of the application does not add the description information into the software firmware, but adds the positioning information for determining the description information into the software firmware, and can modify the configuration file when the output debugging information is required to be modified, so that the modification of the description information corresponding to the positioning information is realized, and the modification of the positioning information added into the software firmware is not required, so that the modification of the software firmware of the software to be debugged is not required, and the rewriting of the software firmware is not required, and therefore, the debugging information output method provided by the embodiment of the application can reduce the modification cost of the description information. The following describes how to modify the debugging information by modifying the configuration file by an example.
Illustratively, as shown in the configuration shown in table 1 above, when the positioning information is 0001, the description information determined according to the configuration file shown in table 1 is: "this is a piece of debug information, which is the first piece of debug information"; when the description information needs to be modified into "this is a piece of debugging information, this is the fourth piece of debugging information", the configuration file may be modified, and the corresponding relationship in the modified configuration file is as shown in table 2 below:
TABLE 2
Figure BDA0002660593400000061
After the configuration file is modified, the software firmware is not modified, so that the location information in the debug data output when the software is debugged is still 0001, however, the description information corresponding to the location information 0001 in the configuration file is changed into 'this is a piece of debug information which is the fourth debug information', so that the corresponding description information is changed into 'this is a piece of debug information which is the fourth debug information', so that the modification of the description information is completed without modifying the software firmware, and the modification of the output debug information is further realized. That is, the embodiment can modify the debugging information at any time without modifying the firmware, thereby increasing the flexibility of the debugging information. Moreover, because the description information for describing the debugging information is placed in the configuration file, more description can be added to the debugging information without worrying about the additional memory cost.
In addition, in the conventional software debugging method, the amount of data that needs to be added to the software firmware and the amount of data that needs to be output by the chip are large due to the fact that the description information in the form of text strings is added to the software firmware in advance, and the large amount of data that needs to be added to the software firmware and the amount of data that needs to be output by the chip may cause the following problems: 1. the data volume needing to be output by the chip is too large, which can cause the pressure of an output interface of the chip to be increased, thereby influencing the normal operation of the chip; 2. when the data volume needing to be output by the chip exceeds the output capacity of the chip output interface, the output data can be partially or completely lost, so that the positioning and analysis of defects are influenced; 3. the large amount of data added to the software firmware results in a large amount of data of the software firmware, and increases the hardware cost of software operation.
The debugging information output method provided by the embodiment does not need to add the description information in the form of the text character string into the software firmware, only needs to add the positioning information into the software firmware, when the software to be debugged is debugged, the chip does not need to output the debugging information containing the description information in the form of the text character string, and only needs to output the debugging data in the form of the pure digital character string containing the positioning information, and the data volume of the pure digital character string is smaller than that of the text character string. In addition, the data volume output by the chip is reduced, and the data volume output by the chip is ensured not to exceed the output capacity of the chip output interface, so that the problem of data loss output by the chip is also avoided. In addition, because the data added in the software firmware is in a pure data format with a small data volume, the hardware cost of software operation can be effectively reduced.
In addition, since the debugging data is a coded pure data character string, effective debugging information can be analyzed only by combining the debugging data output when the software to be debugged is debugged with the corresponding configuration file, an unauthorized user cannot acquire the analysis mode of the debugging data and cannot read the effective information, and the firmware processing logic cannot be pushed backwards through the debugging data. In addition, as the positioning information only needs to be added into the software and firmware of the software to be tested, the embodiment of the application can be applied to the software written by any programming language in any system, and the applicability is very wide.
As an optional implementation manner of the embodiment of the present application, the debugging data further includes: a data header.
The above step S202: obtaining the description information in the form of text character strings according to the positioning information and the configuration file, and may further include: determining a target configuration file according to the data header; and acquiring the description information according to the positioning information and the target configuration file. That is, a plurality of profiles are defined, which are independent of each other, and the profile on which the description information depends is determined by a data header.
For example, the data header may be set as a numeric string of a fixed number of bits, and the corresponding profile may be indicated by one or more bits of data therein.
For example, the data header may be "0X 3342", "0X 3343", "0X 3344", and the like, and the data structure of the data header is not limited in this embodiment of the application.
Further, the data header is used to indicate a debugging system to which the software to be debugged belongs, and the determining a target configuration file according to the data header includes: determining a debugging system to which the software to be debugged belongs according to the data header; and determining the target configuration file according to the debugging system to which the software to be debugged belongs. And the target configuration file is a configuration file corresponding to a debugging system to which the software to be debugged belongs. That is, the way of determining the target configuration file according to the data header is as follows: firstly, determining a debugging system to which the software to be debugged belongs according to the header, and then determining a configuration file of the debugging system to which the software to be debugged belongs as a target configuration file.
Optionally, the corresponding relationship between the data header and the debugging system may also be stored in a form of a corresponding relationship table in a device or an apparatus for executing the debugging information output method provided in this embodiment.
For example, the data header and the debug system may correspond as shown in table 3 below:
TABLE 3
Figure BDA0002660593400000081
On one hand, since the configuration files of the plurality of debugging systems are respectively stored, after the debugging system to which the software to be debugged belongs is determined, only the description information corresponding to the positioning information needs to be searched in the configuration file corresponding to the debugging system to which the software to be debugged belongs, and the description information corresponding to the positioning information does not need to be searched in all the configuration files, so that the embodiment can avoid the interference of the configuration files of other debugging systems, quickly acquire the description information according to the positioning information, and improve the software debugging efficiency.
As shown in the example in table 3, when the data header is 0x1122, it may be determined that the target configuration file is the configuration file a corresponding to the debugging system 1, and when the data header is 0x2233, it may be determined that the target configuration file is the configuration file B corresponding to the debugging system 2.
On the other hand, because the configuration files of the plurality of debugging systems are respectively stored, when a certain software is debugged, only the configuration file corresponding to the debugging system to which the software belongs needs to be provided, and the configuration files corresponding to all software systems do not need to be provided, so that the confidentiality of the software can be enhanced.
As an optional implementation manner of this embodiment of the present application, the data header is further used to indicate whether the debug data further includes a debug parameter.
Based on whether the debug data includes the debug parameter, the step S203: the debugging information analysis device outputs debugging information corresponding to the software to be debugged based on the description information, and the debugging information analysis device comprises the following two output modes:
first, in a case that the data header indicates that the debugging data does not include debugging parameters, obtaining description information in a text string form according to the positioning information and a configuration file includes: and outputting the description information obtained according to the positioning information and the target configuration file as debugging information corresponding to the software to be debugged. For example, if the obtained description information is "this is a piece of debugging information, which is the first piece of location information", the debugging information corresponding to the software to be debugged is "this is a piece of debugging information, which is the first piece of location information".
Secondly, in case that the data header indicates that the debug data further includes debug parameters, outputting debug information by the following steps a to c:
step a, acquiring the number, the structure and the meaning of the debugging parameters according to the description information. Illustratively, the description information is: "this is one piece of debug information, which is a third piece of debug information; the length of the debugging parameter 1 is 1 byte, and the debugging parameter is used for representing the value of the information test data 1; the length of the debugging parameter 2 is 1 byte, and the debugging parameter is used for representing the value of the information test data 2, so that the number of the debugging parameters can be determined to be 2; the meaning of the 2 debug parameters is "value of information test data 1" and "value of information test data 2", respectively; the structure of 2 debugging parameters is a 1-byte numeric string.
And b, analyzing the debugging parameters according to the number, the structure and the meaning of the debugging parameters to obtain a debugging parameter analysis result. For example, when the debug data is: "00041234", debugging parameters are: when the value is "1234", the debugging parameter analysis result is: "the value of information test data 1 is 12 and the value of information test data 2 is 34".
And c, outputting debugging information corresponding to the software to be debugged according to the description information and the debugging parameter analysis result. As described in the above example, the description information is "this is one piece of debug information, this is the third piece of debug information; the length of the debugging parameter 1 is 1 byte, and the debugging parameter is used for representing the value of the information test data 1; the length of the debug parameter 2 is 1 byte, which is used to represent the value of the information test data 2, and the debug parameter analysis result is "the value of the information test data 1 is 12, the value of the information test data 2 is 34", and then the debug information output according to the description information and the debug parameter analysis result is "this is a piece of debug information, this is a third piece of positioning information, the value of the information test data 1 is 12, and the value of the information test data 2 is 34".
As an optional implementation manner of the embodiment of the present application, the debugging data further includes: and checking the information.
Optionally, as shown in fig. 3, when the debug data does not include the debug parameter, the debug data in the embodiment of the present application may be composed of a data header 31, positioning information 32, and check information 33, and the data header 31, the positioning information 32, and the check information 33 are sequentially arranged.
Optionally, as shown in fig. 4, when the debug data further includes debug parameters, the debug data in the embodiment of the present application may be composed of a data header 41, positioning information 42, debug parameters 43, and check information 44, and the data header 41, the positioning information 42, the debug parameters 43, and the check information 44 are sequentially arranged.
A second embodiment of the present application relates to a debugging information output method, in which an execution subject of the debugging information output method may debug an information analysis device, and the debugging information analysis device may be a server or other electronic devices. Referring to fig. 5, the debugging information output method includes the following steps S501 to S505:
s501, the debugging information analysis device obtains debugging data output when the software to be debugged is debugged. The debugging data comprises positioning information and checking information.
S502, the debugging information analysis device verifies whether the debugging data is correct or not according to the verification information.
Illustratively, data except for Check information in the debug data can be calculated through a Cyclic Redundancy Check (CRC) algorithm, a checksum algorithm, an exclusive-or Check algorithm, a custom algorithm and other Check algorithms, whether the debug data is correct or not is judged by verifying whether a calculation result is consistent with the Check information, and if the calculation result is consistent with the Check information, the debug data is determined to be correct; and if the calculation result is inconsistent with the check information, determining that the debugging data is wrong.
In the above step S502, if the debug data is wrong, step S503 is executed, and if the debug data is correct, the following steps S504 to S505 of the debug information output method are executed.
S503, the debugging information analysis device outputs reminding information for reminding the debugging data errors. Specifically, the reminding information may be one or a combination of more of sound information, photoelectric information, and image-text information on the display screen, and the embodiment of the present application does not limit the form of the reminding information.
And S504, the debugging information analysis device acquires the description information in the form of the text character string according to the positioning information and the configuration file.
And S505, the debugging information analysis device outputs debugging information corresponding to the software to be debugged based on the description information.
The implementation manner and the analysis description of steps S504 and S505 may refer to the implementation manner and the analysis description of steps S202 and S203 in the first embodiment of the present application, and are not described herein again.
Because the debug data in this embodiment further includes: the information is checked, after the debugging data is obtained, whether the debugging data is correct or not is verified according to the check information, and if the debugging data is wrong, reminding information for reminding the debugging data to be wrong is output, so that the embodiment can output the reminding information aiming at the wrong debugging data in time, and further avoid obtaining the wrong debugging information according to the wrong debugging data.
It should be noted that, in the above embodiment, it is described as an example that whether the debugging data is correct is verified according to the verification information, and then the description information is obtained according to the positioning information and the configuration file, but the present application is not limited thereto. That is, the description information may be obtained according to the positioning information and the configuration file, and then whether the debugging data is correct or not may be verified according to the verification information; or, whether the debugging data is correct or not can be verified according to the verification information, and then the description information can be obtained according to the positioning information and the configuration file, and the two steps can be carried out simultaneously. And verifying whether the debugging data is correct or not according to the verification information, and acquiring the description information according to the positioning information and the configuration file to timely output reminding information under the condition that the debugging data is wrong, so as to avoid acquiring wrong debugging information according to wrong debugging data.
In this embodiment, the debug data further includes category information, and the category information is used to indicate a category of the description information. In the step of acquiring the description information in the form of text character strings according to the positioning information and the configuration file, determining the category of the description information based on category information; determining a target corresponding relation set in a configuration file according to the type of the description information; the target corresponding relation set is a set formed by corresponding relations the same as the type of the description information; and acquiring description information according to the positioning information and the target corresponding relation set.
A third embodiment of the present application relates to a debug information output method, in which an execution subject of the debug information output method may be a debug information analysis device, and the debug information analysis device may be a server or other electronic devices. The specific flow is shown in fig. 6, and includes the following steps S601 to S605:
s601, debugging data output when debugging software to be debugged is obtained. The debugging data is a pure digital character string composed of at least one number, the debugging data comprises positioning information and category information, and the category information is used for indicating the category of the description information.
S602, determining the category of the description information based on the category information. Similarly, the correspondence relationship between the category information and the description information category may be stored in the form of a correspondence relationship table in the debug information analysis apparatus that implements the present embodiment.
In particular, the category information may be carried in the positioning information, that is, the positioning information may be set to include two or more data bits or bits, where data on one part of the data bits or bits indicates description information of the debugging information, and data on another part of the data bits or bits indicates a category of the description information. For example: for the positioning information "0001", wherein data "0" on the first data may be used to indicate the category of the description information, and data "001" on the remaining data is used to indicate the description information of the debugging information.
For example, when defining the category information as data on the first data bit of the positioning information, the corresponding relationship between the positioning information and the category of the description information may be as shown in table 4 below:
TABLE 4
Figure BDA0002660593400000121
As described in the example of table 4 above, the category of the description information may be determined to be category 1 when the positioning information is "0001" or "0002", the category of the description information may be determined to be category 2 when the positioning information is "1001", and the category of the description information may be determined to be category 3 when the positioning information is "2002".
S603, determining a target corresponding relation set in the configuration file according to the type of the description information.
And the target corresponding relation set is a set formed by corresponding relations the same as the type of the description information. Specifically, when editing the configuration file, according to the type of the description information, the corresponding relationships including the description information of the same type are placed in the same corresponding relationship set in the configuration file, and a type tag is set for each corresponding relationship set according to the type of the description information. And after the category of the description information is determined, determining a corresponding relation set with the category label being the same as the category of the description information as a target corresponding relation set.
S604, obtaining the description information according to the positioning information and the target corresponding relation set.
And S605, outputting debugging information corresponding to the software to be debugged based on the description information.
In the embodiment, when the description information in the form of the text string is obtained according to the positioning information and the configuration file, the target corresponding relationship set in the configuration file, which is the same as the type of the description information, can be determined according to the positioning information, and then the description information is obtained according to the positioning information and the target corresponding relationship set, so that interference of corresponding relationships of other types is avoided, and therefore, the efficiency of debugging information output can be improved.
The following describes a debugging information output method according to an embodiment of the present application by using several specific examples:
example 1: the debugging data is as follows: "0 x 3344000103", and the header data is: "0 x 3344", the positioning information is: 0001%, no debug parameter in the debug data, 03% of the check information, the correspondence between the header data and the debug system is as shown in table 3 above, and the header data is: the correspondence between the location information and the description information in the configuration file corresponding to "0 x 3344" is shown in table 1 above.
Firstly, calculating a check value of '0 x 33440001' based on a preset check algorithm, judging whether the calculated check value is '03', and if so, executing the subsequent steps; if not, outputting reminding information for reminding debugging data errors. If the calculated check value is "03", the debug system corresponding to the header data "0 x 3344" is determined to be 3 based on the correspondence between the header data and the debug system shown in table 3, and the applicable profile is profile C.
Then, based on the positioning information "0001" and the corresponding relationship between the positioning information and the description information, the description information is determined, such as: "this is a piece of debug information, which is the first piece of debug information".
And finally, outputting debugging information, wherein the debugging information is as follows: "this is a piece of debug information, which is the first piece of debug information".
Example 2: the debugging data is as follows: "0 x 33440003641306", header data is: "0 x 3344", the positioning information is: "0003", the debugging parameter is "6413", the verification information is "06", the correspondence between the header data and the debugging system is as shown in table 3 above, and the correspondence between the positioning information and the description information in the configuration file corresponding to the header data is "0 x 3344" is as shown in table 1 above.
Firstly, calculating a check value of '0 x 334400036413' based on a predetermined check algorithm, judging whether the calculated check value is '06', and if so, executing the subsequent steps; if not, outputting reminding information for reminding debugging data errors. If the calculated check value is "06", an applicable profile is determined based on the correspondence between the header data and the debug system shown in table 3 and the header data "0 x 3344".
Then, based on the corresponding relationship between the positioning information "0003" and the description information in the applicable configuration file, the description information is determined, such as: "this is one piece of debug information, which is a third piece of debug information; the length of the debugging parameter 1 is 1 byte, and the debugging parameter is used for representing the value of the information test data 1; debug parameter 2 is 1 byte in length and is used to represent the value of informative test data 2 ". Since the lengths of the debug parameter 1 and the debug parameter 2 are both 1 byte, it can be determined that the value of the debug parameter 1 is "64" and the value of the debug parameter 2 is "13", and the debug parameter is analyzed according to the number, structure and meaning of the debug parameter, and the obtained analysis result is: "the value of information test data 1 is 64 and the value of information test data 2 is 13".
Finally, according to the description information, "this is one piece of debugging information, which is the third piece of debugging information; the length of the debugging parameter 1 is 1 byte, and the debugging parameter is used for representing the value of the information test data 1; the debug parameter 2 is 1 byte long, and is used to indicate that the value of the information test data 2 "and the value of the analysis result" the value of the information test data 1 is 64, and the value of the information test data 2 is 13 "to output debug information: "this is one piece of debug information, which is a third piece of debug information; the value of the information test data 1 is 64, and the value of the information test data 2 is 13 ".
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present application relates to a debug information output apparatus, and as shown in fig. 7, a debug information output apparatus 700 includes:
the obtaining unit 71 is configured to obtain debugging data output when debugging the software to be debugged, where the debugging data includes positioning information.
The processing unit 72 is configured to obtain the description information according to the positioning information and the configuration file, where the configuration file includes a corresponding relationship between the positioning information and the description information.
And the output unit 73 outputs debugging information corresponding to the software to be debugged based on the description information.
Optionally, the debugging data is a pure digital character string composed of at least one number; the description information is a text character string.
Optionally, the debugging data further includes: a data header. The processing unit 72 is specifically configured to determine a target configuration file according to the data header; and acquiring the description information according to the positioning information and the target configuration file.
Optionally, the data header is used to indicate a debugging system to which the software to be debugged belongs. The processing unit 72 is specifically configured to determine, according to the data header, a debugging system to which the software to be debugged belongs; and determining the target configuration file according to the debugging system to which the software to be debugged belongs.
And the target configuration file is a configuration file corresponding to a debugging system to which the software to be debugged belongs.
Optionally, the data header is further configured to indicate whether the debug data further includes debug parameters; the output unit 73 is specifically configured to, when the data header indicates that the debug data does not include a debug parameter, output description information obtained according to the positioning information and the target configuration file as debug information corresponding to the software to be debugged; under the condition that the data header indicates that the debugging data comprises debugging parameters, acquiring the number, the structure and the meaning of the debugging parameters according to the description information, analyzing the debugging parameters according to the number, the structure and the meaning of the debugging parameters, acquiring a debugging parameter analysis result, and outputting the debugging information corresponding to the software to be debugged according to the description information and the debugging parameter analysis result.
Optionally, the debugging data may further include category information, where the category information is used to indicate a category of the description information; the processing unit 72 is specifically configured to determine a category of the description information based on the category information, determine a target correspondence set in the configuration file according to the category of the description information, and obtain the description information according to the positioning information and the target correspondence set; and the target corresponding relation set is a set formed by corresponding relations the same as the type of the description information.
Optionally, the category information is carried in the positioning information.
Optionally, the debugging data may further include: and checking the information. Referring to fig. 8, the software debugging apparatus 700 further includes:
a checking unit 74, configured to verify whether the debugging data is correct according to the checking information after the obtaining unit obtains the debugging data.
And a reminding unit 75, configured to output reminding information for reminding that the debug data is wrong when the verification unit determines that the verification unit is correct.
It should be understood that the present embodiment is an apparatus embodiment corresponding to the first to third embodiments, and can be implemented in cooperation with the first to third embodiments. The related technical details mentioned in the first to third embodiments are still valid in this embodiment, and are not described herein again to reduce repetition. That is, the debug information output apparatus provided in the embodiment of the present application can execute all the contents of the debug information output method provided in the above embodiment, so that the same technical effects can be achieved, and the technical effects that can be achieved by the debug information output apparatus are not described herein again.
It should be noted that, all the modules involved in this embodiment are logic modules, and in practical application, one logic unit may be one physical unit, may also be a part of one physical unit, and may also be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, a unit that is not so closely related to solving the technical problem proposed by the present application is not introduced in the present embodiment, but it does not indicate that no other unit exists in the present embodiment.
The fifth embodiment of the present application further provides a software debugging device. Fig. 9 is a schematic structural diagram of a software debugging device, and as shown in fig. 9, the software debugging device provided in this embodiment includes: a processor 91, a memory 92 and a computer program stored on the memory and executable on the processor, the computer program implementing the debugging information output method of the above method embodiments when executed by the processor.
Where the memory 92 and the processor 91 are coupled in a bus, the bus may comprise any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 91 and the memory 92 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The communication interface may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium. The data processed by the processor 91 is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor 91.
The processor 91 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory 92 may be used to store data used by the processor 91 in performing operations.
A sixth embodiment of the present application also provides a computer-readable storage medium storing a computer program. The computer program implements the debug information output method described in the first to third embodiments above when executed by the processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the present application, and that various changes in form and details may be made therein without departing from the spirit and scope of the present application in practice.

Claims (13)

1. A debug information output method, comprising:
acquiring debugging data output when debugging software to be debugged, wherein the debugging data comprises positioning information;
obtaining description information according to the positioning information and a configuration file, wherein the configuration file comprises a corresponding relation between the positioning information and the description information;
and outputting debugging information corresponding to the software to be debugged based on the description information.
2. The method of claim 1, wherein the debug data is a purely digital string of at least one number; the description information is a text character string.
3. The method of claim 1, wherein the debug data further comprises: a data header;
the obtaining the description information according to the positioning information and the configuration file comprises:
determining a target configuration file according to the data header;
and acquiring the description information according to the positioning information and the target configuration file.
4. The method of claim 3, wherein the data header is used to indicate a debugging system to which the software to be debugged belongs; the determining a target profile according to the data header includes:
determining a debugging system to which the software to be debugged belongs according to the data header;
and determining the target configuration file according to the debugging system to which the software to be debugged belongs, wherein the target configuration file is a configuration file corresponding to the debugging system to which the software to be debugged belongs.
5. The method of claim 3, wherein the data header is further configured to indicate whether the debug data further comprises debug parameters;
the outputting of the debugging information corresponding to the software to be debugged based on the description information includes:
and if the data header indicates that the debugging data does not comprise debugging parameters, outputting the description information acquired according to the positioning information and the target configuration file as debugging information corresponding to the software to be debugged.
6. The method according to claim 5, wherein outputting debugging information corresponding to the software to be debugged based on the description information further comprises:
if the data header indicates that the debugging data also comprises debugging parameters, acquiring the number, the structure and the meaning of the debugging parameters according to the description information;
analyzing the debugging parameters according to the number, the structure and the meaning of the debugging parameters to obtain a debugging parameter analysis result;
and outputting debugging information corresponding to the software to be debugged according to the description information and the debugging parameter analysis result.
7. The method of claim 1, wherein the debug data further comprises: checking the information;
after obtaining the debug data, the method further comprises:
verifying whether the debugging data is correct or not according to the verification information;
and if the debugging data is wrong, outputting reminding information for reminding the debugging data to be wrong.
8. The method of claim 1, wherein the debug data further comprises: category information indicating a category of the description information;
the obtaining the description information according to the positioning information and the configuration file comprises:
determining a category of the description information based on the category information;
determining a target corresponding relation set in the configuration file according to the type of the description information; the target corresponding relation set is a set formed by corresponding relations with the same type as the description information;
and acquiring the description information according to the positioning information and the target corresponding relation set.
9. The method of claim 8, wherein the category information is carried in the positioning information.
10. The method according to any one of claims 1 to 9, wherein the debug information output method is applied to a debug information parsing apparatus;
the acquiring of the debugging data output when the software to be debugged is debugged includes:
acquiring debugging data output by a chip when the chip runs the software to be debugged;
the obtaining the description information according to the positioning information and the configuration file comprises:
and acquiring the description information according to the positioning information and the stored configuration file.
11. A debug information output apparatus, comprising:
the debugging device comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring debugging data output when software to be debugged is debugged, and the debugging data comprises positioning information;
the processing unit is used for acquiring description information according to the positioning information and a configuration file, wherein the configuration file comprises the corresponding relation between the positioning information and the description information;
and the output unit outputs debugging information corresponding to the software to be debugged based on the description information.
12. A software debugging device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the debug information output method of any of claims 1 to 10.
13. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the debug information output method of any one of claims 1 to 10.
CN202010903535.5A 2020-09-01 2020-09-01 Debugging information output method and device, software debugging equipment and storage medium Pending CN114116439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010903535.5A CN114116439A (en) 2020-09-01 2020-09-01 Debugging information output method and device, software debugging equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010903535.5A CN114116439A (en) 2020-09-01 2020-09-01 Debugging information output method and device, software debugging equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114116439A true CN114116439A (en) 2022-03-01

Family

ID=80360322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010903535.5A Pending CN114116439A (en) 2020-09-01 2020-09-01 Debugging information output method and device, software debugging equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114116439A (en)

Similar Documents

Publication Publication Date Title
CN111428462B (en) Communication protocol template construction method and terminal equipment
CN111459982A (en) Data query method and device, terminal device and storage medium
US20090128570A1 (en) Method And System For Automatically Analyzing GPU Test Results
CN110633198A (en) Block chain-based software test data storage method and system
CN109271315B (en) Script code detection method, script code detection device, computer equipment and storage medium
JP2018505506A (en) Machine-based instruction editing
CN112380046B (en) Calculation result verification method, system, device, equipment and storage medium
CN103761095B (en) Method for generating universal upgrade file head data information
CN109165209A (en) The data verification method, device of object type, equipment and medium in database
CN111176991A (en) Automatic generation method for embedded software interface use case
CN112817935A (en) Data processing method, device and equipment based on field type and storage medium
CN111338869B (en) Configuration parameter management method, device, equipment and storage medium
CN112948233A (en) Interface testing method, device, terminal equipment and medium
CN114860531A (en) Fault detection method and device for security chip, electronic equipment and medium
CN109783287B (en) Test instruction generation method, system, terminal and medium based on configuration file
CN114091383A (en) Test sequence generation method, device and system and related equipment
CN110297926B (en) On-orbit configuration method of satellite-borne image processing device
CN114116439A (en) Debugging information output method and device, software debugging equipment and storage medium
CN115657981A (en) Method for setting print level of print information in authentication environment and authentication method
CN112417020B (en) Service expansion realization method, device, computer equipment and storage medium
CN113296835B (en) Program script migration method, device, computer equipment and storage medium
CN114780420A (en) Method, device, equipment and storage medium for automatic test based on test case
CN114564336A (en) Data consistency checking method, device, equipment and storage medium
US11144287B2 (en) Compile time validation of programming code
WO2021183382A1 (en) Graph-based method for inductive bug localization

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