A data processing method and device, electronic equipment and storage medium

By generating symbol tables and mapping tables for application crash logs, the problem of unsymbolized crash logs being difficult to understand is solved, enabling more efficient crash cause localization and resource saving, and it is applicable to multiple operating systems.

CN116467105BActive Publication Date: 2026-07-07BEIJING 58 INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING 58 INFORMATION TECH
Filing Date
2023-03-22
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, crash logs when an application crashes are not symbolized, making it difficult for developers to understand and locate the cause of the crash, increasing the difficulty and cost of troubleshooting.

Method used

By obtaining the component name and offset address from the application's crash log, a symbol table and mapping table for the component are generated, the target symbol name and offset address are determined, and readable prompts are output to help developers locate the cause of the crash.

Benefits of technology

It reduces the difficulty and cost for developers to locate the cause of application crashes, improves the efficiency of location, saves system resources, adapts to multiple operating systems, and reduces deployment and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116467105B_ABST
    Figure CN116467105B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device, electronic equipment and storage medium. A crash log of an application program is obtained, the crash log including a component name of a component having a crash content and a first offset address of the crash content in the component, a mapping table of the component is obtained according to the component name, a target second offset address and a target symbol name corresponding to the target second offset address are determined in the mapping table, the target second offset address includes a largest second offset address in second offset addresses smaller than the first offset address in the mapping table, a third offset address of the crash content in a target symbol corresponding to the target symbol name is obtained according to the first offset address and the target second offset address, and the target symbol name and the third offset address are prompted. According to the application, the difficulty and cost of a developer in locating a cause of an application program crash according to a crash log are reduced, and efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of technology, applications are becoming increasingly important in people's lives and work. In order to better serve users, manufacturers often develop applications with various functions.

[0003] For example, developers can develop the computer program code for an application in an integrated development tool, compile the developed application's computer program code to obtain the application's installation package, and then release the application's installation package to the public so that users can download the application's installation package and install the application on their own terminals, thereby using the application. Summary of the Invention

[0004] This application discloses a data processing method, apparatus, electronic device, and storage medium.

[0005] In a first aspect, this application discloses a data processing method applied to an electronic device, wherein an application program runs in the memory of the electronic device, the method comprising:

[0006] In the event of an application crash, obtain the application's crash log, which contains at least: the component name of the component containing the crash content and the first offset address of the crash content within that component, indicating that the application crash was caused at least by the crash content;

[0007] The mapping table of the component is obtained based on the component name. The mapping table of the component includes a mapping table between the symbol names of the symbols in the component and the second offset address of the symbols in the component in the component.

[0008] In the mapping table, a target second offset address and a target symbol name corresponding to the target second offset address are determined. The target second offset address includes the largest second offset address among the second offset addresses in the mapping table that are smaller than the first offset address.

[0009] The third offset address of the crash content in the target symbol corresponding to the target symbol name is obtained based on the first offset address and the target second offset address;

[0010] Output a prompt message, which includes the target symbol name and the third offset address. The prompt message is used to indicate that the offset address of the crash content in the target symbol corresponding to the target symbol name is the third offset address.

[0011] In an optional implementation, obtaining the mapping table of the component based on the component name includes:

[0012] The starting address of the component in memory is obtained based on the component name, and the symbol table of the component is obtained based on the component name. The symbol table of the component includes the symbol name of each symbol in the component and the loading address of each symbol in the component in memory.

[0013] The mapping table is generated based on the starting address, the symbol names of each symbol in the component, and the memory loading addresses of each symbol in the component.

[0014] In an optional implementation, generating the mapping table based on the starting address, the symbol names of each symbol in the component, and the memory load addresses of each symbol in the component includes:

[0015] Based on the starting address and the loading addresses of each symbol in the component in memory, obtain the second offset address of each symbol in the component within the component;

[0016] The mapping table is generated based on the symbol name of each symbol in the component and the second offset address of each symbol in the component.

[0017] In an optional implementation, obtaining the second offset address of each symbol in the component within the component based on the starting address and the load address of each symbol in the component in memory includes:

[0018] For any symbol in the component, the difference between the load address of the symbol in memory and the starting address can be calculated, and the second offset address of the symbol in the component can be obtained based on the difference.

[0019] In an optional implementation, obtaining the starting address of the component in memory based on the component name includes:

[0020] Based on the component name, a first preset command is invoked to obtain the starting address of the component in memory returned by the first preset command. The first preset command is used to obtain at least the starting address of the component in memory based on the component name.

[0021] In an optional implementation, obtaining the symbol table of the component based on the component name includes:

[0022] The second preset command is invoked based on the component name to obtain the symbol table of the component returned by the second preset command. The second preset command is used to obtain at least the symbol table of the component based on the component name.

[0023] In an optional implementation, the method further includes:

[0024] Store the binding relationship between the component name and the mapping table.

[0025] In an optional implementation, obtaining the mapping table of the component based on the component name includes:

[0026] Find the binding relationship based on the component name;

[0027] Obtain the mapping table from the binding relationship.

[0028] In an optional implementation, obtaining the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the first offset address and the target second offset address includes:

[0029] Calculate the difference between the first offset address and the target second offset address;

[0030] The third offset address of the crash content in the target symbol corresponding to the target symbol name is obtained based on the difference.

