CN108334515B - Method, device and system for processing stack address in crash file - Google Patents

Method, device and system for processing stack address in crash file Download PDF

Info

Publication number
CN108334515B
CN108334515B CN201710041483.3A CN201710041483A CN108334515B CN 108334515 B CN108334515 B CN 108334515B CN 201710041483 A CN201710041483 A CN 201710041483A CN 108334515 B CN108334515 B CN 108334515B
Authority
CN
China
Prior art keywords
address
crash
file
system library
symbol table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710041483.3A
Other languages
Chinese (zh)
Other versions
CN108334515A (en
Inventor
丘立斌
谢劲松
储龙江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710041483.3A priority Critical patent/CN108334515B/en
Publication of CN108334515A publication Critical patent/CN108334515A/en
Application granted granted Critical
Publication of CN108334515B publication Critical patent/CN108334515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method, a device and a system for processing stack addresses in crash files. The method comprises the following steps: analyzing a crash file, and acquiring a local crash address and a local crash base address in the crash file; calculating a real crash address according to the local crash address and the local crash base address; inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping table; calculating an offset according to the inquired symbol table data; and determining a symbolization result of the stack address in the crash file based on the inquired symbol table data and the offset. By utilizing the embodiments of the application, the crash addresses in the plurality of crash files can be accurately converted, the batch processing of the crash files is realized, the dependence of symbolic processing on an original application operating system is greatly reduced, the conversion efficiency of processing the crash files is improved, and the processing efficiency of the crash files is improved.

Description

Method, device and system for processing stack address in crash file
Technical Field
The present application relates to the field of communication data processing technologies, and in particular, to a method, an apparatus, and a system for processing a stack address in a crash file.
Background
In the actual development process of the application of the intelligent terminal or when the user uses the application program in the intelligent terminal, the situation that the application program is crashed often occurs, which can lead to dissatisfaction of the user on the application program. In order to repair a location where an application program crashes, when an application program based on iOS (ihbone operation system) crashes, a crash file is generated, in which a call stack address called when the application program crashes is recorded, and the process of symbolizing the crash file includes resolving a hexadecimal stack address at the time of the crash into information such as a designated class, a function, and a line number in a corresponding program code that can be identified manually.
Currently, in the process of developing an iOS application, when a developer monitors that a corresponding iOS application is crashed, the developer usually connects a mobile terminal running the iOS application with a terminal (e.g., a computer) having an iOS operating system, and uploads a crash file and a system library file in the mobile terminal to the terminal, where a symbolization tool exists in a terminal search system. And if the symbolic tool such as symmolicatarsh exists, inquiring whether a system library file corresponding to the crash file exists in a directory where the system library file in the terminal is located, and if so, further judging whether the system library file has a system library subfile which is the same as the file identification information read from the crash file. If the system library subfile exists, the symbolization tool symbolizes the crash file according to the system library subfile so as to convert the crash address information in the crash file into function information, and a developer can conveniently repair the crashed place, wherein the system library subfile comprises symbol table information of the crash address information in the symbolized crash file. Fig. 1 is a schematic flow diagram of a process of performing symbolization processing by using a system library symbolization tool provided by apple, wherein the atom, lipo, and the like in fig. 1 are symbolization tools provided for a system, and the uuid is used for uniquely identifying a system library file, and after a system library corresponding to a crash file is found, whether a system library with consistent uuid exists in a local computer system library is queried according to the uuid of a certain system library in the crash file.
However, after the application of the iOS system generates the crash file, when the symbolic processing is performed on the crash address of the system library in the crash file, the application needs to perform the symbolic processing by using a symbolic tool carried by the apple computer, such as a symbolocatecrash symbolic tool, and it needs to ensure that the iOS system generating the crash file is stored in the current computer, so that the application cannot meet the requirement of system library calling in a plurality of crash files under a plurality of system library versions in batch symbolization, and the defect of locating the program and the efficiency of solving the problem of the iOS developer are seriously affected. For example, in the process of switching the processing terminal, a user needs to manually move a system library subfile corresponding to an analysis crash file to a correct position so that the Xcode can find the analysis crash file, if the user does not move the corresponding system library subfile, the crash file cannot be accurately symbolized, and the symbolization power is low. And the symbolization process called by the system library is a relatively complex process, if a user needs to symbolize crash files in batches, the user needs to use a symbolization tool for many times in the process of symbolizing the crash files, and the terminal cannot accurately symbolize a plurality of crash files in batches because system library files of different versions stored in the terminal are limited. One crash file contains crash addresses of hundreds of system libraries, and if thousands of crash files are input at the same time, the symbolization of the scheme becomes very memory-consuming and cannot meet the processing requirement of rapid analysis.
Of course, other application operating systems (some non-open terminal operating systems that provide API interfaces) than the iOS application operating system are also subject to similar circumstances as the iOS system described above. Therefore, the existing method for symbolizing the crash files generated by running the operating system has low processing efficiency, cannot meet the requirement of system library calling in a plurality of crash files under a plurality of system library versions symbolized in batch, and seriously influences the efficiency of system developers to position the defects of programs and solve problems.
Disclosure of Invention
The application aims to provide a method, a device and a system for processing stack addresses in crash files, which can realize rapid batch conversion of the stack addresses which generate the crash in the crash files, realize batch processing of the crash files, greatly reduce the dependence of symbolic processing on an original application operating system, improve the conversion efficiency of processing the crash files and improve the processing efficiency of the crash files.
The method, the device and the system for processing the stack address in the crash file are realized as follows:
a method of processing a stack address in a crash file, the method comprising:
Analyzing an applied crash file to obtain a local crash address and a local crash base address in the crash file;
calculating a real crash address according to the local crash address and the local crash base address;
inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping object;
calculating an offset according to the inquired symbol table data;
and determining a symbolization result of the stack address in the crash file based on the inquired symbol table data and the offset.
An apparatus for processing a stack address in a crash file, comprising:
the analysis module is used for analyzing the crash file and acquiring a local crash address and a local crash base address in the crash file;
the real address calculation module is used for calculating a real crash address according to the local crash address and the local crash base address;
the query module is used for querying symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping object;
the offset calculation module is used for calculating the offset according to the inquired symbol table data;
and the result determining module is used for determining a symbolization result of the stack address in the crash file based on the inquired symbol table data and the offset.
A system for processing a stack address in a crash file includes a processor and a memory for storing processor-executable instructions,
the processor is configured to parse a crash file of an application, and obtain a local crash address and a local crash base address in the crash file; the real crash address is calculated according to the local crash address and the local crash base address; the system is also used for inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping table; the system is also used for calculating the offset according to the inquired symbol table data; and the symbolic result of the stack address in the crash file is determined based on the inquired symbol table data and the offset.
The method, the device and the system for processing the stack address in the crash file can collect a plurality of versions of system libraries of an application operating system such as an iOS system, and can export a symbol table in the system library file to form an address symbol mapping object (page, table and the like). And then when the crash file is processed, the symbol table data corresponding to the crash address can be quickly searched in batch through the address symbol mapping object, so that the symbolization processing of the stack address of the system library is realized. By the aid of the method and the device, real-time analysis processing efficiency of the crash files can be improved, processing requirements of batch crash addresses of the batch crash files are met, memory consumption during terminal processing can be reduced compared with an existing processing mode, and symbolization processing efficiency of stack addresses in an application system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow diagram of a symbolization process using a system library symbolization tool provided by apple Inc.;
FIG. 2 is a flow diagram of a method of one embodiment of a method for processing a stack address in a crash file according to the application;
FIG. 3 is a schematic diagram illustrating system library crash address information in a crash file obtained by parsing in an application scenario according to an embodiment of the application;
fig. 4 is a schematic diagram of a file with a suffix of a partial frame in a reading system library according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an embodiment of the present application reading a suffix of part dylib in a system library;
FIG. 6 is a schematic diagram illustrating the primary information contained in the content of the iOS library symbol table in one embodiment of the present application;
FIG. 7 is a partial content diagram of the derivation of system library symbol table content in one embodiment of the present application;
FIG. 8 is an exemplary diagram of a tokenization result obtained in one embodiment of the present application;
FIG. 9 is a schematic flow chart of the method for collecting system library file and symbol table information export by the iOS system library of the present application;
FIG. 10 is a block diagram illustrating an exemplary apparatus for handling a stack address in a crash file according to the present disclosure;
FIG. 11 is a block diagram illustrating an exemplary apparatus for handling a stack address in a crash file according to the present disclosure;
FIG. 12 is a block diagram illustrating an exemplary apparatus for handling a stack address in a crash file according to the present disclosure;
FIG. 13 is a block diagram illustrating an embodiment of a system for handling a stack address in a crash file.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
FIG. 2 is a flowchart of a method of one embodiment of a method for handling a stack address in a crash file. Although the present application provides the method operation steps or apparatus structures as shown in the following embodiments or figures, more or less operation steps or module units after partial combination may be included in the method or apparatus based on conventional or non-inventive labor. In the step or structure in which the necessary cause and effect relationship does not logically exist, the execution sequence of the steps or the module structure of the apparatus is not limited to the execution sequence or the module structure shown in the embodiment or the drawings of the present application. When the described method or module structure is applied to a practical device or an end product, the method or module structure according to the embodiment or the figures may be executed sequentially or executed in parallel (for example, in the environment of parallel processors or multi-thread processing, or even in the environment of distributed processing).
For clarity, an example of symbolizing a stack address in a crash file of an iOS system is described as an application scenario in the following. However, those skilled in the art can understand that the substantial spirit of the present solution can be applied to the implementation scenario that other application operating systems are adopted, that is, the method includes collecting multiple versions of multiple system libraries of an application system, such as iOS, and exporting stack addresses in system library files and corresponding symbolized information tables to form an address symbol mapping relationship, and when a crash file is processed, the address symbol mapping relationship is queried to implement batch and fast symbolization processing of stack addresses of the system libraries, so as to reduce dependency on an original application operating system, improve real-time analysis processing efficiency and accuracy of the crash file, and reduce processing load of a terminal memory. The following will not be described alternatively, and applicability to implementation scenarios of other terminal application operating systems will not be described herein.
In an application scenario of an embodiment of the present application, to overcome a deficiency of a stack address symbolization scheme of an existing iOS system library, an embodiment of the present application adopts the following implementation schemes to perform optimization and achieve a certain optimization effect, including: collecting system library files of various versions of the iOS in advance, wherein the system library files of various versions can be uploaded by developers for example; exporting the collected symbol table information in all the system libraries to a data storage unit for storage (which may be collectively referred to as an address symbol mapping object herein, and may include storage units of databases, tables, pages and the like of various types or forms), and specifically, exporting the part of content to the database by using a development tool, so as to facilitate subsequent symbolization; acquiring address information in a crash file to be analyzed, and inquiring an address symbol mapping object, wherein symbolic result data of a system library stack address is obtained through calculation in a specific mode. Specifically, in an embodiment of the method for processing a stack address in a crash file, which is provided by the present application, as shown in fig. 2, the method may include:
s1: and analyzing the crash file to obtain a local crash address and a local crash base address in the crash file.
After the crash file to be processed is obtained, the crash file can be analyzed. Generally, the crash file includes a local crash address and a local crash base address corresponding to the corresponding version application operating system library. The local collapse base address is understood to be a base address, which is a calculation reference for relative offsets and can be typically addressed using registers. Typically, the base address of the local crash is a static address of a pointer variable, which remains unchanged in a set or version of the application operating system. Of course, in an embodiment of the present application, if the base address of a system is changed, the synchronous update of the system library version can be implemented by correspondingly updating the data in the address symbol mapping object constructed in advance. The local crash address can be understood as an address when the application recorded in the crash file sends a crash.
In a specific example, for example, a local crash address and a local crash base address obtained by analyzing a crash file generated by an iOS application are shown in fig. 3, and fig. 3 is a schematic diagram of system library crash address information in a crash file obtained by analyzing in an application scenario according to an embodiment of the present application. As shown in fig. 3, one crash file may include one or more pieces of system library crash address information, and each piece of crash address information may include the following parts: the first part is the name of the crashed vault (e.g., libdispatch. dylib), the second part is the local crash address of the vault crash (e.g., 0x37b2c4b7), the third part is the local crash base address of the vault crash (e.g., 0x37b2b000), and the fourth part is the crash address offset (e.g., + 5303).
In this embodiment, an applied crash file may be analyzed, and a plurality of pieces of system library crash address information included in the crash file may be obtained, where each piece of system library crash address information may include a local crash address and a local crash base address.
S2: and calculating a real crash address according to the local crash address and the local crash base address.
Further, a real crash address can be calculated according to the obtained local crash address and the local crash base address. The present application does not exclude other embodiments that employ a calculation of a real crash address based on the local crash address and the local crash base address in different application operating systems. In an implementation scenario of the iOS application operating system of this embodiment, the calculating a real crash address according to the local crash address and the local crash base address includes:
s201: and calculating the difference value of the local collapse address and the local collapse base address, and taking the difference value as a real collapse address.
In this embodiment, the following method may be used to calculate the real crash address:
the real crash address is the local crash address-local crash base address.
In one specific example of computing system library crash address information as described in figure 3,
Real crash address 0x37b2c4b 7-0 x37b2b000
S3: and inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping object.
In the embodiment of the present application, a storage crash address (a real crash address of a crash file corresponding to the parsing) and corresponding symbolic data in the system library file may be pre-constructed. Therefore, after the real crash address is obtained through the calculation, the inquired symbol table data result can be obtained according to the data in the real crash address and address symbol mapping object obtained through calculation.
The address symbol mapping object may specifically include a storage unit for storing a mapping relationship between a crash address and symbol table data, and may specifically include a table or page storage in a database, and the like. Of course, in other embodiments, the address symbol mapping object may also include other data storage manners or data storage formats. The address symbol mapping object can be generated by analyzing each system library file uploaded by a developer, exporting corresponding symbol table contents, and then storing the corresponding symbol table contents in a specified database. Specifically, in an embodiment of the method for processing a stack address in a crash file provided by the present application, the address symbol mapping object may be constructed in the following manner:
S20: acquiring a system library file of an application operating system;
s21: analyzing a system library file with a preset suffix name, reading symbol table contents in the system library file, and acquiring a stack address interval and corresponding function call when the system library file is crashed;
s22: and storing symbol table data comprising the stack address interval and the corresponding function call to construct an address symbol mapping object.
In an application scenario of the embodiment of the application, the application operating system includes an iOS system, and accordingly, the crash file includes a crash file generated when an application based on the iOS system crashes. Of course, other application operating systems may also construct and obtain the address symbol mapping object in the manners of S20 to S22.
In an implementation scenario based on the iOS system in this embodiment, two types of system library files in a system library used by the iOS may be analyzed, one type is a file with frame as a suffix, the other type is a file with dylib as a suffix, and the two types of files are in different directories, and in this embodiment, the whole files may be read. Thus, the preset suffix name pair described above may include system library files with suffix names of the frame and dylib types. The partial file contents of the system library file of the two suffixes obtained by reading are shown in fig. 4 and 5. Fig. 4 is a schematic diagram of a file with a suffix as part of a frame in the system library, and fig. 5 is a schematic diagram of a file with a suffix as part of a dylib in the system library. Then, the content of the symbol table stored in the system library file with the affixes named as frame and dylib can be exported, and the stack address interval and the corresponding function call when the crash happens can be obtained. Therefore, in another embodiment of the method of the present application, the parsing a system library file with a preset suffix name, and reading the symbol table content in the system library file includes:
S211: analyzing the system library file with suffix names of frame and dylib, and reading the symbol table content comprising function call and corresponding call start address and call end address from the character string table obtained by analysis according to the position of the symbol table content stored in the head information of the analyzed system library file and the size of the symbol table content.
Specifically, in the iOS system, the symbol table contents in the system library file are stored in a file in a binary form. The embodiment of the application can export the part of the symbol content information needing to be extracted into the database. Generally, the content of the symbol table included in the iOS system library file mainly includes three parts, as shown in fig. 6, and fig. 6 is a schematic diagram of main information included in the content of the symbol table of the iOS system library in an embodiment of the present application. As shown in fig. 6, the main information includes uuid (unique ID for identifying the system library file), cpu architecture type (mainly, arm 7, arm64, arm 7s, etc.), cpu architecture number (one system library file may contain a plurality of architecture types), magic type (for identifying whether the system library file belongs to a 64-bit iOS system or a 32-bit iOS system), etc.
The information of the position of the symbol table content is recorded in the header information of the system library file and is stored in a binary form. The head information is divided into a plurality of segments, and each segment can be divided into a plurality of pieces. The segment named __ TEXT contains different slice information called section header, mainly __ TEXT and __ stubs (64-bit iOS system) or __ picsymbolstub4 (32-bit iOS system), and accurately stores the position of the symbol table content and the content size of the symbol table.
In the iOS system, the symbol table content is stored in the string table, and the content of the string table (character string table) can be read through the recording information of the position and size of the symbol table content, and the symbol table content including the function call and the corresponding call start address and call end address required in this embodiment can be obtained after analysis. In the embodiment of the present application, the stack address intervals when the crash occurs and the corresponding symbol table contents of the function call may be used as symbol table data stored in the address symbol mapping object. Fig. 7 is a schematic diagram of partial contents obtained by deriving the content of the symbol table of the system library in an embodiment of the present application, and as shown in fig. 7, the partial content of the obtained symbol table mainly includes three parts of field information, where the first part is a hexadecimal start address (e.g., 1004) of the call, the second part is a hexadecimal end address (e.g., 103c) of the call, and the third part is a function call (e.g., [ eaacceessorarmanager init ]). The field information including the three parts can be stored in a database, and an address symbol mapping table (a physical form of an address symbol mapping object) can be constructed and generated.
Therefore, when querying the symbol table data corresponding to the real crash address in the embodiment of the present application, the condition that the query condition may be set includes that the real crash address is greater than the start address of the symbol table call line and less than the end address of the symbol table call line. The symbol table calls for the row start address and end address as shown in fig. 7.
S4: and calculating an offset according to the inquired symbol table data.
The offset may be calculated based on the results obtained from the query. The present application does not exclude other embodiments for calculating an offset based on symbol table data in different application operating systems. In an implementation scenario of the iOS application operating system of this embodiment, the calculating an offset according to the queried symbol table data may include:
s401: and calculating the difference value of the real crash address and the calling start address in the inquired symbol table data, and taking the difference value as an offset.
The calculation of the offset depends on the symbol table data obtained by the query, and the specific calculation formula can be as follows:
offset is the real crash address-call row start address.
S5: and determining a symbolization result of the stack address in the crash file based on the inquired symbol table data and the offset.
After the symbol table data and the offset corresponding to the real crash address are obtained, the symbolization result of the stack address in the crash file calculated this time can be determined. Generally, the specific data format and information content of the determined symbolization result can be determined by the requirements or design of a development designer. In an embodiment provided by the present application, the symbolization result may include:
S501: and the information of the crash file, a local crash address in the crash file, a function call corresponding to the local crash address in the inquired symbol table data, and an offset corresponding to the local crash address.
The information of the crashed file may include the filename of the crashed file being processed or the system library filename, such as libdispach. The local collapse address and the corresponding function call and offset can be used for uniquely determining the collapsed address, function information and the like, and are used for positioning problems, repairing and the like for a user.
The symbolized result can be directly displayed to the user so that the user can directly view the symbolized output result. Therefore, the further method may further comprise:
s6: and displaying the symbolized result.
FIG. 8 is an exemplary graph of the symbolized results obtained in one embodiment of the present application. The data information of one or more symbolized results shown in fig. 8 may be displayed directly at the front end. Of course, in this application, other embodiments are not excluded, and the determined symbolic result may be output to a data table or other types of storage units in a designated target address for storage, or even include an implementation in which the symbolic result is further processed by conversion, transformation, modification, annotation, and the like, and then stored or displayed.
In the foregoing, system library files of various versions of the iOS operating system are collected in advance, for example, the system library files of various versions may be uploaded by a developer; exporting the collected symbol table information in all the system libraries to a data storage unit for storage (which may be collectively referred to as an address symbol mapping object herein, and may include storage units of databases, tables, pages, etc. of various types or forms), and specifically, exporting the part of content to a database by using a development tool, so as to facilitate subsequent symbolization. In one embodiment provided by the present application, a system platform for collecting and parsing files of different system libraries of an application operating system is provided, where the system platform may be composed of one or more servers. The developer can submit the system library file of the application operating system to the system platform, and the system platform manages the system library file, including analyzing the symbol table data of each version of each system library and storing the symbol table data. The system platform may be configured to perform a validity check on the submitted system library file and to query whether the same system library file already exists. Specifically, in another embodiment of the method of the present application, the system library file includes a stored and received system library file of at least one application operating system;
Further, the method may further include: when a new system library file is received, whether the system library file identical to the new system library file is stored or not is inquired; if not, analyzing the new system library file, and storing corresponding symbol table data into the address symbol mapping object.
Of course, when a new system library file is received, the validity of the new system library file may be detected first.
The rapid batch symbolization system library crash address implementation scheme can be divided into two parts, wherein one part is used for collecting the iOS system library and exporting the symbol table in the system library file, and the other part is used for symbolizing the system library stack address in the crash file.
A specific example is shown in fig. 9, fig. 9 is a schematic flow chart of the iOS system library collection system library file and symbol table information export, and the flow process of the iOS system library collection and system library file and symbol table export is described as follows:
1) the developer submits an iOS system library;
2) carrying out validity detection on the submitted system library;
3) reading files in a system library, wherein the files comprise a suffix of frame and a suffix of dylib;
4) and importing the symbol table information in the read system library file into a database.
The method specifically comprises the following steps:
1) iOS system libraries submitted by developers.
Typically, several iOS versions of the system Library typically exist under a specified directory in the iOS Developer's computer (the directory is:/Users/computer user name/Library/device/Xcode/iOS device support /). The developer can provide the system library to the system platform, and the platform can provide a visual interface, so that the developer can upload the system library file to the platform.
2) And detecting the legality of the system library.
The system provided by the developer can be screened in the scene of the embodiment, and the screening condition can be set as follows:
whether the file is an iOS system library file or not can be specifically identified by reading file information in the system library file, if the file contains the unique id of the file, the file is called uuid, if so, the file is legal, and if not, the file is illegal;
the version number and build number corresponding to this file already exist, i.e., whether the same iOS system library file has been previously submitted. If existing, import is not needed, and if not, import is needed.
3) And reading the files in the system library.
The system library comprises two types of files, wherein one type of files is files with frame as suffix, the other type of files with dylib as suffix, and the two types of files need to be read out in full under different directories.
4) And (4) exporting symbol table information of the system library file.
The symbol table information (like the symbol content information) of the system library is stored in a file in a binary form, and the partial symbol table information needs to be exported to the database.
As can be seen from the foregoing embodiments and examples, the method for processing the stack address in the crash file provided by the present application can collect multiple versions of multiple system libraries of an application operating system, such as an iOS system, and export the symbol table in the system library file to form an address symbol mapping object (page, table, etc.). And then when the crash file is processed, the symbol table data corresponding to the crash address can be quickly searched in batch through the address symbol mapping object, so that the symbolization processing of the system library stack address is realized. By the aid of the method and the device, real-time analysis processing efficiency of the crash files can be improved, processing requirements of batch crash addresses of the batch crash files can be met, memory consumption during terminal processing can be reduced compared with an existing processing mode, and symbolization processing efficiency of stack addresses in an application system is improved.
Based on the method for processing the stack address in the crash file in the embodiment or the scenario, the present application further provides a device for processing the stack address in the crash file. The apparatus may include a client, a system (including a distributed system), software (applications), modules, components, servers, etc. that utilize the methods described herein in conjunction with hardware where necessary to implement the apparatus. Based on the same innovative concept, the device in one embodiment provided by the present application is described in the following embodiment. Because the implementation scheme of the device for solving the problems is similar to that of the method, the implementation of the specific device in the present application can refer to the implementation of the method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated. Fig. 10 is a block diagram illustrating a module structure of an embodiment of an apparatus for processing a stack address in a crash file, as shown in fig. 10, the apparatus may include:
The analysis module 101 may be configured to analyze a crash file, and obtain a local crash address and a local crash base address in the crash file;
the real address calculation module 102 may be configured to calculate a real crash address according to the local crash address and the local crash base address;
the query module 103 may be configured to query, in a pre-constructed address symbol mapping object, symbol table data corresponding to the real crash address;
an offset calculation module 104, configured to calculate an offset according to the queried symbol table data;
a result determination module 105, configured to determine a symbolization result of the stack address in the crash file based on the queried symbol table data and the offset.
The device for processing the stack address in the crash file can collect multiple versions of multiple system libraries of an application operating system such as an iOS system in advance, and can export a symbol table in a system library file to form an address symbol mapping object (page, table and the like). And then when the crash file is processed, the symbol table data corresponding to the crash address can be quickly searched in batch through the address symbol mapping object, so that the symbolization processing of the stack address of the system library is realized. By the aid of the method and the device, real-time analysis processing efficiency of the crash files can be improved, processing requirements of batch crash addresses of the batch crash files can be met, memory consumption during terminal processing can be reduced compared with an existing processing mode, and symbolization processing efficiency of stack addresses in an application system is improved.
For example, system library files of various versions of the iOS operating system may be collected in advance, for example, system library files of various versions may be uploaded by a developer; and exporting the collected symbol table information in all the system libraries to a data storage unit and storing the symbol table information in an address symbol mapping object. Therefore, in another embodiment of the apparatus of the present application, the pre-constructed address symbol mapping object includes the following steps:
acquiring a system library file of an application operating system;
analyzing a system library file with a preset suffix name, reading symbol table contents in the system library file, and acquiring a stack address interval and corresponding function call when the system library file is crashed;
and storing symbol table data comprising the stack address interval and the corresponding function call to construct an address symbol mapping object.
The device can be used in an iOS application operating system, and can effectively realize symbolization processing of stack addresses in batch crash files. Thus, in one embodiment scenario, the crash file parsed by the parsing module comprises a crash file generated when an application based on the iOS system crashes. Those skilled in the art will appreciate that the substantial spirit of the present solution may be applied to implementation scenarios employing other application operating systems.
In an implementation scenario based on the iOS system, two types of system library files in a system library used by the iOS may be parsed, one type is a file with a frame as a suffix, the other type is a file with a dlib as a suffix, and the two types of files are in different directories. in the iOS system, the symbol table contents in the system library file are stored in a binary format in the file. The embodiment of the application can export the part of the symbol content information needing to be extracted into the database. Therefore, in another embodiment of the apparatus provided in the present application, the parsing the system library file with the preset suffix name, and reading the symbol table content in the system library file may include:
analyzing the system library file with suffix names of frame and dylib, and reading the symbol table content comprising function call and corresponding call start address and call end address from the character string table obtained by analysis according to the position of the symbol table content and the size of the symbol table content stored in the head information of the analyzed system library file.
The system library file comprises a stored and received system library file of at least one application operating system;
further, the apparatus may further include:
The system library file processing module 106 may be configured to, when a new system library file is received, query whether a system library file that is the same as the new system library file is already stored; if not, analyzing the new system library file, and storing corresponding symbol table data into the address symbol mapping object.
Fig. 11 is a schematic block structure diagram of another embodiment of an apparatus for processing a stack address in a crash file according to the present application, as shown in fig. 11, system library files of various versions of an iOS operating system may be collected in advance, for example, system library files of various versions may be uploaded by a developer; exporting the collected symbol table information in all the system libraries to a data storage unit for storage (which may be collectively referred to as an address symbol mapping object herein, and may include storage units of databases, tables, pages, etc. of various types or forms), and specifically, exporting the part of content to a database by using a development tool, so as to facilitate subsequent symbolization. In one embodiment provided by the present application, a system platform for collecting and parsing files of different system libraries of an application operating system is provided, where the system platform may be composed of one or more servers. The developer can submit the system library file of the application operating system to the system platform, and the system platform manages the system library file, including analyzing the symbol table data of each version of each system library and storing the symbol table data. The system platform may be configured to perform a validity check on the submitted system library file and to query whether the same system library file already exists.
In another implementation scenario of the iOS application operating system of the apparatus for processing a stack address in a crash file, the real address calculation module may calculate the real crash address by:
and calculating the difference value of the local collapse address and the local collapse base address, and taking the difference value as a real collapse address.
And, in some embodiments, the offset calculation module may calculate the offset by:
and calculating the difference value of the real crash address and the calling start address in the inquired symbol table data, and taking the difference value as an offset.
Of course, this application does not exclude other embodiments that calculate a real crash address based on the local crash address and the local crash base address, and other embodiments that calculate an offset based on the symbol table data, from being used in different application operating systems.
After obtaining the symbol table data and the offset corresponding to the real crash address, the symbolic result of the stack address in the crash file calculated this time can be determined. Generally, the specific data format and information content of the determined symbolization result can be determined by the requirements or design of a development designer. In another embodiment of the apparatus provided in the present application, the symbolization result obtained by the result determining module at least includes the following information:
And the information of the crash file, a local crash address in the crash file, a function call corresponding to the local crash address in the inquired symbol table data, and an offset corresponding to the local crash address.
The local collapse address and the corresponding function call and offset can be used for uniquely determining the collapsed address, function information and the like, and are used for positioning problems, repairing and the like by a user. FIG. 12 is a block diagram illustrating an apparatus for handling a stack address in a crash file according to another embodiment of the present invention, and as shown in FIG. 12, the tokenized result can be directly displayed to a user, so that the user can directly view the tokenized output result. Therefore, in another embodiment, the apparatus for processing a stack address in a crash file may further include:
a result display module 107, which may be configured to display the symbolized result.
The data information of one or more symbolized results shown in fig. 8 may be displayed directly at the front end. Of course, in this application, other embodiments are not excluded, and the determined symbolic result may be output to a data table or other types of storage units in a designated target address for storage, or even include an implementation in which the symbolic result is further processed by conversion, transformation, modification, annotation, and the like, and then stored or displayed.
The method or the device can be used in service systems or applications of various terminal devices to achieve the purposes of reducing memory overhead and rapidly performing stack address symbolization processing in batches. Therefore, the present application also provides a system for processing a stack address in a crash file. The system may include an implementation scenario of a terminal device (server), such as a physical and logical background service server, or may include a cluster or server system composed of a plurality of terminal devices. In particular, in one embodiment, the system may include a processor and a memory to store processor-executable instructions,
the processor is configured to parse a crash file to obtain a local crash address and a local crash base address in the crash file; calculating a real crash address according to the local crash address and the local crash base address; inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping table; calculating an offset according to the inquired symbol table data; and determining a symbolization result of the stack address in the crash file based on the inquired symbol table data and the offset.
In other embodiments of the system, the system further comprises an iOS system library unit, coupled to the processor, and configured to store the received iOS system library file; and (c) a second step of,
the system library file with suffix names of frame and dylib is analyzed, and according to the position of the content of the symbol table stored in the head information of the analyzed system library file and the content size of the content of the symbol table, the content of the symbol table including function call and the corresponding call starting address and call ending address is read from the character string table obtained by analysis;
and constructing an address symbol mapping table according to the symbol table content obtained by analysis, and storing the address symbol mapping table.
FIG. 13 is a block diagram illustrating an embodiment of a system (symbolic processing system) for handling a stack address in a crash file. In this way, data information storing the crash address and data information of the function call corresponding to the crash address may be stored in the system. When a user needs to process a crash file, the crash file can be uploaded to a system, the system obtains needed stack address information after analyzing the crash file, and then symbol table data is obtained by inquiring in an address symbol mapping table of an iOS system library unit, and a query result is obtained. Of course, this application does not exclude other embodiments where the iOS system library unit or even the address symbol mapping table is stored in a logically separate device from the system, such as a dedicated server storage unit or a third party provided storage unit. At this time, the system can interact with the storage unit through a preset communication mode to obtain a symbolized result of the real crash address.
The system not only can collect the system library files, but also can perform corresponding management and control. Specifically, in another embodiment of the system provided by the present application, the iOS system library unit may be further configured to, when receiving a new system library file, query whether a system library file identical to the new system library file is already stored; if not, analyzing the new system library file, and storing corresponding symbol table data into the address symbol mapping table.
The system for processing the stack address in the crash file can collect a plurality of versions of system libraries of an application operating system such as an iOS system, and can export a symbol table in a system library file to form an address symbol mapping object (page, table and the like). And then when the crash file is processed, the symbol table data corresponding to the crash address can be quickly searched in batch through the address symbol mapping object, so that the symbolization processing of the stack address of the system library is realized. By the aid of the method and the device, real-time analysis processing efficiency of the crash files can be improved, processing requirements of batch crash addresses of the batch crash files can be met, memory consumption during terminal processing can be reduced compared with an existing processing mode, and symbolization processing efficiency of stack addresses in an application system is improved.
It should be noted that the apparatus or the system described above may further include other implementation manners, for example, the system may detect whether the new system library file is a legal system library file of the application operating system, and the like, and may specifically refer to the implementation manner described in the related embodiment of the method, which is not described herein again. Of course, besides the iOS application operating system, the embodiments provided by the present application can also be applied to the implementation scenario of stack address symbolization processing in a crash file based on other application operating systems (some non-open terminal operating systems that provide API interfaces).
Although the present application refers to the description of data table definitions such as iOS system library checking, file identification with different suffix names in iOS system library, symbol table information parsing/reading method, offset and real crash address calculation, database query, etc., crash file processing, data interaction, judgment, calculation, etc., the present application is not limited to the case where it is necessary to comply with the processing standard of the industry application system or the data communication standard, communication mode, standard iOS syntax rules, standard computer language, or the embodiments of the present application. Certain industry standards or implementations modified slightly from those described using custom modes or examples can also achieve the same, equivalent or similar, or other expected implementation results after being modified. Examples of data definition acquisition, generation, determination, processing, etc. obtained by applying these modifications or variations may still fall within the scope of alternative embodiments of the present application.
Although the present application provides method steps as described in an embodiment or flowchart, more or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of sequences, and does not represent a unique order of performance. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to the software compiler used in program development, but the original code before compiling is also written in a specific Programming Language, which is called Hardware Description Language (HDL), and the HDL is not only one kind but many kinds, such as abel (advanced boot Expression Language), ahdl (alternate Language Description Language), communication, CUPL (computer universal Programming Language), HDCal (Java Hardware Description Language), langa, Lola, mylar, HDL, PALASM, rhydl (runtime Description Language), vhjhdul (Hardware Description Language), and vhygl-Language, which are currently used commonly. It will also be apparent to those skilled in the art that hardware circuitry for implementing the logical method flows can be readily obtained by a mere need to program the method flows with some of the hardware description languages described above and into an integrated circuit.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be regarded as a hardware component and the means for performing the various functions included therein may also be regarded as structures within the hardware component. Or even means for performing the functions may be conceived to be both a software module implementing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various modules by functions, which are described separately. Of course, in implementing the present application, the functions of each module may be implemented in one or more pieces of software and/or hardware, or a module that implements the same function may be implemented by a combination of a plurality of sub-modules or sub-units, or the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
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.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (18)

