CN112764761A - Program interruption file analysis method, storage medium, electronic device and system - Google Patents

Program interruption file analysis method, storage medium, electronic device and system Download PDF

Info

Publication number
CN112764761A
CN112764761A CN202110111213.1A CN202110111213A CN112764761A CN 112764761 A CN112764761 A CN 112764761A CN 202110111213 A CN202110111213 A CN 202110111213A CN 112764761 A CN112764761 A CN 112764761A
Authority
CN
China
Prior art keywords
file
path
program
dragged
dragging
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
CN202110111213.1A
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN202110111213.1A priority Critical patent/CN112764761A/en
Publication of CN112764761A publication Critical patent/CN112764761A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a program interruption file analysis method, a storage medium, electronic equipment and a system, and relates to the field of application development of an internet mobile terminal. The method comprises the following steps: when a file related to analysis is dragged into a preset dragging resolver, the dragging resolver acquires the content of the dragged file, wherein the file related to analysis comprises a program interruption file and a code address table file; acquiring an address array of the dragged file according to the content of the dragged file; finding out the path of the program interrupt file and the path of the code address table file from the address array of the file; and analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file. The method and the device can conveniently realize the analysis of the program interruption file, have low requirement on the professional performance of operation, have strong reliability and high efficiency, and can meet the requirement of practical application.

Description