[0031] Secondly, this application discloses a data processing apparatus applied to an electronic device, wherein an application program runs in the memory of the electronic device, the apparatus comprising:

[0032] The first acquisition module is used to acquire the crash log of the application in the event of the application crash, wherein the crash log contains at least: the component name of the component where the crash content is located and the first offset address of the crash content in the component, and the application crash is caused at least by the crash content;

[0033] The second acquisition module is used to acquire the mapping table of the component according to the component name. The mapping table of the component includes a mapping table between the symbol names of the symbols in the component and the second offset address of the symbols in the component in the component.

[0034] The determination module is used to determine the target second offset address and the target symbol name corresponding to the target second offset address in the mapping table, wherein the target second offset address includes the largest second offset address among the second offset addresses in the mapping table that are smaller than the first offset address;

[0035] The third acquisition module is used to acquire the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the first offset address and the target second offset address;

[0036] An output module is used to output a prompt message, which includes the target symbol name and the third offset address. The prompt message is used to indicate that the offset address of the crash content in the target symbol corresponding to the target symbol name is the third offset address.

[0037] In one optional implementation, the second acquisition module includes:

[0038] The first acquisition unit is used to acquire the starting address of the component in memory according to the component name, and the second acquisition unit is used to acquire the symbol table of the component according to the component name, wherein the symbol table of the component includes the symbol name of each symbol in the component and the loading address of each symbol in the component in memory respectively.

[0039] The generation unit is used to generate the mapping table based on the starting address, the symbol names of each symbol in the component, and the loading addresses of each symbol in the component in memory.

[0040] In one optional implementation, the generation unit includes:

[0041] The subunit is configured to obtain the second offset address of each symbol in the component based on the starting address and the loading address of each symbol in the component in memory.

[0042] A subunit is generated to generate the mapping table based on the symbol name of each symbol in the component and the second offset address of each symbol in the component.

[0043] In an optional implementation, the acquisition subunit is specifically used to: for any symbol in the component, calculate the difference between the load address of the symbol in memory and the starting address, and obtain the second offset address of the symbol in the component based on the difference.

[0044] In one optional implementation, the first acquisition unit includes:

[0045] The first calling subunit is used to call a first preset command based on the component name to obtain the starting address of the component in memory returned by the first preset command. The first preset command is used to obtain at least the starting address of the component in memory based on the component name.

[0046] In one optional implementation, the second acquisition unit includes:

[0047] The second calling subunit is used to call a second preset command based on the component name to obtain the symbol table of the component returned by the second preset command. The second preset command is used to obtain at least the symbol table of the component based on the component name.

[0048] In an optional implementation, the second acquisition module further includes:

[0049] A storage unit is used to store the binding relationship between the component name and the mapping table.

[0050] In one optional implementation, the second acquisition module includes:

[0051] A lookup unit is used to find the binding relationship based on the component name;

[0052] The third acquisition unit is used to acquire the mapping table in the binding relationship.

[0053] In one optional implementation, the third acquisition module includes:

[0054] A calculation unit is used to calculate the difference between the first offset address and the target second offset address;

[0055] The fourth acquisition unit is used to acquire the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the difference.

[0056] Thirdly, this application discloses an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to perform the method as described in any of the preceding aspects.

[0057] Fourthly, this application discloses a non-transitory computer-readable storage medium in which, when the instructions in the storage medium are executed by a processor of an electronic device, enable the electronic device to perform the methods described in any of the preceding aspects.

[0058] Fifthly, this application discloses a computer program product in which, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in any of the preceding aspects.

[0059] The technical solution provided in this application may include the following beneficial effects:

[0060] In this application, in the event of an application crash, the application's crash log is obtained. The crash log contains at least: the component name of the component containing the crashed content and the first offset address of the crashed content within that component. The application crash is caused at least by the crashed content. A mapping table for the component is obtained based on the component name. This mapping table includes a mapping between the symbol names of symbols within the component and the second offset addresses of those symbols within the component. A target second offset address and a target symbol name corresponding to the target second offset address are determined in the mapping table. The target second offset address includes the largest second offset address among those smaller than the first offset address in the mapping table. A third offset address of the crashed content within the target symbol corresponding to the target symbol name is obtained based on the first offset address and the target second offset address. A prompt message is output, including the target symbol name and the third offset address, indicating that the offset address of the crashed content within the target symbol corresponding to the target symbol name is the third offset address.

[0061] This application allows the contents of crash logs to be interpreted as developer-readable symbol names (such as function names) in the source code, making it easier for developers to understand. This can better help developers locate the cause of application crashes, reduce the difficulty and cost for developers to locate the cause of application crashes based on crash logs, and improve the efficiency of developers in locating the cause of application crashes based on crash logs.

[0062] Secondly, the symbol table itself occupies a small space, which means that the system resources (including memory and CPU) required by the symbolization scheme for crash logs in this application are less, thus saving more system resources. Furthermore, since the symbol table itself occupies a small space, the time required for the use and processing of the symbol table in this application can be shorter, thereby saving time.

[0063] In addition, the crash log symbolization scheme of this application is compatible with various operating systems, such as various versions of iOS, making the crash log symbolization scheme of this application more universal.