1. A method for processing a stack address in a crash file, the method comprising:
analyzing an applied crash file to obtain a local crash address and a local crash base address in the crash file;
calculating a real crash address according to the local crash address and the local crash base address;
inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping object;
calculating an offset according to the inquired symbol table data;
determining a symbolization result of a stack address in the crash file based on the queried symbol table data and the offset;
wherein the address symbol mapping object is constructed in the following manner:
acquiring a system library file of an application operating system;
analyzing a system library file with a preset suffix name, reading symbol table contents in the system library file, and acquiring a stack address interval and corresponding function call when breakdown occurs;
and storing symbol table data comprising the stack address interval and the corresponding function call to construct an address symbol mapping object.
2. The method of handling a stack address in a crash file of claim 1, wherein the application operating system comprises an iOS system and, accordingly, the crash file comprises a crash file generated upon a crash of an application based on the iOS system.
3. A method for handling a stack address in a crash file as recited in claim 2, wherein the parsing a default suffix system library file and reading the symbol table contents in the system library file comprises:
analyzing the system library file with suffix names of frame and dylib, and reading the symbol table content comprising function call and corresponding call start address and call end address from the character string table obtained by analysis according to the position of the symbol table content stored in the head information of the analyzed system library file and the size of the symbol table content.
4. A method of handling a stack address in a crash file as recited in claim 1, wherein the system library file comprises a stored received system library file of the at least one application operating system;
further, the method further comprises: when a new system library file is received, inquiring whether a system library file identical to the new system library file is stored; if not, analyzing the new system library file, and storing corresponding symbol table data into the address symbol mapping object.
5. A method for processing a stack address in a crash file as recited in claim 1 or 2, wherein said computing a real crash address from said local crash address and a local crash base address comprises:
And calculating the difference value of the local collapse address and the local collapse base address, and taking the difference value as a real collapse address.
6. A method for handling a stack address in a crash file as recited in claim 1 or 3, wherein calculating an offset based on the queried symbol table data comprises:
and calculating the difference value of the real crash address and the calling start address in the inquired symbol table data, and taking the difference value as an offset.
7. The method of claim 1, wherein the tokenization result comprises:
the information of the crash file, a local crash address in the crash file, a function call corresponding to the local crash address in the inquired symbol table data, and an offset corresponding to the local crash address;
further, the method further comprises:
and displaying the symbolized result.
8. An apparatus for handling a stack address in a crash file, comprising:
the analysis module is used for analyzing the crash file and acquiring a local crash address and a local crash base address in the crash file;
the real address calculation module is used for calculating a real crash address according to the local crash address and the local crash base address;
The query module is used for querying symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping object;
the offset calculation module is used for calculating the offset according to the inquired symbol table data;
a result determining module, configured to determine a symbolization result of a stack address in the crash file based on the queried symbol table data and the offset;
the pre-constructed address symbol mapping object is constructed and generated by adopting the following method:
acquiring a system library file of an application operating system;
analyzing a system library file with a preset suffix name, reading symbol table contents in the system library file, and acquiring a stack address interval and corresponding function call when the system library file is crashed;
and storing symbol table data comprising the stack address interval and the corresponding function call to construct an address symbol mapping object.
9. The apparatus as recited in claim 8, wherein the crash file parsed by the parsing module comprises a crash file generated when an application based on the iOS system crashes.
10. The apparatus as claimed in claim 9, wherein the parsing the default suffix name system library file and reading the symbol table content in the system library file comprises:
Analyzing the system library file with suffix names of frame and dylib, and reading the symbol table content comprising function call and corresponding call start address and call end address from the character string table obtained by analysis according to the position of the symbol table content and the size of the symbol table content stored in the head information of the analyzed system library file.
11. An apparatus for handling a stack address in a crash file as recited in claim 9, wherein the system library file comprises a stored received system library file of the at least one application operating system;
further, the apparatus further comprises:
the system library file processing module is used for inquiring whether a system library file which is the same as the new system library file is stored or not when the new system library file is received; if not, analyzing the new system library file, and storing corresponding symbol table data into the address symbol mapping object.
12. An apparatus for handling a stack address in a crash file as recited in claim 8 or 9, wherein the real address computation module computes the real crash address by:
and calculating the difference value of the local collapse address and the local collapse base address, and taking the difference value as a real collapse address.
13. An apparatus for processing a stack address in a crash file as recited in claim 8 or 10, wherein the offset calculation module calculates the offset by:
and calculating the difference value of the real crash address and the calling start address in the inquired symbol table data, and taking the difference value as an offset.
14. The apparatus as recited in claim 8, wherein the symbolic result obtained by the result determination module comprises at least the following information:
and the information of the crash file, a local crash address in the crash file, a function call corresponding to the local crash address in the inquired symbol table data, and an offset corresponding to the local crash address.
15. An apparatus to process a stack address in a crash file as recited in claim 14, wherein the apparatus further comprises:
and the result display module is used for displaying the symbolized result.
16. A system for processing a stack address in a crash file, comprising a processor and a memory for storing processor-executable instructions,
the processor is configured to parse a crash file of an application, and obtain a local crash address and a local crash base address in the crash file; the real crash address is calculated according to the local crash address and the local crash base address; the system is also used for inquiring symbol table data corresponding to the real crash address in a pre-constructed address symbol mapping table; the system is also used for calculating the offset according to the inquired symbol table data; the symbolic result of the stack address in the crash file is determined based on the inquired symbol table data and the offset;
Wherein the processor constructs the address symbol mapping object by:
acquiring a system library file of an application operating system;
analyzing a system library file with a preset suffix name, reading symbol table contents in the system library file, and acquiring a stack address interval and corresponding function call when the system library file is crashed;
and storing symbol table data comprising the stack address interval and the corresponding function call to construct an address symbol mapping object.
17. The system for handling a stack address in a crash file of claim 16, wherein the system further comprises an iOS system library unit, coupled to the processor, for storing the received iOS system library file; and (c) a second step of,
the system library file with suffix names of frame and dylib is analyzed, and according to the position of the symbol table content stored in the head information of the analyzed system library file and the size of the symbol table content, the symbol table content comprising function call and corresponding call start address and call end address is read from the character string table obtained by analysis;
and constructing an address symbol mapping table according to the symbol table content obtained by analysis, and storing the address symbol mapping table.
18. The system for handling a stack address in a crash file of claim 17, wherein the iOS system library unit is further adapted to, when receiving a new system library file, query whether a system library file identical to the new system library file has been stored; if not, analyzing the new system library file, and storing corresponding symbol table data into the address symbol mapping table.
CN201710041483.3A 2017-01-20 2017-01-20 Method, device and system for processing stack address in crash file Active CN108334515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710041483.3A CN108334515B (en) 2017-01-20 2017-01-20 Method, device and system for processing stack address in crash file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710041483.3A CN108334515B (en) 2017-01-20 2017-01-20 Method, device and system for processing stack address in crash file