Program interruption file analysis method, storage medium, electronic device and system
Technical Field
The invention relates to the field of application development of an internet mobile terminal, in particular to a program interruption file analysis method, a storage medium, electronic equipment and a system.
Background
In the development of programs on the internet mobile terminal, a phenomenon of program interruption usually occurs. When a program interrupt occurs, a program interrupt file is generated. In the program interrupt file, the main program interrupt information is a sequence of pointers of functions, and the function pointers are the sequence of function calls of the program, that is, the call records of the functions. Since a sequence of pointers appears after the program is interrupted, it is not known exactly where the program is interrupted, and therefore, in order to know where the program is interrupted, the program interruption file needs to be parsed.
Currently, the conventional resolution scheme is: after elements such as a program interrupt analysis tool, a program interrupt log, and a code address table of an application program (the code address table is a one-to-one correspondence relationship between a function address of the program and a function name, and each function address corresponds to what function is executed in the code address table) which are carried by the system are placed in a folder, a terminal needs to be opened and a command needs to be input for many times to analyze what the function corresponding to the pointer corresponds.
As can be seen from the above analysis operations, the conventional analysis method has at least the following disadvantages:
1) the analysis operation is realized by setting parameters through a command line, so that the operation has high professional requirements and cannot be generally used;
2) the number of operations needing manual participation is large, so that the error rate is high and the efficiency is low; sometimes, in order to avoid errors, it is necessary to repeatedly check whether the parameters in the command are correctly input, and the use is inconvenient.
Disclosure of Invention
The present invention is directed to overcome the above-mentioned drawbacks of the background art, and provides a method, a storage medium, an electronic device, and a system for analyzing a program interruption file, which can conveniently and quickly analyze the program interruption file, and have the advantages of low requirement on the professional operation, high reliability, and high efficiency, and meet the requirements of practical applications.
To achieve the above object, in a first aspect, an embodiment of the present invention provides a method for parsing an interrupt file, including:
when a file related to analysis is dragged into a preset dragging resolver, the dragging resolver acquires the content of the dragged file, and the file related to analysis comprises a program interruption file and a code address table file;
acquiring an address array of the dragged file according to the content of the dragged file;
finding out the path of the program interrupt file and the path of the code address table file from the address array of the file;
and analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
As a preferred embodiment, the method for acquiring the content of the dragged file by the drag parser specifically includes the following operations:
the dragging parser calls a preset dragging file list function; constructing a dragging monitor for monitoring a clipboard object when the dragging file list function is initialized;
when a dragging event occurs, the dragging file list function acquires a monitored clipboard object and triggers a preset function to be dragged at the same time; the preset function to be dragged acquires the content of the clipboard, extracts the content of the dragged file from the clipboard, and then throws the content of the dragged file out of the dragging resolver.
As a preferred embodiment, the obtaining an address array of the dragged file according to the content of the dragged file specifically includes the following operations:
after monitoring the content of the thrown dragged file, the dragging resolver calls a preset dragging function; the preset dragging function traverses the dragged file according to the content of the dragged file; if the file is the program interruption file, the address of the file is saved in the address array of the program interruption file, and if the file is the code address table file, the address of the file is saved in the address array of the code address table file.
As a preferred embodiment, finding out the path of the program interrupt file and the path of the code address table file from the address array of the file specifically includes the following operations:
setting a predefined program interrupt file path variable as nil, and clearing the existing code address table file path variable;
acquiring an address array of the file, and traversing variables in the address array of the file;
in the traversal process, according to whether the suffix is bengkui or not, finding out a program interruption file and obtaining a corresponding path, storing the path into the path variable of the program interruption file, and according to whether the suffix is DSYM or not, finding out a code address table file and obtaining a corresponding path, and storing the path into the path variable of the code address table file.
As a preferred embodiment, the analyzing of the program interruption information according to the path of the program interruption file and the path of the code address table file specifically includes the following operations:
the dragging resolver calls a preset program interrupt information resolving function;
after the preset program interruption information analysis function is called, a pipeline pip is created, a file management attribute FHANDLeReading of the pipeline pip is obtained through the pipeline pip, and a pipeline file F is obtained by utilizing the file management attribute FHANDLeReading;
creating an analysis task for the analysis pipeline to execute the asynchronous task;
acquiring a path of an analysis tool carried by a system development tool, and judging whether the acquired path exists or not;
if the path exists, assigning the acquired path of the development analysis tool to an analysis task;
acquiring a path of a program interrupt file and a path of a code address table file, and transmitting the paths to the analysis task by using a system set method;
setting an environment variable, wherein the environment variable is a dictionary type; setting key of the environment variable as DEVELOPER _ DIR, and setting value of the environment variable as development tool DEVELOPER;
calling a system launch function of the analysis task to complete the analysis of program interruption information;
and transmitting the analyzed program interruption information to the pipeline file F.
As a preferred embodiment, the method further comprises the following operations: and outputting the analyzed program interruption information, and splicing the paths of the program interruption files into log files for outputting.
As a preferred embodiment, the method for splicing the paths of the program interruption files into log files for output specifically includes the following operations:
creating an asynchronous thread, and completing log file splicing in the asynchronous thread;
calling a path processing function stringByDeleting PathExetion of the system, and deleting an extension name from the last part of the file;
calling a path processing function stringByAppendingPathExtemion of the system, and adding an extension of a log file to the last component of the existing path;
and splicing the paths of the program interrupt files according to a character string splicing method.
In a second aspect, an embodiment of the present invention provides a program interruption file parsing system, which includes a preset drag parser; the preset dragging resolver comprises:
the file content acquisition module is used for acquiring the content of a dragged file when dragging a file related to analysis to a preset dragging analyzer, wherein the file related to analysis comprises a program interruption file and a code address table file;
an address array obtaining module, configured to obtain an address array of the dragged file according to the content of the dragged file;
the path searching module is used for searching a path of a program interrupt file and a path of a code address table file from the address array of the file;
and the analysis processing module is used for analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
In a third aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method in the first aspect.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement the method in the first aspect.
The invention has the beneficial effects that:
in the whole analysis process, a user only needs to drag one operation of the related file, and other operations are automatically completed by the interior of the dragging analyzer, so that the operation steps of manual participation are greatly reduced, the professional requirement of the operation is low (the user does not need to set parameters through a command line), the manual operation is automatically completed by a program, the reliability is high, the operation efficiency is improved, and the actual application requirement is met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings corresponding to the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for parsing a program interruption file according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for parsing a program interruption file according to an embodiment of the present invention.
In the figure: 10-file content acquisition module, 20-address array acquisition module, 30-path searching module and 40-analysis processing module.
Detailed Description
The method aims to solve the problems that in the prior art, a conventional program interruption file analysis method is adopted, the professional requirement of operation is high, the method cannot be generally used, the error rate of manual operation is high, the efficiency is low and the like. The invention aims to provide a program interruption file analysis method, a storage medium, an electronic device and a system, which can conveniently realize analysis of a program interruption file, have low requirement on the professional operation, strong reliability and high efficiency, and meet the requirements of practical application.
In order to achieve the technical effects, the main design idea of the invention is as follows:
when a file related to analysis is dragged into a preset dragging resolver, the dragging resolver acquires the content of the dragged file, and the file related to analysis comprises a program interruption file and a code address table file;
acquiring an address array of the dragged file according to the content of the dragged file;
finding out the path of the program interrupt file and the path of the code address table file from the address array of the file;
and analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
In summary, according to the present embodiment, a preset custom drag parser is used to automatically complete a series of operations such as obtaining the content of the dragged file, obtaining the address array of the dragged file, searching the path of the program interrupt file and the code address table file, and parsing the program interrupt information according to the method of this embodiment. The whole process only needs the user to drag one operation of the related file, and other operations are automatically completed by the internal dragging resolver, so that the operation steps of manual participation are greatly reduced, the professional requirement of the operation is low (the user is not required to set parameters through a command line), the manual operation is automatically completed by a program, the reliability is high, the operation efficiency is improved, and the actual application requirement is met.
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
However, it should be noted that: the examples to be described next are only some specific examples, and are not intended to limit the embodiments of the present invention necessarily to the following specific steps, values, conditions, data, orders, and the like. Those skilled in the art can, upon reading this specification, utilize the concepts of the present invention to construct more embodiments than those specifically described herein.
Example one
Referring to fig. 1, the present embodiment provides a method for parsing a program interrupt file, where the method includes the following steps:
step S1, when dragging the file related to analysis to a preset dragging resolver, the dragging resolver acquires the content of the dragged file, and the file related to analysis comprises a program interruption file and a code address table file.
It can be understood that, in the present embodiment, a drag parser is designed in advance, and the drag parser can be implemented by inheriting a View component and building a delete (proxy) inside the component. When a user drags a file related to analysis to a corresponding interface of the dragging resolver, the dragging resolver acquires the content of the dragged file, and then the dragging resolver automatically completes a series of operations such as acquisition of an address array of the file, path search of a program interruption file and a code address table file, analysis of program interruption information and the like according to the method of the embodiment. The whole process only needs the user to drag one operation of the related file, and other operations are automatically completed by the internal dragging resolver, so that the operation steps of manual participation are greatly reduced, the professional requirement of the operation is low (the user is not required to set parameters through a command line), the manual operation is automatically completed by a program, the reliability is high, the operation efficiency is improved, and the actual application requirement is met.
Further, as an optional implementation manner, in step S1, the obtaining, by the drag parser, the content of the dragged file specifically includes the following operations:
s101, calling a preset dragging file list function by the dragging resolver; and constructing a dragging monitor for monitoring the clipboard object when the function of the dragging file list is initialized.
In specific implementation, a preset drag file list function can be defined as dragviewFList, and the main function of the drag file list function is to receive a dragged target file and acquire the content of the dragged target file; the function requires an array type parameter, which may be defined as FList, to store the dragged object file list. In addition, in order to monitor the clipboard object, a drag monitor is constructed in the initialization method of the drag file list function, and the drag monitor can be defined as a register ForDraggedTypes and is of an array type.
S102, when a dragging event occurs, the dragging file list function acquires a monitored clipboard object, and simultaneously triggers a preset function to be dragged; the function acquires the content of the clipboard, extracts the content of the dragged file from the clipboard, and finally throws the content of the dragged file out of the dragging parser.
In particular implementations, the pre-defined function to be dragged may be defined as prepareForDragOperation. The function prepareForDragOperation may define the contents of the clipboard obtained by the wrapper zwrapper [ sender tagging ] clipboard. Wherein, sender represents a button, and draggingPasteBoard represents a function method for obtaining the clipboard, and the method is self-carried by the system; the clipboard is a type of clipboard, and zclipboard is a final clipboard for saving the contents of the acquired clipboard. In addition, the function prepareForDragOperation can also realize that the content of the dragged file is extracted from the clipboard through the existing system function. For example, taking IOS as an example, the extraction of the content of the dragged file from the clipboard can be realized by a system function zPasteboard propertyListForType, FnamesPaardType; specifically, the system function is to extract the content of the dragged file from the clipboard according to the file name in the clipboard, wherein propertyListForType is the name of the method for extracting the dragged file from the clipboard, and FnamesPaardType is a parameter of the method, and represents that the file name of the file in the clipboard is imported into the method as an argument. Finally, when the content of the dragged file is thrown out, a monitoring judgment mode can be adopted: firstly, judging whether an agent exists or not and whether the agent dragging the file complies with a dragViewF method or not; if the above condition is satisfied, indicating that the function of monitoring is provided (a drag monitor is constructed in the previous step S101 for monitoring the clipboard object), the agent dragging the file executes the dragViewF method according to the list of the drag file, so as to throw out the monitored content (i.e., the content of the dragged file in the clipboard that is monitored). The specific implementation code may be as follows:
Figure BDA0002918956010000091
wherein, if lf, delete & [ release. delete response to selector: @ selector (dragViewF:) ] is the function of judging whether the monitoring is provided; delete is the agent that drags the file, respondToSelector is the agent that judges whether the agent obeys dragViewF method; release drag view f list is to let the agent release to execute the drag view f method, the required parameter is list, thus throwing the snooped content to the subsequent operation. It can be understood that the judgment of the monitoring function is performed first, and the agent executes the corresponding method after the judgment is passed, so that the reliability of the operation can be effectively ensured.
And step S2, acquiring an address array of the dragged file according to the content of the dragged file.
In this embodiment, a preset dragging parser may automatically obtain an address array of a dragged file according to the content of the dragged file, and prepare for subsequent file parsing. Compared with the traditional method for realizing operation by inputting complicated setting parameters by using a command line tool, the method for automatically realizing the acquisition operation of the address array of the file by dragging the resolver is simpler and more efficient in operation.
Further, as an alternative implementation, step S2 includes the following operations:
after monitoring the content of the thrown dragged file, the dragging resolver calls a preset dragging function; the dragging function traverses the dragged file according to the content of the dragged file; if the file is the program interruption file, the address of the file is saved in the address array of the program interruption file, and if the file is the code address table file, the address of the file is saved in the address array of the code address table file.
Through the operation, the address of the dragged file (the program interrupt file and the code address table file) can be acquired and stored in the address array, so that the file path can be acquired for use later. In addition, the preset dragging function is automatically triggered by monitoring, and the operation is carried out without inputting parameters by using a command line tool, so that the method is more convenient and efficient.
For example, in an embodiment, the preset drag function may be defined as prepareddrag, and the specific execution code may be as follows:
Figure BDA0002918956010000101
step S3, finding out the path of the program interrupt file and the path of the code address table file from the address array of the file.
Specifically, as an optional implementation manner, step S3 specifically includes the following operations:
s301, setting a predefined program interrupt file path variable (such as pathBengkui) to nil (null), and clearing an existing code address table file path variable (such as PathDSYM). In practical application, in order to make user experience better, user prompt information similar to 'wait for processing, please wait for' can be given on an interface for dragging the resolver at the same time, and specific prompt information content can be set according to needs, and is not limited in detail here.
S302, acquiring an address array of the file, and traversing variables in the address array; in the traversal process, according to whether the suffix is bengkui, finding out the program interrupt file and obtaining a corresponding path, storing the path into a program interrupt file path variable (such as pathBengkui), and simultaneously, according to whether the suffix is DSYM, finding out the code address table file and obtaining a corresponding path, and storing the path into a code address table file path variable (such as PathDSYM).
Further, as a preferred embodiment, the following operations are further included after the above operations:
1) judging whether the length of a path variable (such as pathBengkui) of a current program interruption file is 0, if so, indicating that the program interruption file does not exist, popping up a prompt box alert to inform that the program interruption does not exist; otherwise, turning to the step 2);
2) judging whether the length of a current code address table file path variable (such as PathDSYM) is 0, if so, indicating that the code address table file does not exist, popping up a prompt box alert to inform that the code address table file does not exist; otherwise, it indicates that both the program interrupt file and the code address table file exist, and then the process proceeds to step S4. In actual application, in order to improve user experience, user prompt information similar to "start analysis" may be provided on the interface where the parser is currently dragged, and specific prompt information content may be set as required, which is not limited in this time.
The preferred embodiment adds the checking operation of the program interrupt file and the code address table file, can inform the user in time when the file is lacked, avoids the failure of subsequent analysis, and further ensures the reliability of the operation.
In step S4, the program interruption information is analyzed based on the path of the program interruption file and the path of the code address table file.
Specifically, as an alternative implementation, step S4 includes the following operations:
s401, calling a preset self-defined program interruption information analysis function (such as AnalysimsgBengkui) by the dragging analyzer, wherein the function is used for realizing analysis of program interruption information;
s402, after the program interruption information analysis function is called, a pipeline pip is created, a file management attribute FHANDLeReading of the pipeline pip is obtained through the pipeline pip, and a pipeline file F is obtained by utilizing the file management attribute FHANDLeReading;
s403, the program interrupt information analysis function creates an analysis task (such as an analysistask) for analyzing a pipeline to execute an asynchronous task;
s404, acquiring a path of an analysis tool carried by the system development tool, judging whether the acquired path exists, if so, continuing to operate, and turning to the step S405; otherwise, informing the user that the analysis tool cannot be found, and ending the operation; it can be understood that, since the storage location of the analysis tool carried by the system development tool is relatively fixed, a path such as launchPath can be directly fixed;
s405, assigning the acquired path for developing the analysis tool to an analysis task (such as analysttask);
s406, acquiring a path of a program interrupt file and a path of a code address table file, and transmitting the paths to an analysis task (such as an analystask) by using a system set method; for example, in practical application, the obtained path of the program interrupt file and the path of the code address table file can be assembled in an array, and then the array is transmitted to an analysis task by using a system set method;
s407, setting an environment variable, wherein the environment variable is a dictionary type; setting key of the environment variable as DEVELOPER _ DIR, and setting value of the environment variable as development tool DEVELOPER;
s408, calling a launch function (an existing system function) of the analysis task to finish analysis of program interruption information;
and S409, transmitting the analyzed program interruption information to the pipeline file F. It can be understood that the program interruption information after the completion of the parsing is effective crash information of the completion of the parsing.
It can be understood that the conventional parsing scheme for the program interrupt file requires opening a command line and using the command line to parse the file. In this embodiment, the steps S402 to S409 are automatically executed to analyze the program interruption information by using a custom program interruption information analysis function; in addition, the file is analyzed through a pipeline method and environment variables in the analysis process, the analysis is completed by purely utilizing the characteristics of an application program, a user does not need to know the specific analysis process, and the user does not need to use a complicated analysis command line or set parameters, so that the analysis is convenient, efficient and high in reliability.
Further, as a preferred embodiment, after step S4, the method further includes the following operations: and outputting the analyzed program interruption information, and splicing the paths of the program interruption files into log files for outputting.
Specifically, in practical application, when the analyzed program interruption information is output, a file is read from the pipeline file F, the read file is data, the data is encoded and output to form complete program interruption information, and the program interruption information is output to the console so that a user can check and use the program interruption information.
More specifically, in practical application, splicing paths of program interrupt files into log files for output specifically includes the following operations:
1) and creating an asynchronous thread, and completing log file splicing in the asynchronous thread. In specific implementation, a dispatch _ async (dispatch _ get _ main _ queue (), { }) method can be used to create an asynchronous thread; wherein dispatch _ get _ main _ queue () represents a main thread, and dispatch _ async represents a created asynchronous thread. The log file is spliced in an asynchronous processing mode, so that the output of the final file is not blocked, and the use experience is better.
2) Calling a path processing function stringByDeleting PathExetion of the system, and deleting the extension name from the last part of the file (namely deleting the original extension name bengkui); in a specific implementation, the code may be self.
3) Calling a path processing function stringByAppendingPathExtemion of the system, and adding an extension of a log file to the last component of the existing path; in a specific implementation, the code may be stringByAppendingPathExition @ "log". The extension name of the file path can be processed through the step 2) and the step 3) so as to realize the processing of the file path, and the path is conveniently spliced subsequently.
4) Splicing the paths of the program interrupt files according to a character string splicing method; in specific implementation, the adopted character String splicing method is that _ Lg [ _ LgstringByAppendingString ] [ String stringWithFormat, lgFPath ] ], and the function is to splice the path parameter lgFPath of the program interruption file into the current log file parameter _ Lg according to the format of the String stringWithFormat, and assign the current log file parameter _ Lg to the parameter _ Lg, so that the assigned parameter _ Lg obtains a spliced log file. The file paths can be spliced into a complete log file name through the step 4), and the file paths are spliced according to a character string splicing method, so that the processing is simple and efficient, and the reliability is high.
As can be seen from the operations in the steps S1 to S4, according to the present embodiment, a preset custom drag parser is used to automatically complete a series of operations such as obtaining the content of the dragged file, obtaining the address array of the dragged file, searching the paths of the program interruption file and the code address table file, and parsing the program interruption information according to the method of the present embodiment. The whole process only needs the user to drag one operation of the related file, and other operations are automatically completed by the internal dragging resolver, so that the operation steps of manual participation are greatly reduced, the professional requirement of the operation is low (the user is not required to set parameters through a command line), the manual operation is automatically completed by a program, the reliability is high, the operation efficiency is improved, and the actual application requirement is met.
Example two
Based on the same inventive concept, as shown in fig. 2, a second embodiment of the present invention provides a program interruption file parsing system, which includes a preset drag parser; the preset dragging resolver comprises:
a file content obtaining module 10, configured to obtain content of a dragged file when dragging a file related to parsing into a preset dragging parser, where the file related to parsing includes a program interruption file and a code address table file;
an address array obtaining module 20, configured to obtain an address array of the dragged file according to the content of the dragged file;
a path searching module 30, configured to search a path of the program interrupt file and a path of the code address table file from the address array of the file;
and an analysis processing module 40 for analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
Various modifications and specific examples in the foregoing method embodiments are also applicable to the system of the present embodiment, and the detailed description of the method is clear to those skilled in the art, so that the detailed description is omitted here for the sake of brevity.
EXAMPLE III
Based on the same inventive concept, a third embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a program package installation method as provided in any of the embodiments of the present invention, the method including:
when a file related to analysis is dragged into a preset dragging resolver, the dragging resolver acquires the content of the dragged file, and the file related to analysis comprises a program interruption file and a code address table file;
acquiring an address array of the dragged file according to the content of the dragged file;
finding out the path of the program interrupt file and the path of the code address table file from the address array of the file;
and analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Example four
Based on the same inventive concept, a fourth embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the first embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Generally, the program interruption file analysis method, the storage medium, the electronic device and the system provided by the embodiment of the invention can conveniently realize analysis of the program interruption file, have low professional requirement on operation, have high reliability and high efficiency, and can meet the requirements of practical application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Note that: the above-described embodiments are merely examples and are not intended to be limiting, and those skilled in the art can combine and combine some steps and devices from the above-described separately embodiments to achieve the effects of the present invention according to the concept of the present invention, and such combined and combined embodiments are also included in the present invention, and such combined and combined embodiments are not described herein separately.
Advantages, effects, and the like, which are mentioned in the embodiments of the present invention, are only examples and are not limiting, and they cannot be considered as necessarily possessed by the various embodiments of the present invention. Furthermore, the foregoing specific details disclosed herein are merely for purposes of example and for purposes of clarity of understanding, and are not intended to limit the embodiments of the invention to the particular details which may be employed to practice the embodiments of the invention.
The block diagrams of devices, apparatuses, systems involved in the embodiments of the present invention are only given as illustrative examples, and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. As used in connection with embodiments of the present invention, the terms "or" and "refer to the term" and/or "and are used interchangeably herein unless the context clearly dictates otherwise. The word "such as" is used in connection with embodiments of the present invention to mean, and is used interchangeably with, the word "such as but not limited to".
The flow charts of steps in the embodiments of the present invention and the above description of the methods are merely illustrative examples and are not intended to require or imply that the steps of the various embodiments must be performed in the order presented. As will be appreciated by those skilled in the art, the order of the steps in the above embodiments may be performed in any order. Words such as "thereafter," "then," "next," etc. are not intended to limit the order of the steps; these words are only used to guide the reader through the description of these methods. Furthermore, any reference to an element in the singular, for example, using the articles "a," "an," or "the" is not to be construed as limiting the element to the singular.
In addition, the steps and devices in the embodiments of the present invention are not limited to be implemented in a certain embodiment, and in fact, some steps and devices in the embodiments of the present invention may be combined according to the concept of the present invention to conceive new embodiments, and these new embodiments are also included in the scope of the present invention.
The respective operations in the embodiments of the present invention may be performed by any appropriate means capable of performing the corresponding functions. The means may comprise various hardware and/or software components and/or modules including, but not limited to, hardware circuitry or a processor.
The method of an embodiment of the invention includes one or more acts for implementing the method described above. The methods and/or acts may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of actions is specified, the order and/or use of specific actions may be modified without departing from the scope of the claims.
Various changes, substitutions and alterations to the techniques described herein may be made by those skilled in the art without departing from the techniques of the teachings as defined by the appended claims. Moreover, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. Processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the invention to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof. And those not described in detail in this specification are within the skill of the art.