[0064] Furthermore, the solution for symbolizing crash logs in this application does not depend on other platforms or other systems (e.g., it does not need to depend on macOS), resulting in low deployment costs, low usage costs, and low maintenance costs. Attached Figure Description

[0065] Figure 1 This is a flowchart of the steps of a data processing method according to this application.

[0066] Figure 2 This is a schematic diagram of the crash log of one application of this application.

[0067] Figure 3 This is a schematic diagram of a mapping table according to this application.

[0068] Figure 4 This is a flowchart of the steps of a method for obtaining a mapping table according to this application.

[0069] Figure 5 This is a schematic diagram of a symbol table according to this application.

[0070] Figure 6 This is a schematic diagram of a mapping table according to this application.

[0071] Figure 7 This is a structural block diagram of a data processing device according to this application.

[0072] Figure 8 This is a block diagram of an electronic device according to this application.

[0073] Figure 9 This is a block diagram of an electronic device according to this application. Detailed Implementation

[0074] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0075] Applications may sometimes crash while running in the terminal. If an application crashes while running in the terminal, it will result in a poor user experience and may lead to user churn.

[0076] Therefore, to avoid this situation, the application can be optimized to prevent it from crashing again while running in the terminal.

[0077] If an application crashes while running in a terminal, the terminal's operating system will generate a crash log for the application. The crash log records relevant information about the application crash. Developers can try to locate the cause of the application crash based on the crash log and optimize the application accordingly.

[0078] However, the inventors discovered that crash logs are unsymmetric, consisting of a collection of memory addresses, which makes them difficult to read. Developers find it hard to understand unsymmetric crash logs, which offer little help in resolving application crashes. This makes it difficult, inefficient, and costly for developers to locate the cause of application crashes based on crash logs.

[0079] Thus, the need arose to "reduce the difficulty and cost for developers to locate the cause of application crashes based on crash logs, and improve the efficiency of developers in locating the cause of application crashes based on crash logs."

[0080] In order to reduce the difficulty and cost for developers to locate the cause of application crashes based on crash logs and to improve the efficiency of developers in locating the cause of application crashes based on crash logs, the inventors came up with the idea of ​​symbolizing the contents of crash logs.

[0081] Symbolization refers to interpreting the stack traces and other contents in crash logs into developer-readable symbol names (such as function names) in the source code. This makes it easier for developers to understand and can better help them locate the cause of application crashes. It can reduce the difficulty and cost for developers to locate the cause of application crashes based on crash logs, and improve the efficiency of developers in locating the cause of application crashes based on crash logs.

[0082] Before introducing the solution of this application, the technical terms that may be involved in this application will be explained.

[0083] System commands: These include Linux commands, which are used to manage the Linux system. In a Linux system, everything—the CPU, memory, disk drives, keyboard, mouse, and even users—is considered a file. The commands that manage the Linux system are the core of its normal operation, similar to DOS commands. Linux commands are of two types: built-in shell commands and standard Linux commands.

[0084] Symbol table: In computer science, a symbol table is a data structure used in language translators (such as compilers and interpreters). In a symbol table, each identifier in the program's source code is bound to its declaration or usage information, such as its data type, scope, and memory address. In one example, the symbol table includes the symbol table of the iOS system libraries, which stores information such as system code and memory addresses.

[0085] Symbolization: In daily development, application crashes are inevitable during runtime. Typically, the exported crash logs are unsymbolized, consisting of a collection of memory addresses, making them difficult to read. Developers struggle to understand unsymbolized crash logs, which offer little help in troubleshooting application crashes. Symbolization involves interpreting the stack trace information into readable function or method names from the source code—the so-called symbols. Only after successful symbolization can crash logs better help developers pinpoint the cause of application crashes.

[0086] System libraries: These include iOS system libraries and Android system libraries, etc. Common iOS system libraries include...

[0087] Core Data.framework: database, Map Kit.framework: map, CoreAnimation.framework: animation, etc.

[0088] ASLR (Address Space Layout Randomization) is a security technique for preventing buffer overflows. It randomizes the layout of linear regions like the heap, stack, and shared library mappings, increasing the difficulty for attackers to predict the target address and preventing them from directly locating the malicious code. ASLR was introduced in iOS 4.3. It configures sensitive data (such as app login / registration and payment-related code) to an address that a malicious program cannot know beforehand, making it difficult for attackers to launch attacks. Because iOS uses ASLR for security when loading Mach-O files, the starting address of the binary Mach-O file in memory is different each time it is loaded, but the calculation rules for the offset, load address, and starting address are the same. The calculation rules are as follows:

[0089] The memory address where the data in the file is loaded = the starting address of the file in memory + the offset address of the data in the file.

[0090] Specifically, refer to Figure 1 The diagram illustrates a flowchart of a data processing method according to this application. This method is applied to an electronic device, where an application program runs in the device's memory. Specifically, the method may include the following steps:

[0091] In step S101, in the event of an application crash, the application's crash log is obtained. The crash log contains at least: the component name of the component containing the crash content and the first offset address of the crash content within that component. The application crash is at least caused by the crash content.

[0092] The components in this application may include libraries, which may include system libraries, third-party libraries, and libraries developed by application vendors themselves. In another dimension, they may also include static libraries or dynamic libraries.