Publications (2)

Publication Number Publication Date
CN108334515A CN108334515A (en) 2018-07-27
CN108334515B true CN108334515B (en) 2022-07-15

Family

ID=62922210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710041483.3A Active CN108334515B (en) 2017-01-20 2017-01-20 Method, device and system for processing stack address in crash file

Country Status (1)

Country Link
CN (1) CN108334515B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408265B (en) * 2018-09-28 2022-05-10 广州虎牙信息科技有限公司 IOS abnormal operation protection method and device, terminal equipment and storage medium
CN110704302B (en) * 2019-09-02 2020-07-10 贝壳找房(北京)科技有限公司 Mapping relation establishing method and device, and system breakdown shunting method and device
CN110764945B (en) * 2019-10-23 2023-06-30 北京博睿宏远数据科技股份有限公司 Crash log processing method, device, equipment and storage medium
CN111258803B (en) * 2020-02-12 2023-03-28 北京字节跳动网络技术有限公司 Collapse positioning method and device and electronic equipment
CN112035185A (en) * 2020-09-01 2020-12-04 网易传媒科技(北京)有限公司 Data restoration method and device, storage medium and computing equipment
CN113111012B (en) * 2021-04-14 2023-07-25 景德镇市明泰精工瓷业有限公司 Application data locator generation method and application data locating method
CN113157731A (en) * 2021-05-24 2021-07-23 北京字节跳动网络技术有限公司 Symbol analysis method, device, equipment and storage medium
CN114356434B (en) * 2021-11-26 2024-03-26 北京达佳互联信息技术有限公司 Page loading method, device, apparatus, storage medium and program product
CN114595198B (en) * 2022-03-15 2023-09-05 抖音视界有限公司 Crash analysis method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704908A (en) * 2004-05-26 2005-12-07 华为技术有限公司 Method for locating program abnormity
CN101593147A (en) * 2009-04-15 2009-12-02 卡斯柯信号有限公司 Abnormal information dump method based on symbol file
CN101719090A (en) * 2009-12-25 2010-06-02 珠海市君天电子科技有限公司 Method for automatically analyzing crash cause of computer software system
CN104199749A (en) * 2014-09-17 2014-12-10 百度在线网络技术(北京)有限公司 Crash information processing method and crash information processing device
CN104516732A (en) * 2013-09-29 2015-04-15 北京新媒传信科技有限公司 Application crash report method and system
CN105117020A (en) * 2015-09-23 2015-12-02 努比亚技术有限公司 Edge interactive operation processing method and mobile terminal
CN106133698A (en) * 2014-03-17 2016-11-16 微软技术许可有限责任公司 Framework for user model collapse report
CN106325927A (en) * 2016-08-19 2017-01-11 北京金山安全管理系统技术有限公司 Interception method and device applied to dynamic library API (Application Program Interface) in Linux system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8631390B2 (en) * 2010-04-02 2014-01-14 Apple Inc. Archiving a build product
US9069656B2 (en) * 2012-09-28 2015-06-30 Apple Inc. Obfuscating function resources while reducing stack consumption
US9990161B2 (en) * 2014-12-17 2018-06-05 Vmware, Inc. Consistent replication of virtual computing instance data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704908A (en) * 2004-05-26 2005-12-07 华为技术有限公司 Method for locating program abnormity
CN101593147A (en) * 2009-04-15 2009-12-02 卡斯柯信号有限公司 Abnormal information dump method based on symbol file
CN101719090A (en) * 2009-12-25 2010-06-02 珠海市君天电子科技有限公司 Method for automatically analyzing crash cause of computer software system
CN104516732A (en) * 2013-09-29 2015-04-15 北京新媒传信科技有限公司 Application crash report method and system
CN106133698A (en) * 2014-03-17 2016-11-16 微软技术许可有限责任公司 Framework for user model collapse report
CN104199749A (en) * 2014-09-17 2014-12-10 百度在线网络技术(北京)有限公司 Crash information processing method and crash information processing device
CN105117020A (en) * 2015-09-23 2015-12-02 努比亚技术有限公司 Edge interactive operation processing method and mobile terminal
CN106325927A (en) * 2016-08-19 2017-01-11 北京金山安全管理系统技术有限公司 Interception method and device applied to dynamic library API (Application Program Interface) in Linux system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Automatic collection of failure data from the iOS platform;Marcello Cinque 等;《2013 43rd Annual IEEE/IFIP Conference on Dependable Systems and Networks Workshop (DSN-W)》;20130930;第1-8页 *
BPEL流程异常处理的可终止性验证研究;蒋曹清;《中国博士学位论文全文数据库 信息科技辑》;20160115(第01(2016)期);I138-21 *
iOS开发 - iOS崩溃堆栈信息的符号化解析;skylin19840101;《CSDN博客 https://blog.csdn.net/skylin19840101/article/details/50329231》;20160818;全文 *