Claims (10)

1. A program interruption file analysis method is characterized by comprising the following steps:
when a file related to analysis is dragged into a preset dragging resolver, the dragging resolver acquires the content of the dragged file, and the file related to analysis comprises a program interruption file and a code address table file;
acquiring an address array of the dragged file according to the content of the dragged file;
finding out the path of the program interrupt file and the path of the code address table file from the address array of the file;
and analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
2. The method for parsing an interrupted file according to claim 1, wherein the extracting the content of the extracted file by the extracting parser specifically includes the following operations:
the dragging parser calls a preset dragging file list function; constructing a dragging monitor for monitoring a clipboard object when the dragging file list function is initialized;
when a dragging event occurs, the dragging file list function acquires a monitored clipboard object and triggers a preset function to be dragged at the same time; the preset function to be dragged acquires the content of the clipboard, extracts the content of the dragged file from the clipboard, and then throws the content of the dragged file out of the dragging resolver.
3. The method for parsing an interrupted file according to claim 2, wherein obtaining an address array of the dragged file according to the content of the dragged file specifically comprises the following operations:
after monitoring the content of the thrown dragged file, the dragging resolver calls a preset dragging function; the preset dragging function traverses the dragged file according to the content of the dragged file; if the file is the program interruption file, the address of the file is saved in the address array of the program interruption file, and if the file is the code address table file, the address of the file is saved in the address array of the code address table file.
4. The method for parsing an interrupted file according to claim 1, wherein the finding of the path of the interrupted file and the path of the code address table file from the address array of the file comprises the following operations:
setting a predefined program interrupt file path variable as nil, and clearing the existing code address table file path variable;
acquiring an address array of the file, and traversing variables in the address array of the file;
in the traversal process, according to whether the suffix is bengkui or not, finding out a program interruption file and obtaining a corresponding path, storing the path into the path variable of the program interruption file, and according to whether the suffix is DSYM or not, finding out a code address table file and obtaining a corresponding path, and storing the path into the path variable of the code address table file.
5. The method for parsing an interrupted program file according to claim 1, wherein parsing the interrupted program information according to a path of the interrupted program file and a path of a code address table file comprises the following operations:
the dragging resolver calls a preset program interrupt information resolving function;
after the preset program interruption information analysis function is called, a pipeline pip is created, a file management attribute FHANDLeReading of the pipeline pip is obtained through the pipeline pip, and a pipeline file F is obtained by utilizing the file management attribute FHANDLeReading;
creating an analysis task for the analysis pipeline to execute the asynchronous task;
acquiring a path of an analysis tool carried by a system development tool, and judging whether the acquired path exists or not;
if the path exists, assigning the acquired path of the development analysis tool to an analysis task;
acquiring a path of a program interrupt file and a path of a code address table file, and transmitting the paths to the analysis task by using a system set method;
setting an environment variable, wherein the environment variable is a dictionary type; setting key of the environment variable as DEVELOPER _ DIR, and setting value of the environment variable as development tool DEVELOPER;
calling a system launch function of the analysis task to complete the analysis of program interruption information;
and transmitting the analyzed program interruption information to the pipeline file F.
6. The method for parsing an interrupt file according to claim 1, further comprising the operations of:
and outputting the analyzed program interruption information, and splicing the paths of the program interruption files into log files for outputting.
7. The method for parsing an interrupted file according to claim 6, wherein the step of splicing the paths of the interrupted file into a log file and outputting the log file comprises the following steps:
creating an asynchronous thread, and completing log file splicing in the asynchronous thread;
calling a path processing function stringByDeleting PathExetion of the system, and deleting an extension name from the last part of the file;
calling a path processing function stringByAppendingPathExtemion of the system, and adding an extension of a log file to the last component of the existing path;
and splicing the paths of the program interrupt files according to a character string splicing method.
8. A storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that runs on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1 to 7.
10. A program interruption file analysis system is characterized by comprising a preset dragging analyzer; the preset dragging resolver comprises:
the file content acquisition module is used for acquiring the content of a dragged file when dragging a file related to analysis to a preset dragging analyzer, wherein the file related to analysis comprises a program interruption file and a code address table file;
an address array obtaining module, configured to obtain an address array of the dragged file according to the content of the dragged file;
the path searching module is used for searching a path of a program interrupt file and a path of a code address table file from the address array of the file;
and the analysis processing module is used for analyzing the program interruption information according to the path of the program interruption file and the path of the code address table file.
CN202110111213.1A 2021-01-27 2021-01-27 Program interruption file analysis method, storage medium, electronic device and system Pending CN112764761A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110111213.1A CN112764761A (en) 2021-01-27 2021-01-27 Program interruption file analysis method, storage medium, electronic device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110111213.1A CN112764761A (en) 2021-01-27 2021-01-27 Program interruption file analysis method, storage medium, electronic device and system