[0093] The components mentioned herein can be understood as any constituent part of a development project that is applicable to this solution, such as an engineering project in an integrated development project, and / or reusable components for building different development projects (e.g., applications), such as payment components, communication components, audio / video playback components, database components, etc. Of course, it can also include components customized for a specific development project; this embodiment of the application does not limit this. Furthermore, the method of component division can be set according to actual needs, such as dividing components according to function or attributes according to business attributes. In the scenario of component-based development projects, at least one component pool can be pre-set, storing at least one reusable component. During the development process, components in the component pool can be used as needed to build different projects.

[0094] In one example, see Figure 2 , Figure 2 The screenshot includes a section of the crash log, specifically lines 25 to 35. Of course, it is understandable that the crash log may include other lines, which will not be listed here.

[0095] Figure 2 The data includes four columns. The first column records the line number (representing the line number in the crash log), the second column records the component name of the component containing the crash content, the third column records the loading address of the crash content in memory, and the fourth column includes two parts, such as the part to the left of "+" and the part to the right of "+". The part to the left of "+" records the starting address of the component in memory, and the part to the right of "+" records the first offset address of the crash content in the component.

[0096] The third column records the loading address of the crash content in memory, which is equal to the sum of the starting address of the component in memory recorded to the left of the "+" in the fourth column and the first offset address of the crash content in the component recorded to the right of the "+" in the fourth column.

[0097] Taking line 25 as an example, the second column of line 25 is "UIKitCore", which is the name of a component. The third column of line 25 is "0x000000019c5fd678", which is in hexadecimal format and represents the memory loading address of one of the crash contents in the component corresponding to the component name "UIKitCore". The third column of line 25 is "0x19c17f000+4712056", where "0x19c17f000" to the left of the "+" is the starting address of the component corresponding to the component name "UIKitCore" in memory, and "4712056" to the right of the "+" is the first offset address of the crash content in the component corresponding to the component name "UIKitCore".

[0098] "0x19c17f000" is in hexadecimal format, "4712056" is in decimal format, and the corresponding hexadecimal format is "47e678".

[0099] Furthermore, the other lines will not be explained one by one.

[0100] Regarding the component name "UIKitCore", the number of lines in the crash log that contain the component name "UIKitCore" indicates the number of crashes in the component corresponding to the component name "UIKitCore". The application crash is caused by at least these crashes in the component corresponding to the component name "UIKitCore".

[0101] In step S102, the mapping table of the component is obtained according to the component name. The mapping table of the component includes a mapping table between the symbol names of the symbols in the component and the second offset address of the symbols in the component in the component.

[0102] In one example, see Figure 3 , Figure 3 The screenshot includes a portion of the mapping table (10 rows in total). Of course, it is understandable that the mapping table may include other rows, which will not be listed here.

[0103] Figure 3 It includes two columns: the first column records the second offset address of the symbol in the component, and the second column records the symbol name of the symbol in the component.

[0104] For any row, the second offset address of the symbol corresponding to the symbol name recorded in the second column of that row in that component is the second offset address recorded in the first column of that row.

[0105] The specific method for obtaining the mapping table based on the component name can be found in the following sections. Figure 4 The embodiments shown are not described in detail here.

[0106] In step S103, the target second offset address and the target symbol name corresponding to the target second offset address are determined in the mapping table. The target second offset address includes the largest second offset address among the second offset addresses in the mapping table that are less than the first offset address.

[0107] In this application, step S101 obtains the first offset address of the crash content within the component, and step S102 obtains a mapping table containing the second offset addresses of each symbol within the component. Thus, based on the first offset address of the crash content and the second offset addresses of each symbol within the component, it can be determined which symbol within the component the crash content belongs to. For example, a second offset address smaller than the first offset address can be determined in the mapping table. If there is only one second offset address smaller than the first offset address, this address is used as the target second offset address. Alternatively, if there are two or more second offset addresses smaller than the first offset address, the largest second offset address is selected as the target second offset address. The target symbol name corresponding to the target second offset address in the mapping table is the symbol name of the symbol to which the crash content belongs.

[0108] In one example, suppose the first offset address of the crash content in this component is... Figure 2 In the example, the offset address to the right of the "+" in the fourth column of the first row is "4712056", which is in decimal format and the corresponding hexadecimal format is "47e678".

[0109] Figure 3The second offset addresses from the first column of the first row, "47e480", to the first column of the tenth row, "47e924", which are smaller than the hexadecimal first offset address "47e678" corresponding to the decimal first offset address "4712056", include "47e480", "47e5ac", "47e600", and "47e60c". Among the second offset addresses "47e480", "47e5ac", "47e600", and "47e60c", the largest second offset address is "47e60c". Therefore, the second offset address "47e60c" can be used as the target second offset address. Then, the symbol name in the fourth row corresponding to the target second offset address "47e60c" can be determined in the mapping table: "[UIViewController_sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled]".

[0110] In step S104, the third offset address of the crash content in the target symbol corresponding to the target symbol name is obtained based on the first offset address and the target second offset address.

[0111] In one embodiment of this application, the difference between the first offset address and the target second offset address can be calculated, and then the third offset address of the crash content in the target symbol corresponding to the target symbol name can be obtained based on the difference. For example, if the difference is an address length, the difference can be directly used as the third offset address of the crash content in the target symbol corresponding to the target symbol name.