Also Published As

Publication number Publication date
CN108334515A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
CN108334515B (en) Method, device and system for processing stack address in crash file
TWI698813B (en) Method and device for data storage and query based on blockchain
US10481964B2 (en) Monitoring activity of software development kits using stack trace analysis
CN107391101B (en) Information processing method and device
CN107133165B (en) Browser compatibility detection method and device
CN107066519B (en) Task detection method and device
US8639560B2 (en) Brand analysis using interactions with search result items
CN110647562A (en) Data query method and device, electronic equipment and storage medium
CN108228443B (en) Web application testing method and device
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN115686961A (en) Processor testing method and device and electronic equipment
CN107391528B (en) Front-end component dependent information searching method and equipment
CN110633220A (en) Debugging information display method and device, storage medium and electronic equipment
CN110602163B (en) File uploading method and device
CN112181479A (en) Method and device for determining difference between code file versions and electronic equipment
CN111488144A (en) Data processing method and equipment
CN107562533B (en) Data loading processing method and device
CN111324803A (en) Query request processing method and device of search engine and client
Acosta et al. Analysis of OpenCL support for mobile GPUs on android
CN111539200B (en) Method, device, medium and electronic equipment for generating rich text
CN114817803A (en) Page skipping method and device and electronic equipment
CN109600418B (en) Method, device, equipment and system for tracking application access
CN109062797B (en) Method and device for generating information
CN111625432B (en) Page loading time consumption determination method and device and computer readable storage medium
CN108446113B (en) Class name acquisition method and device and electronic equipment

Legal Events

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