Publications (1)

Publication Number Publication Date
CN112764761A true CN112764761A (en) 2021-05-07

Family

ID=75706116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110111213.1A Pending CN112764761A (en) 2021-01-27 2021-01-27 Program interruption file analysis method, storage medium, electronic device and system

Country Status (1)

Country Link
CN (1) CN112764761A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662270A (en) * 2022-09-09 2023-08-29 荣耀终端有限公司 File analysis method and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092554A (en) * 2016-02-18 2017-08-25 阿里巴巴集团控股有限公司 The failure code confirmation method and device of a kind of application program
CN110764945A (en) * 2019-10-23 2020-02-07 北京博睿宏远数据科技股份有限公司 Crash log processing method, device, equipment and storage medium
CN111638991A (en) * 2020-06-05 2020-09-08 贝壳技术有限公司 Method and system for analyzing crash file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092554A (en) * 2016-02-18 2017-08-25 阿里巴巴集团控股有限公司 The failure code confirmation method and device of a kind of application program
CN110764945A (en) * 2019-10-23 2020-02-07 北京博睿宏远数据科技股份有限公司 Crash log processing method, device, equipment and storage medium
CN111638991A (en) * 2020-06-05 2020-09-08 贝壳技术有限公司 Method and system for analyzing crash file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JSONMESS: "解析iOS crash 工具", 《HTTPS://GITHUB.COM/JSONMESS/CRASHER》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662270A (en) * 2022-09-09 2023-08-29 荣耀终端有限公司 File analysis method and related device
CN116662270B (en) * 2022-09-09 2024-05-10 荣耀终端有限公司 File analysis method and related device