[0112] For example, receiving Figure 2 and Figure 3 For example, you can calculate the difference "6c" between "the first offset address in decimal format '47e678' corresponding to the first offset address in hexadecimal format '4712056'" and the target second offset address "47e60c". This difference is in hexadecimal format and corresponds to "108". Then, "6c" can be used as the crash content in the third offset address of the symbol corresponding to the target symbol name "[UIViewController_sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled]".

[0113] In step S105, a prompt message is output, which includes the target symbol name and the third offset address. The prompt message is used to indicate that the offset address of the crash content in the target symbol corresponding to the target symbol name is the third offset address.

[0114] In this application, the third offset address in the prompt message can be in decimal format for easier understanding by developers.

[0115] After receiving the warning message, the developer can obtain at least two pieces of data, such as the target symbol name and the third offset address. Based on this, the developer can determine that the offset address of the crash content that caused the application to crash in the target symbol corresponding to the target symbol name is the third offset address.

[0116] In one embodiment, if the developer has the source code of the component, they can index the source code of the target symbol corresponding to the target symbol name in the source code of the component. Then, based on the third offset address, they can index the crash content (which may be a piece of code, etc.) in the source code of the target symbol, analyze and optimize it to eliminate the potential crash and prevent the application from crashing again.

[0117] In another embodiment, if the developer does not have the source code of the component, for example, if the component is provided by another vendor and that vendor has the source code of the component, then the target symbol name and the third offset address can be provided to the other vendor so that the other vendor can index the source code of the target symbol corresponding to the target symbol name in the source code of the component. Then, based on the third offset address, the crash content (which may be a piece of code, etc.) can be indexed in the source code of the target symbol, and analyzed and optimized to eliminate the potential crash. The optimized component can then be provided to the developer so that the developer can redeploy the optimized component and thus prevent the application from crashing again due to this.

[0118] In this application, in the event of an application crash, the application's crash log is obtained. The crash log contains at least: the component name of the component containing the crashed content and the first offset address of the crashed content within that component. The application crash is caused at least by the crashed content. A mapping table for the component is obtained based on the component name. This mapping table includes a mapping between the symbol names of symbols within the component and the second offset addresses of those symbols within the component. A target second offset address and a target symbol name corresponding to the target second offset address are determined in the mapping table. The target second offset address includes the largest second offset address among those smaller than the first offset address in the mapping table. A third offset address of the crashed content within the target symbol corresponding to the target symbol name is obtained based on the first offset address and the target second offset address. A prompt message is output, including the target symbol name and the third offset address, indicating that the offset address of the crashed content within the target symbol corresponding to the target symbol name is the third offset address.

[0119] This application allows the contents of crash logs to be interpreted as developer-readable symbol names (such as function names) in the source code, making it easier for developers to understand. This can better help developers locate the cause of application crashes, reduce the difficulty and cost for developers to locate the cause of application crashes based on crash logs, and improve the efficiency of developers in locating the cause of application crashes based on crash logs.

[0120] Secondly, the symbol table itself occupies a small space, which means that the system resources (including memory and CPU) required by the symbolization scheme for crash logs in this application are less, thus saving more system resources. Furthermore, since the symbol table itself occupies a small space, the time required for the use and processing of the symbol table in this application can be shorter, thereby saving time.

[0121] In addition, the crash log symbolization scheme of this application is compatible with various operating systems, such as various versions of iOS, making the crash log symbolization scheme of this application more universal.

[0122] Furthermore, the solution for symbolizing crash logs in this application does not depend on other platforms or other systems (e.g., it does not need to depend on macOS), resulting in low deployment costs, low usage costs, and low maintenance costs.

[0123] In another embodiment of this application, see Figure 4 Step S102 includes:

[0124] In step S201, the starting address of the component in memory is obtained based on the component name.

[0125] In one embodiment of this application, a first preset command can be invoked based on the component name to obtain the starting address of the component in memory returned by the first preset command. The first preset command is used to obtain at least the starting address of the component in memory based on the component name.

[0126] In one example, the first preset command can be a system command, etc., and the first preset command can include the "size-xml" command, etc.

[0127] In step S202, the symbol table of the component is obtained according to the component name. The symbol table of the component includes the symbol name of each symbol in the component and the loading address of each symbol in the component in memory.

[0128] In one embodiment of this application, a second preset command can be invoked based on the component name to obtain the symbol table of the component returned by the second preset command. The second preset command is used to obtain at least the symbol table of the component based on the component name.

[0129] The symbol names of each symbol in the symbol table of this component are sorted according to the order of their respective load addresses in memory.

[0130] In one example, the second preset command can be a system command, etc., and the second preset command can include the "nm-n" command, etc.

[0131] In one example, see Figure 5 , Figure 5 The screenshot includes a portion of the symbol table of the component, specifically a screenshot of a part of the symbol table of the component (27 lines in total). Of course, it is understandable that the symbol table of the component may also include other lines, which will not be listed here.

[0132] Figure 5 The data includes two columns: the first column records the memory address of the symbols in the component, and the second column records the symbol name of each symbol in the component.

[0133] In any row, the memory load address of the symbol corresponding to the symbol name recorded in the second column of that row is the load address recorded in the first column of that row.

