Package xcrash
Class TombstoneParser
- java.lang.Object
-
- xcrash.TombstoneParser
-
public class TombstoneParser extends java.lang.ObjectTombstone (crash) log file parser.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringkeyAbiCurrent ABI.static java.lang.StringkeyAbiListSupported ABI list.static java.lang.StringkeyAbortMessageNative crash abort message.static java.lang.StringkeyApiLevelAndroid API level.static java.lang.StringkeyAppIdThe name of this application's package.static java.lang.StringkeyAppVersionThe version name of this package.static java.lang.StringkeyBacktraceNative crash backtrace.static java.lang.StringkeyBrandBrand.static java.lang.StringkeyBuildFingerprintBuild fingerprint.static java.lang.StringkeyBuildIdNative crash ELF's build-id and file size.static java.lang.StringkeyCodeNative crash signal code.static java.lang.StringkeyCrashTimeCrash or ANR time.static java.lang.StringkeyCrashTypeCrash type.static java.lang.StringkeyFaultAddrNative crash fault address.static java.lang.StringkeyForegroundIs the app at the foreground? ("yes" or "no")static java.lang.StringkeyJavaStacktraceNative crash thread's Java stacktrace from JVM, or Java exception stacktrace.static java.lang.StringkeyKernelVersionLinux kernel version.static java.lang.StringkeyLogcatLogcat.static java.lang.StringkeyManufacturerManufacturer.static java.lang.StringkeyMemoryInfoMemory info.static java.lang.StringkeyMemoryMapNative crash memory map.static java.lang.StringkeyMemoryNearNative crash memory near information.static java.lang.StringkeyModelModel.static java.lang.StringkeyNetworkInfoNetwork info.static java.lang.StringkeyOpenFilesFD list.static java.lang.StringkeyOsVersionAndroid OS version.static java.lang.StringkeyOtherThreadsOther threads information for native crash, or traces which including all threads information for ANR.static java.lang.StringkeyProcessIdProcess ID.static java.lang.StringkeyProcessNameProcess name.static java.lang.StringkeyRegistersNative crash registers values.static java.lang.StringkeyRootedWhether this device has been rooted(jailbroken).static java.lang.StringkeySignalNative crash signal name.static java.lang.StringkeyStackNative crash stack.static java.lang.StringkeyStartTimeAPP Start time (xCrash initialized time).static java.lang.StringkeyThreadIdThread ID.static java.lang.StringkeyThreadNameThread name.static java.lang.StringkeyTombstoneMakerThe tombstone file maker's library name and version.static java.lang.StringkeyXCrashErrorError code from xCrash itself.static java.lang.StringkeyXCrashErrorDebugError message from xCrash itself.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.String>parse(java.io.File log)Parse a crash log file into an instance ofMap.static java.util.Map<java.lang.String,java.lang.String>parse(java.lang.String logPath)Parse a crash log file into an instance ofMap.static java.util.Map<java.lang.String,java.lang.String>parse(java.lang.String logPath, java.lang.String emergency)Parse a crash log file (with an emergency buffer) into an instance ofMap.
-
-
-
Field Detail
-
keyTombstoneMaker
public static final java.lang.String keyTombstoneMaker
The tombstone file maker's library name and version.- See Also:
- Constant Field Values
-
keyCrashType
public static final java.lang.String keyCrashType
Crash type. ("java" or "native" or "anr")- See Also:
- Constant Field Values
-
keyStartTime
public static final java.lang.String keyStartTime
APP Start time (xCrash initialized time). (Format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ")- See Also:
- Constant Field Values
-
keyCrashTime
public static final java.lang.String keyCrashTime
Crash or ANR time. (Format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ")- See Also:
- Constant Field Values
-
keyAppId
public static final java.lang.String keyAppId
The name of this application's package. (From:Context.getPackageName())- See Also:
- Constant Field Values
-
keyAppVersion
public static final java.lang.String keyAppVersion
The version name of this package. (From:PackageInfo.versionName) Your can override it byXCrash.InitParameters.setLogDir(String).- See Also:
- Constant Field Values
-
keyRooted
public static final java.lang.String keyRooted
Whether this device has been rooted(jailbroken). ("Yes" or "No")- See Also:
- Constant Field Values
-
keyApiLevel
public static final java.lang.String keyApiLevel
Android API level. (From:Build.VERSION.SDK_INT)- See Also:
- Constant Field Values
-
keyOsVersion
public static final java.lang.String keyOsVersion
Android OS version. (From:Build.VERSION.RELEASE)- See Also:
- Constant Field Values
-
keyKernelVersion
public static final java.lang.String keyKernelVersion
Linux kernel version.- See Also:
- Constant Field Values
-
keyAbiList
public static final java.lang.String keyAbiList
Supported ABI list. (From:Build.SUPPORTED_ABIS)- See Also:
- Constant Field Values
-
keyManufacturer
public static final java.lang.String keyManufacturer
Manufacturer. (From:Build.MANUFACTURER)- See Also:
- Constant Field Values
-
keyBrand
public static final java.lang.String keyBrand
Brand. (From:Build.BRAND)- See Also:
- Constant Field Values
-
keyModel
public static final java.lang.String keyModel
Model. (From:Build.MODEL)- See Also:
- Constant Field Values
-
keyBuildFingerprint
public static final java.lang.String keyBuildFingerprint
Build fingerprint. (From:Build.FINGERPRINT)- See Also:
- Constant Field Values
-
keyAbi
public static final java.lang.String keyAbi
Current ABI. ("arm" or "arm64" or "x86" or "x86_64")- See Also:
- Constant Field Values
-
keyProcessId
public static final java.lang.String keyProcessId
Process ID.- See Also:
- Constant Field Values
-
keyThreadId
public static final java.lang.String keyThreadId
Thread ID.- See Also:
- Constant Field Values
-
keyProcessName
public static final java.lang.String keyProcessName
Process name.- See Also:
- Constant Field Values
-
keyThreadName
public static final java.lang.String keyThreadName
Thread name.- See Also:
- Constant Field Values
-
keySignal
public static final java.lang.String keySignal
Native crash signal name.- See Also:
- Constant Field Values
-
keyCode
public static final java.lang.String keyCode
Native crash signal code.- See Also:
- Constant Field Values
-
keyFaultAddr
public static final java.lang.String keyFaultAddr
Native crash fault address.- See Also:
- Constant Field Values
-
keyAbortMessage
public static final java.lang.String keyAbortMessage
Native crash abort message.- See Also:
- Constant Field Values
-
keyRegisters
public static final java.lang.String keyRegisters
Native crash registers values.- See Also:
- Constant Field Values
-
keyBacktrace
public static final java.lang.String keyBacktrace
Native crash backtrace.- See Also:
- Constant Field Values
-
keyBuildId
public static final java.lang.String keyBuildId
Native crash ELF's build-id and file size.- See Also:
- Constant Field Values
-
keyStack
public static final java.lang.String keyStack
Native crash stack.- See Also:
- Constant Field Values
-
keyMemoryNear
public static final java.lang.String keyMemoryNear
Native crash memory near information.- See Also:
- Constant Field Values
-
keyMemoryMap
public static final java.lang.String keyMemoryMap
Native crash memory map.- See Also:
- Constant Field Values
-
keyLogcat
public static final java.lang.String keyLogcat
Logcat.- See Also:
- Constant Field Values
-
keyOpenFiles
public static final java.lang.String keyOpenFiles
FD list.- See Also:
- Constant Field Values
-
keyNetworkInfo
public static final java.lang.String keyNetworkInfo
Network info.- See Also:
- Constant Field Values
-
keyMemoryInfo
public static final java.lang.String keyMemoryInfo
Memory info. (From: /proc/PID/smaps)- See Also:
- Constant Field Values
-
keyOtherThreads
public static final java.lang.String keyOtherThreads
Other threads information for native crash, or traces which including all threads information for ANR.- See Also:
- Constant Field Values
-
keyJavaStacktrace
public static final java.lang.String keyJavaStacktrace
Native crash thread's Java stacktrace from JVM, or Java exception stacktrace.- See Also:
- Constant Field Values
-
keyXCrashError
public static final java.lang.String keyXCrashError
Error code from xCrash itself.- See Also:
- Constant Field Values
-
keyForeground
public static final java.lang.String keyForeground
Is the app at the foreground? ("yes" or "no")- See Also:
- Constant Field Values
-
keyXCrashErrorDebug
public static final java.lang.String keyXCrashErrorDebug
Error message from xCrash itself.- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static java.util.Map<java.lang.String,java.lang.String> parse(java.io.File log) throws java.io.IOExceptionParse a crash log file into an instance ofMap. Map's string keys are defined inTombstoneParser.- Parameters:
log- Object of the crash log file.- Returns:
- The parsed map.
- Throws:
java.io.IOException- If an I/O error occurs.
-
parse
public static java.util.Map<java.lang.String,java.lang.String> parse(java.lang.String logPath) throws java.io.IOExceptionParse a crash log file into an instance ofMap. Map's string keys are defined inTombstoneParser.- Parameters:
logPath- Absolute path of the crash log file.- Returns:
- The parsed map.
- Throws:
java.io.IOException- If an I/O error occurs.
-
parse
public static java.util.Map<java.lang.String,java.lang.String> parse(java.lang.String logPath, java.lang.String emergency) throws java.io.IOExceptionParse a crash log file (with an emergency buffer) into an instance ofMap. Map's string keys are defined inTombstoneParser.Note: This method is generally used in
ICrashCallback.onCrash(String, String).- Parameters:
logPath- Absolute path of the crash log file.emergency- A buffer that holds basic crash information when disk exhausted.- Returns:
- The parsed map.
- Throws:
java.io.IOException- If an I/O error occurs.
-
-