CN108334515A - The method, apparatus and system of stack address in file are collapsed in a kind of processing - Google Patents

The method, apparatus and system of stack address in file are collapsed in a kind of processing Download PDF

Info

Publication number
CN108334515A
CN108334515A CN201710041483.3A CN201710041483A CN108334515A CN 108334515 A CN108334515 A CN 108334515A CN 201710041483 A CN201710041483 A CN 201710041483A CN 108334515 A CN108334515 A CN 108334515A
Authority
CN
China
Prior art keywords
address
file
collapse
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.)
Granted
Application number
CN201710041483.3A
Other languages
Chinese (zh)
Other versions
CN108334515B (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

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

Abstract

The application provides a kind of method, apparatus and system handling stack address in collapse file.The method includes:Parsing collapse file obtains the local breakdown address in the collapse file and local collapse base address;True breakdown address is calculated according to the local breakdown address and local collapse base address;The corresponding symbol table data of the true breakdown address are inquired in the address mark mapping table built in advance;Offset is calculated according to the symbol table data inquired;The symbolism result of stack address in the collapse file is determined based on the symbol table data inquired and the offset.Utilize each embodiment of the application, accurately the breakdown address in multiple collapse files can be converted, realize the processing collapse file of mass, substantially reduce dependence of the symbolism processing to former application operating system system, the transfer efficiency for improving processing collapse file, improves the treatment effeciency of collapse file.

Description

The method, apparatus and system of stack address in file are collapsed in a kind of processing
Technical field
The application belongs to a kind of side of stack address in technical field of communication processing more particularly to processing collapse file Method, apparatus and system.
Background technology
In the actual development process of the application of intelligent terminal, or when user uses application program in intelligent terminal The case where waiting, often will appear application crash, this can cause user to be discontented with application program.In order to go out to application program The place now collapsed is repaired, usually based on iOS's (ihpone operation system, ihpone operating system) When application program is collapsed, a collapse file is will produce, is called when having recorded application crash in the collapse file Allocating stack address, by carrying out symbolism processing to the collapse file, including hexadecimal storehouse when will collapse Location, which resolves to, to specify the information such as class, function and line number in artificial identifiable corresponding program code.
Currently, during developing iOS application programs, developer is monitoring corresponding iOS application programs generation When collapse, usually the mobile terminal for running iOS application programs is connected with the terminal (for example, computer) with iOS operating systems, And the system library file collapsed in file and mobile terminal is uploaded in terminal, it is that there are symbol chemical industry in terminal lookup system Tool.If there is symbolism tool such as symbolicatecrash, then inquire in terminal is in catalogue where system library file It is no exist with the corresponding system library file of collapse file, if it is present further judge system library file with the presence or absence of with from The identical system library subfile of file identification information read in collapse file.If there is system library subfile, then symbol Chemical industry tool carries out symbolism processing according to system library subfile to collapse file, and the breakdown address information that will be collapsed in file turns It is changed to function information, developer is facilitated to repair the place to collapse, wherein includes symbolism in system library subfile Collapse the symbol table information of the breakdown address information in file.Fig. 1 is a system library symbolism provided using Apple Inc. Tool carries out the flow diagram of symbolism processing, the symbolism tool that atos, lipo etc. provide for system in Fig. 1, and uuid is For one system library file of unique mark, after finding the corresponding system library of collapse file, according to some in collapse file The inquiry local system computer libraries uuid of system library are with the presence or absence of system library consistent uuid.
However, current iOS system is applied after generating collapse file, to the breakdown address of system library in the collapse file Need when symbolism processing carrying out symbolism, such as symbolicatecrash by the symbolism tool that Apple Computers carry Symbolism tool, and need to ensure to generate the iOS system inventory of collapse file in current computer, therefore cannot be satisfied batch The demand that system library in multiple collapse files under the multiple system library versions of symbolism calls, seriously affects iOS developer The defect of finder and the efficiency solved the problems, such as.Dependence of the existing this symbolism mode to the operating system of terminal By force, such as during hand-off process terminal, user needs manually to move the corresponding system library subfile of analysis collapse file It moves to correct position, so that Xcode can find them, it, can not be accurate if user does not move corresponding system library subfile Symbolism really is carried out to collapse file, symbolism success rate is relatively low.And the semiosis that system library calls is a comparison Complicated process, if user needs the symbolism of batch to collapse file, during file is collapsed in symbolism, user needs Symbolism tool is used for multiple times, and the system library file of the different editions by being preserved in terminal is limited, terminal can not be accurate The multiple collapse files of symbolism of true mass.Include the breakdown address of hundreds of system libraries in one collapse file, if If thousands of collapse files input simultaneously, program symbolism will become to consume very much memory, cannot meet fast resolving Process demand.
Certainly, in addition to iOS application operating systems, other application operating systems (some non-openings but provide api interface Terminal operating system) the case where equally facing similar above-mentioned iOS system.Therefore, it is produced under the operation operating system of existing middle application Raw collapse file carries out the mode of symbolism processing, and treatment effeciency is low, cannot be satisfied the multiple system library versions of batch symbolism The demand that system library in multiple collapse files under this calls, seriously affects the defect and solution of system developer's finder The certainly efficiency of problem.
Invention content
The application is designed to provide a kind of method, apparatus and system handling stack address in collapse file, Ke Yishi The stack address to the generation collapse in collapse file of existing rapid batch is converted, and the processing collapse text of mass is realized Part substantially reduces dependence of the symbolism processing to former application operating system system, improves the transfer efficiency of processing collapse file, Improve the treatment effeciency of collapse file.
The method, apparatus and system of stack address are realized in a kind of processing collapse file provided by the present application:
A method of stack address in processing collapse file, the method includes:
The collapse file of application is parsed, the local breakdown address in the collapse file and local collapse base address are obtained;
True breakdown address is calculated according to the local breakdown address and local collapse base address;
The corresponding symbol table data of the true breakdown address are inquired in the address mark mapping object built in advance;
Offset is calculated according to the symbol table data inquired;
The symbol of stack address in the collapse file is determined based on the symbol table data inquired and the offset Number change result.
The device of stack address in file is collapsed in a kind of processing, including:
Parsing module collapses file for parsing, and obtains the local breakdown address in the collapse file and local collapse Base address;
True address computing module, for calculating and really collapsing according to the local breakdown address and local collapse base address Routed address;
Enquiry module, it is corresponding for inquiring the true breakdown address in the address mark mapping object built in advance Symbol table data;
Offset computing module, the symbol table data for being inquired according to calculate offset;
As a result determining module, for determining the collapse text based on the symbol table data inquired and the offset The symbolism result of stack address in part.
The system of stack address in a kind of processing collapse file, including processor and processor is executable to be referred to for storing The memory of order,
The processor is configured to, the collapse file for parsing application, obtains this land fall in the collapse file Routed address and local collapse base address;It is additionally operable to calculate and really collapse according to the local breakdown address and local collapse base address Routed address;It is additionally operable to inquire the corresponding symbol table number of the true breakdown address in the address mark mapping table built in advance According to;It is additionally operable to the symbol table data inquired according to and calculates offset;It is additionally operable to based on the symbol table number inquired According to the symbolism result for determining stack address in the collapse file with the offset.
The method, apparatus and system of stack address, can collect application in a kind of processing collapse file provided by the present application Operating system such as iOS system multiple version multiple systems library, and the symbol table in system library file can be exported, it is formed Address mark mapping object (page, table etc.).And then described address symbol mapping object batch can be passed through when file is collapsed in processing Amount quickly finds the corresponding symbol table data of breakdown address, realizes the symbolism processing of system library stack address.Utilize this Application embodiment can improve collapse file real time parsing treatment effeciency, meet the place that batch collapses files in batch breakdown address Reason demand can reduce memory consumption when terminal processes compared to existing processing mode, improve stack address in application system Symbolism treatment effeciency.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments described in application, for those of ordinary skill in the art, in the premise of not making the creative labor property Under, other drawings may also be obtained based on these drawings.
Fig. 1 is that a flow that symbolism processing is carried out using the system library symbolism tool that Apple Inc. provides is illustrated Figure;
Fig. 2 is a kind of method flow of embodiment of method of stack address in a kind of herein described processing collapse file Figure;
Fig. 3 is system library breakdown address information in the collapse file for parsed in the application one embodiment application scenarios acquisition Schematic diagram;
Fig. 4 is to read the file that part framework in system library is suffix in a kind of embodiment scene of the application to illustrate Figure;
Fig. 5 is that the file schematic diagram that part dylib in system library is suffix is read in a kind of embodiment of the application;
Fig. 6 is the main information schematic diagram that iOS system library symbol table content includes in a kind of embodiment of the application;
Fig. 7 is the partial content schematic diagram that guiding system library symbol table content obtains in a kind of embodiment of the application;
Fig. 8 is the exemplary plot of the symbolism result obtained in a kind of embodiment of the application the application;
Fig. 9 is flow diagram derived from one iOS system library collection system library file of the application and symbol table information;
Figure 10 is a kind of module knot of embodiment of device of stack address in a kind of processing collapse file provided by the present application Structure schematic diagram;
Figure 11 is the module of the device another kind embodiment of stack address in a kind of processing collapse file provided by the present application Structural schematic diagram;
Figure 12 is the module of the device another kind embodiment of stack address in a kind of processing collapse file provided by the present application Structural schematic diagram;
Figure 13 is that the structure of system one embodiment of stack address in a kind of processing collapse file provided by the present application is shown It is intended to.
Specific implementation mode
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality The attached drawing in example is applied, technical solutions in the embodiments of the present application is clearly and completely described, it is clear that described implementation Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common The every other embodiment that technical staff is obtained without creative efforts should all belong to the application protection Range.
Fig. 2 is a kind of method flow of embodiment of method of stack address in a kind of herein described processing collapse file Figure.Although this application provides such as following embodiments or method operating procedure shown in the drawings or apparatus structure, based on conventional Less operation step after may include either more in the method or device without performing creative labour or part merging Rapid or modular unit.In the step of there is no necessary causalities in logicality or structure, the execution sequence of these steps or The modular structure of device is not limited to the embodiment of the present application or execution shown in the drawings sequence or modular structure.The method or mould The device in practice or end product of block structure are in application, can be according to embodiment or method shown in the drawings or module The execution of structure carry out sequence is either parallel to be executed (such as the environment of parallel processor or multiple threads, even include distribution The implementation environment of formula processing).
Below for the sake of clarity, the application one embodiment is accorded with stack address in the collapse file of iOS system Number change processing an example illustrated for application scenarios.It, can will be our but skilled artisans appreciate that arrive The connotation of case is applied under the implement scene using other application operating system, that is, includes collection application system such as iOS more A version multiple systems library and in system library file stack address and corresponding encoding information table export, formed The relationship that address mark maps is realized in batches, quickly when file is collapsed in processing by inquiring described address symbol mapping relations System library stack address symbolism processing, reduce dependence to original application operating system, improve collapse file and solve in real time Treatment effeciency and accuracy are analysed, the processing load of terminal memory is reduced.Replaceability description will not be done below, for other-end application The applicability of the implement scene of operating system will not tire out herein to be stated.
In the application scenarios of the embodiment of the present application, for the deficiency of existing iOS system library stack address symbolism scheme, originally One embodiment of application takes following embodiments to optimize and reaches certain effect of optimization, including:IOS is collected in advance The system library file of each version of operating system, such as the system library file of each version can be uploaded by developer;It will receive Collecting the symbol table information in all system libraries obtained and exporting to data storage cell and stored (can be collectively referred to as ground herein Location symbol mapping object may include the storage units such as the database, table, page of multiple types or form), may include specifically Exploitation tool exports to the contents of the section in database, convenient follow-up progress symbolism;Obtain the collapse for needing to parse Address letter information in file inquires address mark mapping object, includes the calculating Jing Guo ad hoc fashion, obtains system library storehouse The symbolism result data of address.A kind of specific embodiment is as shown in Fig. 2, in a kind of processing collapse file provided by the present application In a kind of embodiment of the method for stack address, the method may include:
S1:Parsing collapse file obtains the local breakdown address in the collapse file and local collapse base address.
After obtaining collapse file to be treated, the collapse file can be parsed.In general, the collapse Include the corresponding local breakdown address with respective version application operating system library and local collapse base address in file.It is described Local collapse base address can be understood as base address, be the calculating benchmark of relative displacement, usually can with register come Addressing.Common, the base address locally collapsed is a kind of address of the pointer variable of static state, in an a set of or version Application operating system in remain unchanged.Certainly, in one embodiment of the application, if the base address of a system becomes More, then the synchronization of system library version can be realized more by updating data in the address mark mapping object built in advance accordingly Newly.The application that the local breakdown address can be understood as recording in the collapse file sends address when collapse.
In a specific example, the local breakdown address for the collapse document analysis acquisition that such as some iOS applications are generated And local collapse base address is as shown in figure 3, Fig. 3 is in the collapse file for parsed in the application one embodiment application scenarios acquisition The schematic diagram of system library breakdown address information.As shown in figure 3, can include one or more system library in a collapse file Breakdown address information, every breakdown address information may include such as lower part:First part be collapse system library name (such as Libdispatch.dylib), second part be system library collapse local breakdown address (such as:0x37b2c4b7), Part III Local for system library collapse collapses base address (such as:0x37b2b000), Part IV be breakdown address offset (as+ 5303)。
In the present embodiment, the collapse file of application can be parsed, obtaining include in the collapse file several is System library breakdown address information, every system library breakdown address information may include local breakdown address and local collapse base address.
S2:True breakdown address is calculated according to the local breakdown address and local collapse base address.
Further, it can accordingly be calculated very according to the local breakdown address and local collapse base address of acquisition Real breakdown address.The application is not precluded in different application operating systems is based on the local breakdown address and this using other Ground collapse base address calculates the embodiment of true breakdown address.In the implement scene of the present embodiment iOS application operating systems, It is described that true breakdown address is calculated according to the local breakdown address and local collapse base address, including:
S201:The local breakdown address and the local difference for collapsing base address are calculated, using the difference as very Real breakdown address.
In the present embodiment, following methods may be used and calculate true breakdown address:
True breakdown address=local breakdown address-local collapses base address.
In the example of specific calculating system library breakdown address information as described in Figure 3,
True breakdown address=0x37b2c4b7-0x37b2b000
S3:The corresponding symbol table number of the true breakdown address is inquired in the address mark mapping object built in advance According to.
Storage breakdown address (the true collapse ground of the collapse file of corresponding parsing can be built in the embodiment of the present application in advance Location) corresponding in system library file symbolism data.Therefore, by it is above-mentioned true breakdown address is calculated after, can To go the data in address mark mapping object according to the true breakdown address for calculating acquisition, the symbol table number inquired is obtained According to result.
The address mark mapping object may include specifically storage breakdown address and symbol table data mapping relations Storage unit, may include specifically table in database or page storage etc..Certainly, described in other embodiments Address mark mapping object can also include other data storage methods or data memory format.The address mark mapping Object can be built by being parsed to each system library file that developer uploads after exporting corresponding symbol table content It generates, is then store in specified data library.Specifically, stack address in a kind of processing collapse file provided by the present application In a kind of embodiment of method, following manner structure described address symbol mapping object may be used:
S20:Obtain the system library file of application operating system;
S21:System library file to presetting suffix name parses, and reads in the symbol table in the system library file Hold, obtains stack address section when collapsing and corresponding function call;
S22:Storage includes the symbol table data of the stack address section and corresponding function call, is built into address Symbol mapping object.
In an application scenarios of the embodiment of the present application, the application operating system includes iOS system, correspondingly, institute It includes the collapse file generated when the application based on iOS system is collapsed to state collapse file.Certainly, other application operating systems The mode that system again may be by above-mentioned S20~S22 builds to obtain address mark mapping object.
It, can be to two class system libraries in system library that iOS is used in the present embodiment based in the implement scene of iOS system File carries out dissection process, and one kind is that framework is suffix, and one kind is the file that dylib is suffix, and two class files are not Under same catalogue, its full dose can be read out in the present embodiment.Therefore, described above to may include to default suffix name The system library file of the entitled framework and dylib types of suffix.Read the system library file of obtained above-mentioned two suffix Partial file content is as shown in Figure 4 and Figure 5.Fig. 4 is to be read in a kind of embodiment scene after part framework is in system library The file schematic diagram sewed, Fig. 5 are that the file schematic diagram that part dylib in system library is suffix is read in a kind of embodiment.Then The export of the symbol table content stored in the system library file for sewing entitled framework and dylib can be obtained and be collapsed When stack address section and corresponding function call.Therefore, described right in another embodiment of herein described method The system library file of default suffix name is parsed, and the symbol table content in the system library file is read, including:
S211:The system library file for parsing the entitled framework and dylib of suffix, according to the system library text of the parsing The symbol table content position stored in the header information of part and symbol table content size, in the string table analytically obtained Read includes function call and the corresponding symbol table content called initial address and call end address.
Specifically, in iOS system, the symbol table content in system library file is that file is stored in the form of binary In.The part can be needed the symbol content information extracted to export in database by the embodiment of the present application.In general, iOS systems The symbol table content for including in system library file includes mainly three parts, as shown in fig. 6, Fig. 6 is in a kind of embodiment of the application The main information schematic diagram that iOS system library symbol table content includes.As shown in fig. 6, main information, which includes uuid, (identifies the system Unique ID of library file), cpu type of architecture (mainly has armv7, arm64, armv7s etc.), a cpu frameworks quantity (system Library file may include multiple type of architecture), magic types (identify the system library file and belong to 64 iOS systems or 32 Position iOS system) etc..
The information of symbol table content position is recorded in the header information of system library file, is protected in the form of binary It deposits.The header information is divided into many sections, can be divided into several pieces under each section.Include under the section of wherein entitled _ _ TEXT Have different piece information, referred to as section header, mainly have _ _ text and _ _ stubs (64 iOS systems) or _ _ Picsymbolstub4 (32 iOS systems), accurately stores symbol table content position and symbol table content size.
In iOS system, symbol table content is stored in string table, passes through above-mentioned symbol table content position And the record information of size can read the content of string table (string table), and the present embodiment can be obtained after parsing What is needed includes function call and the corresponding symbol table content called initial address and call end address.The embodiment of the present application In stack address section and corresponding function call when can collapse these symbol table content as being stored in Symbol table data in address mark mapping object.Fig. 7 is that guiding system library symbol table content obtains in a kind of embodiment of the application The partial content schematic diagram arrived, as shown in fig. 7, obtained symbol table partial content mainly includes the field information of three parts, the A part is the hexadecimal initial address (such as 1004) of the calling, and second part is the hexadecimal end address of the calling (such as 103c), Part III are function call (such as-[EAAccessoryManager init]).It can will include above-mentioned three In the field information storage to database divided, structure generates a kind of address mark mapping table (entity of address mark mapping object Form).
Therefore, when the embodiment of the present application inquires true breakdown address corresponding symbol table data, querying condition can be set Condition include that true breakdown address is-greater-than symbol table calls start of line address, in-less-than symbol table to call row end address.Symbol Number table calls start of line address and end address as shown in Figure 7.
S4:Offset is calculated according to the symbol table data inquired.
According to inquiry acquisition as a result, can calculate for calculating offset.The application is not precluded within different application behaviour Make in system using other embodiments based on symbol table data calculating offset.In the present embodiment iOS application operating systems Implement scene in, the symbol table data that are inquired described in the basis calculate offset and may include:
S401:It calculates the true breakdown address and calls the difference of initial address in the symbol table data inquired Value, using the difference as offset.
The symbol table data that the calculating of offset is obtained dependent on inquiry, specific calculation formula can be as follows:
Offset=true breakdown address-calling start of line address.
S5:Stack address in the collapse file is determined based on the symbol table data inquired and the offset Symbolism result.
After obtaining symbol table data and corresponding to the offset of true breakdown address accordingly, it may be determined that this calculating is collapsed The symbolism result of stack address in routed file.In general, in the specific data format of symbolism result and information that determine Holding can be determined by developing demand or the design of designer.In a kind of embodiment provided by the present application, the symbolism Result may include:
S501:The information and the local breakdown address collapsed in file, the symbol inquired of the collapse file In table data and the corresponding function call of the local breakdown address, offset corresponding with the local breakdown address.
The information of the collapse file may include the filename or system library filename of the collapse file of processing, such as libdispach.dylib.Local breakdown address and corresponding function call and offset can be used for uniquely determining collapse Address and function information etc., for for user's orientation problem, carrying out repair process etc..
The symbolism result can be directly displayed to user, so that user can be visually seen the output result of symbolism. Therefore, further the method can also include:
S6:Show the symbolism result.
Fig. 8 is the exemplary plot of the symbolism result obtained in a kind of embodiment of the application.It can directly will be shown in fig. 8 The data information of one or more symbolism result is shown in front end.Certainly, the application is not excluded in other embodiments, can be with It is stored determining in the tables of data that is output in specified destination address of symbolic result or other kinds of storage unit, very Extremely, including to the symbolism result it is converted again, converts, deforms, correcting, adding annotation etc. and being stored or shown after processing The embodiment shown.
In aforementioned, the system library file of each version of iOS operating systems is collected in advance, such as can be uploaded by developer The system library file of each version;By collect obtain all system libraries in symbol table information export to data storage cell into Row storage (can be collectively referred to as address mark mapping object, may include the database, table, page of multiple types or form herein Etc. storage units), may include specifically that exploitation tool exports to the contents of the section in database, it is convenient follow-up to carry out Symbolism.In a kind of embodiment provided by the present application, collection and dissection process application operating system different system library text are provided The system platform of part, the system platform can be made of one or more servers.Developer can submit application operating The system library file of system is to system platform, and by system platform manage the system library file, including to parse each system library each The symbol table data of version, and preserved.The system platform can be configured to carry out the system library file of submission Legitimacy detects, and whether inquiry has existed identical system library file.Specifically, the another kind of herein described method In embodiment, the system library file includes the system library file at least one application operating system of storage received;
Further, the method can also include:When receiving new system library file, execute whether inquiry has deposited Storage system library file identical with the new system library file;If it is not, then parsing the new system library file, and store corresponding In symbol table data to described address symbol mapping object.
Certainly, when receiving new system library file, first the legitimacy of the new system library file can also be examined It surveys.
The rapid batch symbolism system library breakdown address implementation of the application design can be divided into two parts, one It is to collect iOS system library and exported to the symbol table in system library file to divide, and another part is system library in collapse file Stack address symbolism.
A specific example is as shown in figure 9, Fig. 9 is an iOS system library collection system library file and symbol table information Derived flow diagram, iOS system library is collected and system library file symbol table export flowchart process is described as follows:
1) developer submits iOS system library;
2) legitimacy detection is carried out to the system library of submission;
3) read system library in file, including framework be suffix and dylib be suffix;
4) symbol table information in the system library file read is imported into database.
It can specifically include:
1) the iOS system library that developer submits.
In general, (catalogue is the specified directory in the computer of iOS developer:/ Users/ computer users name/ Library/Developer/Xcode/iOS DeviceSupport/) under usually exist several iOS versions system library.It opens The system library can be supplied to system platform by hair personnel, which can provide visual interface, make developer can be with Uploading system library file is to platform.
2) system library legitimacy detects.
The system that can be provided developer in the present embodiment scene is screened, and packet can be arranged in the condition of screening It includes:
Whether this document is iOS system library file, can specifically be known by the fileinfo read in system library file Not, as in file whether include this document unique id, referred to as uuid, there have to be then legal, without then illegal;
Whether the corresponding version number of this document and structure number have existed, i.e., before whether submitted excessively identical iOS System library file.Need not be imported if having existed, there is no if need to import.
3) file in system library is read.
Include two class files in system library, one kind is that framework is suffix, and one kind is the text that dylib is suffix Part, two class files need to read out its full dose under different catalogues.
4) export of system library file symbol table information.
The symbol table information of system library is to be stored in the form of binary hereof (with symbol content information above-mentioned), It needs to export to the partial symbols table information in database.
By previous embodiment and example it is found that the side of stack address in file is collapsed in a kind of processing provided by the present application Method, can collect application operating system such as iOS system multiple version multiple systems library, and to the symbol table in system library file into Row export, forms address mark mapping object (page, table etc.).And then described address symbol can be passed through when file is collapsed in processing Mapping object batch quickly finds the corresponding symbol table data of breakdown address, realizes the symbolism of system library stack address Processing.Collapse file real time parsing treatment effeciency can be improved using the application embodiment, meets batch collapse files in batch The process demand of breakdown address can reduce memory consumption when terminal processes compared to existing processing mode, improve application system The symbolism treatment effeciency of stack address in system.
Based on the method for stack address in the processing collapse file described in above-described embodiment or scene, at the application also offer The device of stack address in reason collapse file.The device may include the client for having used herein described method, be System (including distributed system), software (application), module, component, server etc. simultaneously combine the necessary device for implementing hardware.Base In same innovation thinking, the device in a kind of embodiment provided by the present application is as described in the following examples.Since device solves The implementation of problem is similar to method, therefore the implementation of the specific device of the application may refer to the implementation of preceding method, weight Multiple place repeats no more.Used below, the software of predetermined function and/or hard may be implemented in term " unit " or " module " The combination of part.Although device described in following embodiment is preferably realized with software, hardware or software and hardware Combination realization be also may and be contemplated it is specific.Figure 10 is storehouse in a kind of processing collapse file provided by the present application A kind of modular structure schematic diagram of embodiment of device of address, as shown in Figure 10, described device may include:
Parsing module 101 can be used for parsing collapse file, obtain the local breakdown address collapsed in file and this Ground collapses base address;
True address computing module 102 can be used for being calculated according to the local breakdown address and local collapse base address Go out true breakdown address;
Enquiry module 103 can be used in the address mark mapping object built inquiring the true collapse ground in advance The corresponding symbol table data in location;
Offset computing module 104, the symbol table data that can be used for inquiring according to calculate offset;
As a result determining module 105 can be used for determining institute based on the symbol table data inquired and the offset State the symbolism result of stack address in collapse file.
The device of stack address, can collect application operating system in advance in a kind of processing collapse file provided by the present application Such as iOS system multiple version multiple systems library, and the symbol table in system library file can be exported, form address mark Mapping object (page, table etc.).And then it can be by described address symbol mapping object in batches, quickly when file is collapsed in processing The corresponding symbol table data of breakdown address are found, realize the symbolism processing of system library stack address.Implemented using the application Scheme can improve collapse file real time parsing treatment effeciency, meet the process demand that batch collapses files in batch breakdown address, Memory consumption when terminal processes can be reduced compared to existing processing mode, improve the symbolism of stack address in application system Treatment effeciency.
Such as the system library file of each version of iOS operating systems can be collected in advance, such as can be by developer Pass the system library file of each version;Symbol table information in all system libraries for collecting acquisition is exported into data storage cell Enter and is stored in address mark mapping object.Therefore, in another embodiment of herein described device, the advance structure Address mark mapping object include using following manner structure generate:
Obtain the system library file of application operating system;
System library file to presetting suffix name parses, and reads the symbol table content in the system library file, obtains Take stack address section when collapsing and corresponding function call;
Storage includes the symbol table data of the stack address section and corresponding function call, is built into address mark Mapping object.
Device described herein can be used in iOS application operating systems, can effectively realize in batch collapse file The symbolism of stack address is handled.Therefore, in a kind of embodiment scene, the collapse file of the parsing module parsing includes being based on The collapse file that the application of iOS system generates when collapsing.Skilled artisans appreciate that arrive, it can be by this programme Connotation is applied under the implement scene using other application operating system.
In the implement scene based on iOS system, two class system library files in system library that iOS is used can be carried out Dissection process, one kind are that framework is suffix, and one kind is the file that dylib is suffix, and two class files are in different catalogues Under.In iOS system, the symbol table content in system library file is stored hereof in the form of binary.The application is implemented The part can be needed the symbol content information extracted to export in database by example.Therefore, described device provided by the present application Another embodiment in, the system library file of described pair of default suffix name parses, and reads in the system library file Symbol table content may include:
The system library file for parsing the entitled framework and dylib of suffix, according to the head of the system library file of the parsing The symbol table content position stored in portion's information and symbol table content size read packet in the string table analytically obtained Include function call and the corresponding symbol table content called initial address and call end address.
The system library file includes the system library file at least one application operating system of storage received;
Further, described device can also include:
System library document processing module 106 can be used for when receiving new system library file, and whether inquiry is stored System library file identical with the new system library file;If it is not, then parsing the new system library file, and store corresponding symbol In number table data to described address symbol mapping object.
Figure 11 is the module of the device another kind embodiment of stack address in a kind of processing collapse file provided by the present application Structural schematic diagram can collect the system library file of each version of iOS operating systems in advance as shown in figure 11, such as can be by Developer uploads the system library file of each version;Symbol table information in all system libraries for collecting acquisition is exported into number Stored according to storage unit (can be collectively referred to as address mark mapping object, may include multiple types or form herein The storage units such as database, table, page), may include specifically that exploitation tool exports to the contents of the section in database, Convenient follow-up progress symbolism.In a kind of embodiment provided by the present application, collection and dissection process application operating system are provided The system platform of different system library file, the system platform can be made of one or more servers.Developer can be with It submits the system library file of application operating system to system platform, by system platform manage the system library file, including parses each The symbol table data of a each version of system library, and preserved.The system platform can be configured to Library file of uniting carries out legitimacy detection, and whether inquiry has existed identical system library file.
It is described in another kind processing collapse file in the implement scene of the iOS application operating systems of the device of stack address True address computing module may be used following manner and calculate the true breakdown address:
The local breakdown address and the local difference for collapsing base address are calculated, using the difference as true collapse Address.
And offset computing module described in some embodiments may be used following manner and calculate the offset:
It calculates the true breakdown address and calls the difference of initial address in the symbol table data inquired, with institute Difference is stated as offset.
Certainly, the application be not precluded in different application operating systems using other be based on the local breakdown address and Local collapse base address calculates the embodiment of true breakdown address, and is based on symbol table data using other and calculates offset Embodiment.
After obtaining symbol table data and corresponding to the offset of true breakdown address accordingly, it may be determined that this calculating is collapsed The symbolism result of stack address in routed file.In general, in the specific data format of symbolism result and information that determine Holding can be determined by developing demand or the design of designer.In another embodiment of described device provided by the present application, The symbolism result that the result determining module obtains includes at least following information:
The information and the local breakdown address collapsed in file, the symbol table number inquired of the collapse file In and the corresponding function call of the local breakdown address, offset corresponding with the local breakdown address.
Local breakdown address and corresponding function call and offset can be used for uniquely determining address and the letter of collapse Number information etc., for for user's orientation problem, carrying out repair process etc..Figure 12 is a kind of processing collapse file provided by the present application The modular structure schematic diagram of the device another kind embodiment of middle stack address, as shown in figure 12, the symbolism result can be with It is directly displayed to user, so that user can be visually seen the output result of symbolism.Therefore, in another embodiment, described one kind The device of stack address can also include in processing collapse file:
Result display module 107 is displayed for the symbolism result.
Can include directly in front end by the data information of one or more symbolism result shown in fig. 8.Certainly, originally Application is not excluded in other embodiments, can will determine symbolic result be output to tables of data in specified destination address or its It is stored in the storage unit of his type, even, including the symbolism result is converted again, converts, deform, repairing Just, the embodiment for being stored or being shown after the processing such as addition annotation.
The aforementioned method or apparatus of the application can be used in operation system or the application of multiple terminal equipment, with reality Now reduce the purpose that memory overhead, batch quickly carry out stack address symbolism processing.Therefore, apply for innovative idea substantially, this Application also provides a kind of system handling stack address in collapse file.The system may include the (service of a terminal device Device) implement scene such as the Batch Processing server in physical logic can also include being made of multiple terminal devices Cluster or server system.Specifically, in a kind of embodiment, the system may include processor and for storing processor The memory of executable instruction,
The processor is configured to, and can parse collapse file, obtains the local breakdown address in the collapse file Base address is collapsed with local;True breakdown address is calculated according to the local breakdown address and local collapse base address;Pre- The corresponding symbol table data of the true breakdown address are inquired in the address mark mapping table first built;It is inquired according to described Symbol table data calculate offset;It is determined in the collapse file based on the symbol table data inquired and the offset The symbolism result of stack address.
Further include iOS system library unit in the other embodiment of the system, is coupled in the processor, can be used for Store the iOS system library file received;And
It is additionally operable to the system library file of the entitled framework and dylib of parsing suffix, according to the system library text of the parsing The symbol table content position stored in the header information of part and symbol table content size, in the string table analytically obtained Read includes function call and the corresponding symbol table content called initial address and call end address;
The symbol table content obtained according to parsing is built into address mark mapping table, storage described address symbol mapping Table.
Figure 13 is the system (symbolism processing system) one of stack address in a kind of processing collapse file provided by the present application The structural schematic diagram of a embodiment.In this way, the data information and breakdown address corresponding function call of storage breakdown address Data information can store in the system.When user needs to handle collapse file, can collapse file be uploaded to and be It unites, the stack address information of needs is obtained after system analysis, is then inquired in the address mark mapping table of iOS system library unit Symbol table data are obtained, query result is obtained.Certainly, the application is not excluded in other embodiments, and the iOS system library is single Member or even described address symbol mapping table is stored in logic in the separated equipment of the system, such as special server The storage unit etc. that storage unit or third party provide.At this point, the system can pass through scheduled communication modes and storage Unit interacts, and obtains the symbolism result of true breakdown address.
The system not only can also carry out corresponding management and control with collection system library file.Specifically, the application carries In another embodiment of the system supplied, the iOS system library unit can be also used for, when receiving new system library file When inquiry whether stored system library file identical with the new system library file;If it is not, then parsing the new system library File, and store in corresponding symbol table data to described address symbol mapping table.
The method, system of stack address, can collect application operating system such as in a kind of processing collapse file provided by the present application IOS system multiple version multiple systems library, and the symbol table in system library file can be exported, it forms address mark and reflects Penetrate object (page, table etc.).And then it can in batches, quickly be looked by described address symbol mapping object when file is collapsed in processing The corresponding symbol table data of breakdown address are found, realize the symbolism processing of system library stack address.Utilize the application embodiment party Case can improve collapse file real time parsing treatment effeciency, meet the process demand that batch collapses files in batch breakdown address, phase Memory consumption when terminal processes can be reduced than existing processing mode, improved in application system at the symbolism of stack address Manage efficiency.
It should be noted that device or system described above can also include other embodiment, as system can be examined Survey whether the new system library file is the legal system library file of the application operating system etc., specifically the side of being referred to The description realization method of method related embodiment, this will not be repeated here.Certainly, provided by the present application in addition to iOS application operating systems Embodiment is also applied to based on other application operating systems (some non-openings but the terminal operation for providing api interface System) collapse file in stack address symbolism handle implement scene in.
Although mentioning file, the symbol of different suffix names in the verification of iOS system library, identification iOS system library in teachings herein Parsing/read method, offset and the true breakdown address of number table information calculate, the tables of data of data base querying or the like is fixed The descriptions such as justice, collapse file process, data interaction, judgement, calculating, still, the application is not limited to meet in the industry Application system handles standard or data communication standard, communication mode, standard iOS syntax rules, standard computer language or this Shen It please situation described in embodiment.It is omited on certain professional standards or the practice processes described using self-defined mode or embodiment Add modified embodiment can also realize above-described embodiment it is identical, it is equivalent or it is close or deformation after it is anticipated that implementation effect Fruit.Using the embodiment of the acquisitions such as these modifications or the acquisition of deformed data definition, generation, judgement, processing mode, still may be used To belong within the scope of the optional embodiment of the application.
Although this application provides the method operating procedure as described in embodiment or flow chart, based on conventional or noninvasive The means for the property made may include more or less operating procedure.The step of being enumerated in embodiment sequence is only numerous steps A kind of mode in execution sequence does not represent and unique executes sequence.It, can be with when device in practice or end product execute According to embodiment, either method shown in the drawings sequence executes or parallel executes (such as parallel processor or multiple threads Environment, even distributed data processing environment).The terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that process, method, product or equipment including a series of elements are not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, product or equipment Intrinsic element.In the absence of more restrictions, be not precluded including the element process, method, product or There is also other identical or equivalent elements in person's equipment.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, vehicle-mounted human-computer interaction device, cellular phone, camera phone, smart phone, individual Digital assistants, media player, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or The combination of any equipment in these equipment of person.
For convenience of description, it is divided into various modules when description apparatus above with function to describe respectively.Certainly, implementing this The function of each module is realized can in the same or multiple software and or hardware when application, can also will realize same work( Can module by multiple submodule or subelement combination realize etc..Device embodiment described above is only schematic , for example, the division of the unit, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, Such as multiple units or component can be combined or can be integrated into another system, or some features can be ignored, or do not hold Row.Another point, shown or discussed mutual coupling, direct-coupling or communication connection can be by some interfaces, The INDIRECT COUPLING or communication connection of device or unit can be electrical, machinery or other forms.
It is also known in the art that other than realizing controller in a manner of pure computer readable program code, it is complete Entirely can by by method and step carry out programming in logic come so that controller with logic gate, switch, application-specific integrated circuit, programmable The form of logic controller and embedded microcontroller etc. realizes identical function.Therefore this controller is considered one kind Hardware component, and the structure that the device for realizing various functions that its inside includes can also be considered as in hardware component.Or Person even, can will be considered as either the software module of implementation method can be hardware again for realizing the device of various functions Structure in component.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, group Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage device.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method Part explanation.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (20)

1. a kind of method of stack address in processing collapse file, which is characterized in that the method includes:
The collapse file of application is parsed, the local breakdown address in the collapse file and local collapse base address are obtained;
True breakdown address is calculated according to the local breakdown address and local collapse base address;
The corresponding symbol table data of the true breakdown address are inquired in the address mark mapping object built in advance;
Offset is calculated according to the symbol table data inquired;
The symbolism of stack address in the collapse file is determined based on the symbol table data inquired and the offset As a result.
2. the method for stack address in a kind of processing collapse file as described in claim 1, which is characterized in that use following sides Formula builds described address symbol mapping object:
Obtain the system library file of application operating system;
System library file to presetting suffix name parses, and reads the symbol table content in the system library file, obtains hair Stack address section when raw collapse and corresponding function call;
Storage includes the symbol table data of the stack address section and corresponding function call, is built into address mark mapping Object.
3. the method for stack address in a kind of processing collapse file as claimed in claim 2, which is characterized in that the application behaviour Include iOS system as system, correspondingly, the collapse file includes collapsing using what is generated when collapsing based on iOS system Routed file.
4. the method for stack address in a kind of processing collapse file as claimed in claim 3, which is characterized in that described pair default The system library file of suffix name is parsed, and the symbol table content in the system library file is read, including:
The system library file for parsing the entitled framework and dylib of suffix is believed according to the head of the system library file of the parsing The symbol table content position stored in breath and symbol table content size, it includes letter to read in the string table analytically obtained Number calls and the corresponding symbol table content called initial address and call end address.
5. the method for stack address in a kind of processing collapse file as claimed in claim 2, which is characterized in that the system library File includes the system library file at least one application operating system of storage received;
Further, the method further includes:When receiving new system library file, whether inquiry is stored with the new system The identical system library file of system library file;If it is not, then parsing the new system library file, and store corresponding symbol table data extremely In described address symbol mapping object.
6. the method for stack address in a kind of processing collapse file as described in claim 1 or 3, which is characterized in that described True breakdown address is calculated according to the local breakdown address and local collapse base address, including:
The local breakdown address and the local difference for collapsing base address are calculated, using the difference as true collapse ground Location.
7. the method for stack address in a kind of processing collapse file as described in claim 1 or 4, which is characterized in that according to institute It states the symbol table data inquired and calculates offset, including:
It calculates the true breakdown address and calls the difference of initial address in the symbol table data inquired, with the difference Value is used as offset.
8. the method for stack address in a kind of processing collapse file as described in claim 1, which is characterized in that the symbolism As a result include:
In the information and the local breakdown address collapsed in file, the symbol table data inquired of the collapse file And the corresponding function call of the local breakdown address, offset corresponding with the local breakdown address;
Further, the method further includes:
Show the symbolism result.
9. the device of stack address in a kind of processing collapse file, which is characterized in that including:
Parsing module obtains the local breakdown address in the collapse file and local collapse base for parsing collapse file Location;
True address computing module, for calculating true collapse ground according to the local breakdown address and local collapse base address Location;
Enquiry module, for inquiring the corresponding symbol of the true breakdown address in the address mark mapping object built in advance Table data;
Offset computing module, the symbol table data for being inquired according to calculate offset;
As a result determining module, for being determined in the collapse file based on the symbol table data inquired and the offset The symbolism result of stack address.
10. the device of stack address in a kind of processing collapse file as claimed in claim 9, which is characterized in that described advance The address mark mapping object of structure includes being generated using following manner structure:
Obtain the system library file of application operating system;
System library file to presetting suffix name parses, and reads the symbol table content in the system library file, obtains hair Stack address section when raw collapse and corresponding function call;
Storage includes the symbol table data of the stack address section and corresponding function call, is built into address mark mapping Object.
11. the device of stack address in a kind of processing collapse file as claimed in claim 10, which is characterized in that the parsing The collapse file of module parsing includes the collapse file generated when the application based on iOS system is collapsed.
12. the device of stack address in a kind of processing collapse file as claimed in claim 11, which is characterized in that described to pre- If the system library file of suffix name is parsed, the symbol table content in the system library file is read, including:
The system library file for parsing the entitled framework and dylib of suffix is believed according to the head of the system library file of the parsing The symbol table content position stored in breath and symbol table content size, it includes letter to read in the string table analytically obtained Number calls and the corresponding symbol table content called initial address and call end address.
13. the device of stack address in a kind of processing collapse file as claimed in claim 10, which is characterized in that the system Library file includes the system library file at least one application operating system of storage received;
Further, described device further includes:
System library document processing module, for when receiving new system library file, whether inquiry is stored with the new system The identical system library file of system library file;If it is not, then parsing the new system library file, and store corresponding symbol table data extremely In described address symbol mapping object.
14. the device of stack address in a kind of processing collapse file as described in claim 9 or 11, which is characterized in that described True address computing module calculates the true breakdown address using following manner:
The local breakdown address and the local difference for collapsing base address are calculated, using the difference as true collapse ground Location.
15. the device of stack address in a kind of processing collapse file as described in claim 9 or 12, which is characterized in that described Offset computing module calculates the offset using following manner:
It calculates the true breakdown address and calls the difference of initial address in the symbol table data inquired, with the difference Value is used as offset.
16. the device of stack address in a kind of processing collapse file as claimed in claim 9, which is characterized in that the result The symbolism result that determining module obtains includes at least following information:
In the information and the local breakdown address collapsed in file, the symbol table data inquired of the collapse file And the corresponding function call of the local breakdown address, offset corresponding with the local breakdown address.
17. the device of stack address in a kind of processing collapse file as claimed in claim 16, which is characterized in that described device Further include:
Result display module, for showing the symbolism result.
18. the system of stack address in a kind of processing collapse file, which is characterized in that handled including processor and for storage The memory of device executable instruction,
The processor is configured to, the collapse file for parsing application, obtains the local collapse ground in the collapse file Location and local collapse base address;It is additionally operable to calculate true collapse ground according to the local breakdown address and local collapse base address Location;It is additionally operable to inquire the corresponding symbol table data of the true breakdown address in the address mark mapping table built in advance;Also Symbol table data for being inquired according to calculate offset;It is additionally operable to based on the symbol table data inquired and institute State the symbolism result that offset determines stack address in the collapse file.
19. the system of stack address in file is collapsed in a kind of processing as claimed in claim 18, which is characterized in that the system is also Including iOS system library unit, coupling and the processor, for storing the iOS system library file received;And
It is additionally operable to the system library file of the entitled framework and dylib of parsing suffix, according to the system library file of the parsing The symbol table content position stored in header information and symbol table content size are read in the string table analytically obtained Including function call and the corresponding symbol table content called initial address and call end address;
The symbol table content obtained according to parsing is built into address mark mapping table, stores described address symbol mapping table.
20. the system of stack address in file is collapsed in a kind of processing as claimed in claim 19, which is characterized in that the iOS systems System library unit is additionally operable to, and when receiving new system library file, whether inquiry is stored identical with the new system library file System library file;If it is not, then parsing the new system library file, and stores corresponding symbol table data to described address symbol and reflect In firing 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 true CN108334515A (en) 2018-07-27
CN108334515B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408265A (en) * 2018-09-28 2019-03-01 广州虎牙信息科技有限公司 A kind of guard method, device, terminal device and storage medium that IOS is operating abnormally
CN110704302A (en) * 2019-09-02 2020-01-17 贝壳技术有限公司 Mapping relation establishing method and device, and system breakdown shunting method and device
CN110764945A (en) * 2019-10-23 2020-02-07 北京博睿宏远数据科技股份有限公司 Crash log processing method, device, equipment and storage medium
CN111258803A (en) * 2020-02-12 2020-06-09 北京字节跳动网络技术有限公司 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
CN113111012A (en) * 2021-04-14 2021-07-13 景德镇市明泰精工瓷业有限公司 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
CN114356434A (en) * 2021-11-26 2022-04-15 北京达佳互联信息技术有限公司 Page loading method, equipment, device, storage medium and program product
CN114595198A (en) * 2022-03-15 2022-06-07 北京字节跳动网络技术有限公司 Breakdown analysis method and device, electronic equipment and storage medium

Citations (11)

* 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
US20110246964A1 (en) * 2010-04-02 2011-10-06 Apple Inc. Archiving a Build Product
US20140095812A1 (en) * 2012-09-28 2014-04-03 Appli Inc. Obfuscating function resources while reducing stack consumption
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
US20160179437A1 (en) * 2014-12-17 2016-06-23 Vmware, Inc. Consistent replication of virtual computing instance data
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

Patent Citations (11)

* 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
US20110246964A1 (en) * 2010-04-02 2011-10-06 Apple Inc. Archiving a Build Product
US20140095812A1 (en) * 2012-09-28 2014-04-03 Appli Inc. Obfuscating function resources while reducing stack consumption
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
US20160179437A1 (en) * 2014-12-17 2016-06-23 Vmware, Inc. Consistent replication of virtual computing instance data
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
MARCELLO CINQUE 等: "Automatic collection of failure data from the iOS platform", 《2013 43RD ANNUAL IEEE/IFIP CONFERENCE ON DEPENDABLE SYSTEMS AND NETWORKS WORKSHOP (DSN-W)》 *
SKYLIN19840101: "iOS开发 - iOS崩溃堆栈信息的符号化解析", 《CSDN博客 HTTPS://BLOG.CSDN.NET/SKYLIN19840101/ARTICLE/DETAILS/50329231》 *
蒋曹清: "BPEL流程异常处理的可终止性验证研究", 《中国博士学位论文全文数据库 信息科技辑》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408265A (en) * 2018-09-28 2019-03-01 广州虎牙信息科技有限公司 A kind of guard method, device, terminal device and storage medium that IOS is operating abnormally
CN109408265B (en) * 2018-09-28 2022-05-10 广州虎牙信息科技有限公司 IOS abnormal operation protection method and device, terminal equipment and storage medium
CN110704302A (en) * 2019-09-02 2020-01-17 贝壳技术有限公司 Mapping relation establishing method and device, and system breakdown shunting method and device
CN110764945A (en) * 2019-10-23 2020-02-07 北京博睿宏远数据科技股份有限公司 Crash log processing method, device, equipment and storage medium
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
CN111258803A (en) * 2020-02-12 2020-06-09 北京字节跳动网络技术有限公司 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
CN113111012A (en) * 2021-04-14 2021-07-13 景德镇市明泰精工瓷业有限公司 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
WO2022247442A1 (en) * 2021-05-24 2022-12-01 北京字节跳动网络技术有限公司 Symbol parsing method and apparatus, and device and storage medium
CN114356434A (en) * 2021-11-26 2022-04-15 北京达佳互联信息技术有限公司 Page loading method, equipment, device, storage medium and program product
CN114356434B (en) * 2021-11-26 2024-03-26 北京达佳互联信息技术有限公司 Page loading method, device, apparatus, storage medium and program product
CN114595198A (en) * 2022-03-15 2022-06-07 北京字节跳动网络技术有限公司 Breakdown analysis method and device, electronic equipment and storage medium
CN114595198B (en) * 2022-03-15 2023-09-05 抖音视界有限公司 Crash analysis method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108334515B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN108334515A (en) The method, apparatus and system of stack address in file are collapsed in a kind of processing
JP6804668B2 (en) Block data validation method and equipment
CN108664812A (en) Information desensitization method, apparatus and system
CN108090064A (en) A kind of data query method, apparatus, data storage server and system
CN110007957A (en) Call link construction method, device and equipment
CN111355816B (en) Server selection method, device, equipment and distributed service system
CN105630475B (en) A kind of data label organization system and method for organizing
CN107391101A (en) A kind of information processing method and device
CN108171267A (en) User group partitioning method and device, information push method and device
CN110134668A (en) Data migration method, device and equipment applied to block chain
JP2015530666A (en) Data indexing method and apparatus
US8417688B2 (en) Converting two-tier resource mapping to one-tier resource mapping
JP6865763B2 (en) Data processing method and equipment
CN107066519A (en) A kind of task detection method and device
CN108848244A (en) A kind of method and device of Pagination Display
CN108268289A (en) Method for parameter configuration, the apparatus and system of web applications
CN105488176A (en) Data processing method and device
CN106933907B (en) Processing method and device for data table expansion indexes
CN108399175A (en) A kind of storage of data, querying method and its device
CN109739814A (en) A kind of storage of file and method for down loading, device and equipment
CN106557343A (en) Systematic function application and the method and device of loading resource
CN110602163B (en) File uploading method and device
CN105550240B (en) A kind of method and device of recommendation
CN112286706A (en) Remote and rapid acquisition method for application information of android application and related equipment
CN103176843B (en) The file migration method and apparatus of MapReduce distributed system

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