[0134] Some symbol names in the symbol table of this component do not have corresponding memory load addresses, so these symbols can be ignored.

[0135] For example, Figure 5 The first column of rows 1-7 does not record the load address, so the symbol names in rows 1-7 can be ignored.

[0136] It should be noted that this application does not limit the execution order of steps S201 and S202. Step S201 can be executed first, followed by step S202, or step S202 can be executed first, followed by step S201, or steps S201 and S202 can be executed in parallel.

[0137] In step S203, a mapping table for the component is generated based on the starting address of the component in memory, the symbol names of each symbol in the component, and the loading addresses of each symbol in the component in memory.

[0138] In one embodiment of this application, this step can be implemented through the following process, including:

[0139] 2031. Based on the starting address of the component in memory and the loading address of each symbol in the component in memory, obtain the second offset address of each symbol in the component in the component.

[0140] In this step, for any symbol in the component, the difference between the symbol's load address in memory and the component's starting address in memory can be calculated. Then, the second offset address of the symbol in the component can be obtained based on this difference. For example, if the difference is an address length, it can be used as the second offset address of the symbol in the component.

[0141] In one example, with Figure 5 The eighth line is used as an example for illustration, but it is not intended to limit the scope of protection of this application.

[0142] Figure 5 The symbol name of the record in the second column of the eighth row is "[UIViewWell_commonInit]". Figure 5 The symbol name "[UIViewWell_commonInit]" recorded in the first column of the eighth row has a memory load address of "00000001821e999c", which is in hexadecimal.

[0143] Assuming the starting address of the component in memory obtained in step S201 is "0x1821e7000", the difference between the load address "00000001821e99c" and the starting address of the component in memory "0x1821e7000" can be calculated to obtain "299c", which is hexadecimal. Thus, "299c" can be used as the second offset address of the symbol corresponding to the symbol name "[UIViewWell_commonInit]" in the component.

[0144] for Figure 5 The same operation is performed on each of the nine to twenty-seventh lines in the code; examples are not provided here.

[0145] 2032. Generate a mapping table for the component based on the symbol names of each symbol in the component and the second offset address of each symbol in the component.

[0146] For example, an empty mapping table can be created. For any symbol, a corresponding entry can be formed by combining the symbol name and the symbol's second offset address within the component, and this entry can be stored in the created mapping table. The same operation can be performed for each other symbol to generate the mapping table for that component.

[0147] based on Figure 5 For example, Figure 5The symbol name "[UIViewWell_commonInit]" recorded in the second column of the eighth row, along with the calculated second offset address "299c", forms a corresponding entry "299c-[UIColorWell_commonInit]", which is stored in the created mapping table. Figure 5 Perform the same operation on each of lines 9 through 27 in the file to obtain the result. Figure 6 The mapping table shown.

[0148] In this application, Figure 4 The illustrated embodiment is the specific generation process of "obtaining the mapping table based on the component name".

[0149] When executing step S102, if there is no "mapping table for this component" at this time, then it can be performed according to... Figure 4 The illustrated embodiment generates a mapping table for the component in real time based on the component name.

[0150] Or, it has been done in advance according to Figure 4 The illustrated embodiment "generates a mapping table for the component based on the component name," and since the "mapping table for the component" has already been stored, the pre-stored "mapping table for the component" can be directly retrieved without needing to follow the steps again. Figure 4 The illustrated embodiment generates a mapping table for the component based on the component name in real time, thereby saving time and computing resources.

[0151] In view of this, in accordance with Figure 4 After generating the mapping table of the component based on the component name in the illustrated embodiment, the binding relationship between the component name and the generated mapping table of the component can be stored.

[0152] In this way, when retrieving the mapping table based on the component name, the binding relationship can be found based on the component name, and then the mapping table of the component in the binding relationship can be obtained.

[0153] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by this application.

[0154] Reference Figure 7 This diagram illustrates a structural block diagram of a data processing apparatus according to this application. The apparatus is applied to an electronic device, in which an application program runs in the memory of the electronic device. The apparatus includes:

[0155] The first acquisition module 11 is used to acquire the crash log of the application in the event of the application crash, wherein the crash log contains at least: the component name of the component where the crash content is located and the first offset address of the crash content in the component, and the application crash is caused at least by the crash content;

[0156] The second acquisition module 12 is used to acquire the mapping table of the component according to the component name. The mapping table of the component includes a mapping table between the symbol names of the symbols in the component and the second offset address of the symbols in the component in the component.

[0157] The determining module 13 is used to determine the target second offset address and the target symbol name corresponding to the target second offset address in the mapping table, wherein the target second offset address includes the largest second offset address among the second offset addresses in the mapping table that are smaller than the first offset address;

[0158] The third acquisition module 14 is used to acquire the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the first offset address and the target second offset address;

[0159] Output module 15 is used to output prompt information, the prompt information including the target symbol name and the third offset address, the prompt information being used to indicate that the offset address of the crash content in the target symbol corresponding to the target symbol name is the third offset address.

[0160] In one optional implementation, the second acquisition module includes:

[0161] The first acquisition unit is used to acquire the starting address of the component in memory according to the component name, and the second acquisition unit is used to acquire the symbol table of the component according to the component name, wherein the symbol table of the component includes the symbol name of each symbol in the component and the loading address of each symbol in the component in memory respectively.