Similar Documents

Publication Publication Date Title
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
CN111221521B (en) Method, device, computer system and readable storage medium for generating log code
CN109918055B (en) Application program generation method and device
CN108346028A (en) A kind of business approval processing method, apparatus and system
CN111831538B (en) Debugging method, device and storage medium
CN110955428A (en) Page display method and device, electronic equipment and medium
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
US9762700B2 (en) Client-side aggregation of nested resource dependencies
CN107729001B (en) Expression processing method and device
US9571557B2 (en) Script caching method and information processing device utilizing the same
CN114116078A (en) Application data processing method, device, equipment and medium based on micro front end
CN110457132B (en) Method and device for creating functional object and terminal equipment
CN112764761A (en) Program interruption file analysis method, storage medium, electronic device and system
US20160292067A1 (en) System and method for keyword based testing of custom components
EP3519964B1 (en) Electronic apparatus for recording debugging information and control method thereof
CN107291619B (en) Memory occupation analysis method and device
CN112307386A (en) Information monitoring method, system, electronic device and computer readable storage medium
CN116781586A (en) gRPC flow analysis method, device, equipment and medium
CN108037914B (en) Method and device for developing android native system by combining js
CN113961194B (en) Flutter cross-application-based engineering construction method, system, terminal and medium
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN114449063A (en) Message processing method, device and equipment
CN114374745A (en) Protocol format processing method and system
CN113741878A (en) GraphQL-based interface construction method and system, electronic 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210507

RJ01 Rejection of invention patent application after publication