forked from mogutt/TTMacClient
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dujia
committed
Sep 26, 2014
1 parent
6813c1b
commit 3c1a01a
Showing
1,214 changed files
with
130,078 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/CrashReporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Resources |
Binary file not shown.
363 changes: 363 additions & 0 deletions
363
CrashReporter.framework/Versions/A/Headers/CrashReporter.h
Large diffs are not rendered by default.
Oops, something went wrong.
104 changes: 104 additions & 0 deletions
104
CrashReporter.framework/Versions/A/Headers/PLCrashFeatureConfig.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* | ||
* Author: Landon Fuller <[email protected]> | ||
* | ||
* Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. | ||
* All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
#ifndef PLCRASH_FEATURE_CONFIG_H | ||
#define PLCRASH_FEATURE_CONFIG_H | ||
|
||
#include <TargetConditionals.h> | ||
|
||
/** | ||
* @internal | ||
* | ||
* Build-time configuration for PLCrashReporter. | ||
* | ||
* This is used to automatically enable/disable features on a per-platform and per-configuration | ||
* basis; it may also be used by third-party vendors to configure a custom build of PLCrashReporter. | ||
* | ||
* @defgroup build_config Build Configuration | ||
* @ingroup constants | ||
* @{ | ||
*/ | ||
|
||
/* | ||
* Defaults | ||
*/ | ||
|
||
/* | ||
* For release builds, disable unused unwind implementations on targets that do not use them. For non-release | ||
* builds, we include the unwind implementations to allow testing on a broader range of targets. | ||
*/ | ||
#ifdef PLCF_RELEASE_BUILD | ||
# if defined(__arm__) | ||
# ifndef PLCRASH_FEATURE_UNWIND_DWARF | ||
# define PLCRASH_FEATURE_UNWIND_DWARF 0 | ||
# endif | ||
# ifndef PLCRASH_FEATURE_UNWIND_COMPACT | ||
# define PLCRASH_FEATURE_UNWIND_COMPACT 0 | ||
# endif | ||
# endif | ||
#endif | ||
|
||
/* | ||
* Configuration Flags | ||
*/ | ||
|
||
|
||
#ifndef PLCRASH_FEATURE_MACH_EXCEPTIONS | ||
/** | ||
* If true, enable Mach exception support. On Mac OS X, the Mach exception implementation is fully supported, | ||
* using publicly available API. On iOS, the APIs required for a complete implementation are not public. However, a | ||
* popular commercial crash reporter is now shipping with support for Mach exceptions, which implies that either | ||
* they've received special dispensation to use private APIs / private structures, they've found another way to do | ||
* it, or they're just using undocumented functionality and hoping for the best. | ||
* | ||
* The exposed surface of undocumented API usage is relatively low, and there has been strong user demand to | ||
* implement Mach exception handling regardless of concerns over API visiblity. Given this, we've enabled | ||
* Mach exception handling by default, and provided both build-time and runtime configuration | ||
* to disable its use. | ||
* | ||
* For more information on the potential issues with enabling mach exception support, @sa @ref mach_exceptions. | ||
*/ | ||
# define PLCRASH_FEATURE_MACH_EXCEPTIONS 1 | ||
#endif | ||
|
||
#ifndef PLCRASH_FEATURE_UNWIND_DWARF | ||
/** If true, enable DWARF unwinding support. */ | ||
# define PLCRASH_FEATURE_UNWIND_DWARF 1 | ||
#endif | ||
|
||
|
||
#ifndef PLCRASH_FEATURE_UNWIND_COMPACT | ||
/** If true, enable compact unwinding support. */ | ||
# define PLCRASH_FEATURE_UNWIND_COMPACT 1 | ||
#endif | ||
|
||
/** | ||
* @} | ||
*/ | ||
|
||
#endif /* PLCRASH_FEATURE_CONFIG_H */ |
80 changes: 80 additions & 0 deletions
80
CrashReporter.framework/Versions/A/Headers/PLCrashNamespace.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Author: Landon Fuller <[email protected]> | ||
* | ||
* Copyright (c) 2012-2013 Plausible Labs Cooperative, Inc. | ||
* All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
/* | ||
* For external library integrators: | ||
* | ||
* Set this value to any valid C symbol prefix. This will automatically | ||
* prepend the given prefix to all external symbols in the library. | ||
* | ||
* This may be used to avoid symbol conflicts between multiple libraries | ||
* that may both incorporate PLCrashReporter. | ||
*/ | ||
// #define PLCRASHREPORTER_PREFIX AcmeCo | ||
|
||
#ifdef PLCRASHREPORTER_PREFIX | ||
|
||
// We need two extra layers of indirection to make CPP substitute | ||
// the PLCRASHREPORTER_PREFIX define. | ||
#define PLNS_impl2(prefix, symbol) prefix ## symbol | ||
#define PLNS_impl(prefix, symbol) PLNS_impl2(prefix, symbol) | ||
#define PLNS(symbol) PLNS_impl(PLCRASHREPORTER_PREFIX, symbol) | ||
|
||
#define PLCrashMachExceptionServer PLNS(PLCrashMachExceptionServer) | ||
#define PLCrashReport PLNS(PLCrashReport) | ||
#define PLCrashReportApplicationInfo PLNS(PLCrashReportApplicationInfo) | ||
#define PLCrashReportBinaryImageInfo PLNS(PLCrashReportBinaryImageInfo) | ||
#define PLCrashReportExceptionInfo PLNS(PLCrashReportExceptionInfo) | ||
#define PLCrashReportMachExceptionInfo PLNS(PLCrashReportMachExceptionInfo) | ||
#define PLCrashReportMachineInfo PLNS(PLCrashReportMachineInfo) | ||
#define PLCrashReportProcessInfo PLNS(PLCrashReportProcessInfo) | ||
#define PLCrashReportProcessorInfo PLNS(PLCrashReportProcessorInfo) | ||
#define PLCrashReportRegisterInfo PLNS(PLCrashReportRegisterInfo) | ||
#define PLCrashReportSignalInfo PLNS(PLCrashReportSignalInfo) | ||
#define PLCrashReportStackFrameInfo PLNS(PLCrashReportStackFrameInfo) | ||
#define PLCrashReportSymbolInfo PLNS(PLCrashReportSymbolInfo) | ||
#define PLCrashReportSystemInfo PLNS(PLCrashReportSystemInfo) | ||
#define PLCrashReportTextFormatter PLNS(PLCrashReportTextFormatter) | ||
#define PLCrashReportThreadInfo PLNS(PLCrashReportThreadInfo) | ||
#define PLCrashReporter PLNS(PLCrashReporter) | ||
#define PLCrashSignalHandler PLNS(PLCrashSignalHandler) | ||
#define PLCrashReportHostArchitecture PLNS(PLCrashReportHostArchitecture) | ||
#define PLCrashReportHostOperatingSystem PLNS(PLCrashReportHostOperatingSystem) | ||
#define PLCrashReporterErrorDomain PLNS(PLCrashReporterErrorDomain) | ||
#define PLCrashReporterException PLNS(PLCrashReporterException) | ||
#define PLCrashHostInfo PLNS(PLCrashHostInfo) | ||
#define PLCrashMachExceptionPort PLNS(PLCrashMachExceptionPort) | ||
#define PLCrashMachExceptionPortSet PLNS(PLCrashMachExceptionPortSet) | ||
#define PLCrashProcessInfo PLNS(PLCrashProcessInfo) | ||
#define PLCrashReporterConfig PLNS(PLCrashReporterConfig) | ||
#define PLCrashUncaughtExceptionHandler PLNS(PLCrashUncaughtExceptionHandler) | ||
#define PLCrashMachExceptionForward PLNS(PLCrashMachExceptionForward) | ||
#define PLCrashSignalHandlerForward PLNS(PLCrashSignalHandlerForward) | ||
#define plcrash_signal_handler PLNS(plcrash_signal_handler) | ||
|
||
#endif |
200 changes: 200 additions & 0 deletions
200
CrashReporter.framework/Versions/A/Headers/PLCrashReport.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
/* | ||
* Author: Landon Fuller <[email protected]> | ||
* | ||
* Copyright (c) 2008-2013 Plausible Labs Cooperative, Inc. | ||
* All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person | ||
* obtaining a copy of this software and associated documentation | ||
* files (the "Software"), to deal in the Software without | ||
* restriction, including without limitation the rights to use, | ||
* copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be | ||
* included in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
* OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import "PLCrashReportApplicationInfo.h" | ||
#import "PLCrashReportBinaryImageInfo.h" | ||
#import "PLCrashReportExceptionInfo.h" | ||
#import "PLCrashReportMachineInfo.h" | ||
#import "PLCrashReportMachExceptionInfo.h" | ||
#import "PLCrashReportProcessInfo.h" | ||
#import "PLCrashReportProcessorInfo.h" | ||
#import "PLCrashReportRegisterInfo.h" | ||
#import "PLCrashReportSignalInfo.h" | ||
#import "PLCrashReportStackFrameInfo.h" | ||
#import "PLCrashReportSymbolInfo.h" | ||
#import "PLCrashReportSystemInfo.h" | ||
#import "PLCrashReportThreadInfo.h" | ||
|
||
/** | ||
* @ingroup constants | ||
* Crash file magic identifier */ | ||
#define PLCRASH_REPORT_FILE_MAGIC "plcrash" | ||
|
||
/** | ||
* @ingroup constants | ||
* Crash format version byte identifier. Will not change outside of the introduction of | ||
* an entirely new crash log format. */ | ||
#define PLCRASH_REPORT_FILE_VERSION 1 | ||
|
||
/** | ||
* @ingroup types | ||
* Crash log file header format. | ||
* | ||
* Crash log files start with 7 byte magic identifier (#PLCRASH_REPORT_FILE_MAGIC), | ||
* followed by a single unsigned byte version number (#PLCRASH_REPORT_FILE_VERSION). | ||
* The crash log message format itself is extensible, so this version number will only | ||
* be incremented in the event of an incompatible encoding or format change. | ||
*/ | ||
struct PLCrashReportFileHeader { | ||
/** Crash log magic identifier, not NULL terminated */ | ||
const char magic[7]; | ||
|
||
/** Crash log encoding/format version */ | ||
const uint8_t version; | ||
|
||
/** File data */ | ||
const uint8_t data[]; | ||
} __attribute__((packed)); | ||
|
||
|
||
/** | ||
* @internal | ||
* Private decoder instance variables (used to hide the underlying protobuf parser). | ||
*/ | ||
typedef struct _PLCrashReportDecoder _PLCrashReportDecoder; | ||
|
||
@interface PLCrashReport : NSObject { | ||
@private | ||
/** Private implementation variables (used to hide the underlying protobuf parser) */ | ||
_PLCrashReportDecoder *_decoder; | ||
|
||
/** System info */ | ||
PLCrashReportSystemInfo *_systemInfo; | ||
|
||
/** Machine info */ | ||
PLCrashReportMachineInfo *_machineInfo; | ||
|
||
/** Application info */ | ||
PLCrashReportApplicationInfo *_applicationInfo; | ||
|
||
/** Process info */ | ||
PLCrashReportProcessInfo *_processInfo; | ||
|
||
/** Signal info */ | ||
PLCrashReportSignalInfo *_signalInfo; | ||
|
||
/** Mach exception info */ | ||
PLCrashReportMachExceptionInfo *_machExceptionInfo; | ||
|
||
/** Thread info (PLCrashReportThreadInfo instances) */ | ||
NSArray *_threads; | ||
|
||
/** Binary images (PLCrashReportBinaryImageInfo instances */ | ||
NSArray *_images; | ||
|
||
/** Exception information (may be nil) */ | ||
PLCrashReportExceptionInfo *_exceptionInfo; | ||
|
||
/** Report UUID */ | ||
CFUUIDRef _uuid; | ||
} | ||
|
||
- (id) initWithData: (NSData *) encodedData error: (NSError **) outError; | ||
|
||
- (PLCrashReportBinaryImageInfo *) imageForAddress: (uint64_t) address; | ||
|
||
/** | ||
* System information. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportSystemInfo *systemInfo; | ||
|
||
/** | ||
* YES if machine information is available. | ||
*/ | ||
@property(nonatomic, readonly) BOOL hasMachineInfo; | ||
|
||
/** | ||
* Machine information. Only available in later (v1.1+) crash report format versions. If not available, | ||
* will be nil. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportMachineInfo *machineInfo; | ||
|
||
/** | ||
* Application information. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportApplicationInfo *applicationInfo; | ||
|
||
/** | ||
* YES if process information is available. | ||
*/ | ||
@property(nonatomic, readonly) BOOL hasProcessInfo; | ||
|
||
/** | ||
* Process information. Only available in later (v1.1+) crash report format versions. If not available, | ||
* will be nil. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportProcessInfo *processInfo; | ||
|
||
/** | ||
* Signal information. This provides the signal and signal code of the fatal signal. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportSignalInfo *signalInfo; | ||
|
||
/** | ||
* Mach exception information, if available. This will only be included in the | ||
* case that encoding crash reporter's exception-based reporting was enabled, and a Mach | ||
* exception was caught. | ||
* | ||
* @warning If Mach exception information is available, the legacy signalInfo property will also be provided; this | ||
* s required to maintain backwards compatibility with the established API. Note, however, that the signal info may be derived from the | ||
* Mach exception info by the encoding crash reporter, and thus may not exactly match the kernel exception-to-signal | ||
* mappings implemented in xnu. As such, when Mach exception info is available, its use should be preferred. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportMachExceptionInfo *machExceptionInfo; | ||
|
||
/** | ||
* Thread information. Returns a list of PLCrashReportThreadInfo instances. | ||
*/ | ||
@property(nonatomic, readonly) NSArray *threads; | ||
|
||
/** | ||
* Binary image information. Returns a list of PLCrashReportBinaryImageInfo instances. | ||
*/ | ||
@property(nonatomic, readonly) NSArray *images; | ||
|
||
/** | ||
* YES if exception information is available. | ||
*/ | ||
@property(nonatomic, readonly) BOOL hasExceptionInfo; | ||
|
||
/** | ||
* Exception information. Only available if a crash was caused by an uncaught exception, | ||
* otherwise nil. | ||
*/ | ||
@property(nonatomic, readonly) PLCrashReportExceptionInfo *exceptionInfo; | ||
|
||
/** | ||
* A client-generated 16-byte UUID. May be used to filter duplicate reports submitted or generated | ||
* by a single client. Only available in later (v1.2+) crash report format versions. If not available, | ||
* will be NULL. | ||
*/ | ||
@property(nonatomic, readonly) CFUUIDRef uuidRef; | ||
|
||
@end |
Oops, something went wrong.