[0162] The generation unit is used to generate the mapping table based on the starting address, the symbol names of each symbol in the component, and the loading addresses of each symbol in the component in memory.

[0163] In one optional implementation, the generation unit includes:

[0164] The subunit is configured to obtain the second offset address of each symbol in the component based on the starting address and the loading address of each symbol in the component in memory.

[0165] A subunit is generated to generate the mapping table based on the symbol name of each symbol in the component and the second offset address of each symbol in the component.

[0166] In an optional implementation, the acquisition subunit is specifically used to: for any symbol in the component, calculate the difference between the load address of the symbol in memory and the starting address, and obtain the second offset address of the symbol in the component based on the difference.

[0167] In one optional implementation, the first acquisition unit includes:

[0168] The first calling subunit is used to call a first preset command based on the component name to obtain the starting address of the component in memory returned by the first preset command. The first preset command is used to obtain at least the starting address of the component in memory based on the component name.

[0169] In one optional implementation, the second acquisition unit includes:

[0170] The second calling subunit is used to call a second preset command based on the component name to obtain the symbol table of the component returned by the second preset command. The second preset command is used to obtain at least the symbol table of the component based on the component name.

[0171] In an optional implementation, the second acquisition module further includes:

[0172] A storage unit is used to store the binding relationship between the component name and the mapping table.

[0173] In one optional implementation, the second acquisition module includes:

[0174] A lookup unit is used to find the binding relationship based on the component name;

[0175] The third acquisition unit is used to acquire the mapping table in the binding relationship.

[0176] In one optional implementation, the third acquisition module includes:

[0177] A calculation unit is used to calculate the difference between the first offset address and the target second offset address;

[0178] The fourth acquisition unit is used to acquire the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the difference.

[0179] In this application, in the event of an application crash, the application's crash log is obtained. The crash log contains at least: the component name of the component containing the crashed content and the first offset address of the crashed content within that component. The application crash is caused at least by the crashed content. A mapping table for the component is obtained based on the component name. This mapping table includes a mapping between the symbol names of symbols within the component and the second offset addresses of those symbols within the component. A target second offset address and a target symbol name corresponding to the target second offset address are determined in the mapping table. The target second offset address includes the largest second offset address among those smaller than the first offset address in the mapping table. A third offset address of the crashed content within the target symbol corresponding to the target symbol name is obtained based on the first offset address and the target second offset address. A prompt message is output, including the target symbol name and the third offset address, indicating that the offset address of the crashed content within the target symbol corresponding to the target symbol name is the third offset address.

[0180] This application allows the contents of crash logs to be interpreted as developer-readable symbol names (such as function names) in the source code, making it easier for developers to understand. This can better help developers locate the cause of application crashes, reduce the difficulty and cost for developers to locate the cause of application crashes based on crash logs, and improve the efficiency of developers in locating the cause of application crashes based on crash logs.

[0181] Secondly, the symbol table itself occupies a small space, which means that the system resources (including memory and CPU) required by the symbolization scheme for crash logs in this application are less, thus saving more system resources. Furthermore, since the symbol table itself occupies a small space, the time required for the use and processing of the symbol table in this application can be shorter, thereby saving time.

[0182] In addition, the crash log symbolization scheme of this application is compatible with various operating systems, such as various versions of iOS, making the crash log symbolization scheme of this application more universal.

[0183] Furthermore, the solution for symbolizing crash logs in this application does not depend on other platforms or other systems (e.g., it does not need to depend on macOS), resulting in low deployment costs, low usage costs, and low maintenance costs.

[0184] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0185] Optionally, embodiments of the present invention also provide an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0186] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0187] Figure 8 This is a block diagram illustrating an electronic device 800. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0188] Reference Figure 8 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0189] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0190] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, images, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0191] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0192] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0193] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0194] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0195] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0196] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0197] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0198] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0199] Figure 9This is a block diagram of an electronic device 1900 shown in this application. For example, the electronic device 1900 can be provided as a server.

[0200] Reference Figure 9 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.

[0201] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0202] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0203] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0204] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

[0205] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0206] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0207] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0208] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0209] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0210] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0211] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A data processing method, characterized in that, The method is applied to an electronic device, wherein an application program runs in the memory of the electronic device, and the method includes: In the event of an application crash, obtain the application's crash log, which contains at least: the component name of the component containing the crash content and the first offset address of the crash content within that component, indicating that the application crash was caused at least by the crash content; The mapping table of the component is obtained based on the component name. The mapping table of the component includes a mapping table between the symbol names of the symbols in the component and the second offset address of the symbols in the component in the component. In the mapping table, a target second offset address and a target symbol name corresponding to the target second offset address are determined. The target second offset address includes the largest second offset address among the second offset addresses in the mapping table that are smaller than the first offset address. The third offset address of the crash content in the target symbol corresponding to the target symbol name is obtained based on the first offset address and the target second offset address; Output a prompt message, which includes the target symbol name and the third offset address. The prompt message is used to indicate that the offset address of the crash content in the target symbol corresponding to the target symbol name is the third offset address.

2. The method according to claim 1, characterized in that, The step of obtaining the mapping table of the component based on the component name includes: The starting address of the component in memory is obtained based on the component name, and the symbol table of the component is obtained based on the component name. The symbol table of the component includes the symbol name of each symbol in the component and the loading address of each symbol in the component in memory. The mapping table is generated based on the starting address, the symbol names of each symbol in the component, and the memory loading addresses of each symbol in the component.

3. The method according to claim 2, characterized in that, The step of generating the mapping table based on the starting address, the symbol names of each symbol in the component, and the memory load addresses of each symbol in the component includes: Based on the starting address and the loading addresses of each symbol in the component in memory, obtain the second offset address of each symbol in the component within the component; The mapping table is generated based on the symbol name of each symbol in the component and the second offset address of each symbol in the component.

4. The method according to claim 3, characterized in that, The step of obtaining the second offset address of each symbol in the component based on the starting address and the load address of each symbol in the component in memory includes: For any symbol in the component, the difference between the load address of the symbol in memory and the starting address can be calculated, and the second offset address of the symbol in the component can be obtained based on the difference.

5. The method according to claim 2, characterized in that, The step of obtaining the starting address of the component in memory based on the component name includes: Based on the component name, a first preset command is invoked to obtain the starting address of the component in memory returned by the first preset command. The first preset command is used to obtain at least the starting address of the component in memory based on the component name.

6. The method according to claim 2, characterized in that, The step of obtaining the symbol table of the component based on the component name includes: The second preset command is invoked based on the component name to obtain the symbol table of the component returned by the second preset command. The second preset command is used to obtain at least the symbol table of the component based on the component name.

7. The method according to any one of claims 2-6, characterized in that, The method further includes: Store the binding relationship between the component name and the mapping table.

8. The method according to claim 7, characterized in that, The step of obtaining the mapping table of the component based on the component name includes: Find the binding relationship based on the component name; Obtain the mapping table from the binding relationship.

9. The method according to claim 1, characterized in that, The step of obtaining the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the first offset address and the target second offset address includes: Calculate the difference between the first offset address and the target second offset address; The third offset address of the crash content in the target symbol corresponding to the target symbol name is obtained based on the difference.

10. A data processing apparatus, characterized in that, The device is used in an electronic device, wherein an application program runs in the memory of the electronic device, and the device includes: The first acquisition module is used to acquire the crash log of the application in the event of the application crash, wherein the crash log contains at least: the component name of the component where the crash content is located and the first offset address of the crash content in the component, and the application crash is caused at least by the crash content; The second acquisition module is used to acquire the mapping table of the component according to the component name. The mapping table of the component includes a mapping table between the symbol names of the symbols in the component and the second offset address of the symbols in the component in the component. The determination module is used to determine the target second offset address and the target symbol name corresponding to the target second offset address in the mapping table, wherein the target second offset address includes the largest second offset address among the second offset addresses in the mapping table that are smaller than the first offset address; The third acquisition module is used to acquire the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the first offset address and the target second offset address; An output module is used to output a prompt message, which includes the target symbol name and the third offset address. The prompt message is used to indicate that the offset address of the crash content in the target symbol corresponding to the target symbol name is the third offset address.

11. The apparatus according to claim 10, characterized in that, The second acquisition module includes: The first acquisition unit is used to acquire the starting address of the component in memory according to the component name, and the second acquisition unit is used to acquire the symbol table of the component according to the component name, wherein the symbol table of the component includes the symbol name of each symbol in the component and the loading address of each symbol in the component in memory respectively. The generation unit is used to generate the mapping table based on the starting address, the symbol names of each symbol in the component, and the loading addresses of each symbol in the component in memory.

12. The apparatus according to claim 11, characterized in that, The generation unit includes: The subunit is configured to obtain the second offset address of each symbol in the component based on the starting address and the loading address of each symbol in the component in memory. A subunit is generated to generate the mapping table based on the symbol name of each symbol in the component and the second offset address of each symbol in the component.

13. The apparatus according to claim 12, characterized in that, The acquisition subunit is specifically used to: for any symbol in the component, calculate the difference between the loading address of the symbol in memory and the starting address, and obtain the second offset address of the symbol in the component based on the difference.

14. The apparatus according to claim 11, characterized in that, The first acquisition unit includes: The first calling subunit is used to call a first preset command based on the component name to obtain the starting address of the component in memory returned by the first preset command. The first preset command is used to obtain at least the starting address of the component in memory based on the component name.

15. The apparatus according to claim 11, characterized in that, The second acquisition unit includes: The second calling subunit is used to call a second preset command based on the component name to obtain the symbol table of the component returned by the second preset command. The second preset command is used to obtain at least the symbol table of the component based on the component name.

16. The apparatus according to any one of claims 11-15, characterized in that, The second acquisition module also includes: A storage unit is used to store the binding relationship between the component name and the mapping table.

17. The apparatus according to claim 16, characterized in that, The second acquisition module includes: A lookup unit is used to find the binding relationship based on the component name; The third acquisition unit is used to acquire the mapping table in the binding relationship.

18. The apparatus according to claim 10, characterized in that, The third acquisition module includes: A calculation unit is used to calculate the difference between the first offset address and the target second offset address; The fourth acquisition unit is used to acquire the third offset address of the crash content in the target symbol corresponding to the target symbol name based on the difference.

19. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 9.