mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Update PLCrashReporter with proper armv6 support
This commit is contained in:
parent
28f4a2a159
commit
ddfc392a32
Binary file not shown.
@ -225,5 +225,5 @@ typedef enum {
|
||||
* Most notably, the Objective-C runtime itself is not async-safe, and Objective-C may not be used within a signal
|
||||
* handler.
|
||||
*
|
||||
* @sa PLCrashReporter::setReporterCallbacks:
|
||||
* @sa PLCrashReporter::setCrashCallbacks:
|
||||
*/
|
||||
|
@ -95,7 +95,7 @@ typedef struct _PLCrashReportDecoder _PLCrashReportDecoder;
|
||||
/** Process info */
|
||||
PLCrashReportProcessInfo *_processInfo;
|
||||
|
||||
/** Signal info (may be nil) */
|
||||
/** Signal info */
|
||||
PLCrashReportSignalInfo *_signalInfo;
|
||||
|
||||
/** Thread info (PLCrashReportThreadInfo instances) */
|
||||
|
@ -28,34 +28,6 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* @ingroup enums
|
||||
*
|
||||
* This set of constants defines options for PLCrashReporter.
|
||||
*/
|
||||
typedef enum {
|
||||
/** Set this flag to cause PLCrashReporter to intercept exceptions thrown within the main NSRunLoop before they
|
||||
* reach Apple's exception handler. They will be treated with the default behavior given to uncaught exceptions.
|
||||
* Use with caution if the client overrides -[NSApplication sendEvent:].
|
||||
*/
|
||||
PLCrashReporterOptionCaptureRunLoopExceptions = (1 << 0),
|
||||
} PLCrashReporterOptions;
|
||||
|
||||
/**
|
||||
* @ingroup enums
|
||||
*
|
||||
* This set of constants defines possible values for the reportType in a post-write callback.
|
||||
*/
|
||||
typedef enum {
|
||||
/** The report was generated by a UNIX signal, Mach exception, or Objective-C exception, contains full thread
|
||||
* information, and will result in termination of the process. */
|
||||
PLCrashReportTypeCrash = 0,
|
||||
|
||||
/** The report was generated by user request and contains full thread information, and execution will continue
|
||||
* normally. */
|
||||
PLCrashReportTypeUserRequest = 1,
|
||||
} PLCrashReportType;
|
||||
|
||||
/**
|
||||
* @ingroup functions
|
||||
*
|
||||
@ -67,25 +39,10 @@ typedef enum {
|
||||
* @param context The API client's supplied context value.
|
||||
*
|
||||
* @sa @ref async_safety
|
||||
* @sa PLCrashReporter::setReporterCallbacks:
|
||||
* @sa PLCrashReporter::setPostCrashCallbacks:
|
||||
*/
|
||||
typedef void (*PLCrashReporterPostCrashSignalCallback)(siginfo_t *info, ucontext_t *uap, void *context);
|
||||
|
||||
/**
|
||||
* @ingroup functions
|
||||
*
|
||||
* Prototype of a callback function used to execute additional user code after a report has been written
|
||||
* to disk. If a report is written, this callback will always be called before the PostCrashSignal
|
||||
* callback. This callback is called only after all data is completely written to disk. In case of
|
||||
* a user-generated report, no other callback will be made.
|
||||
*
|
||||
* @param name The location of the report that was saved. This is a full path.
|
||||
* @param type The type of report that was written.
|
||||
* @param context The API client's supplied context value.
|
||||
* @sa PLCrashReporter::setReporterCallbacks:
|
||||
*/
|
||||
typedef void (*PLCrashReporterPostWriteReportCallback)(const char * const path, PLCrashReportType type, void *context);
|
||||
|
||||
/**
|
||||
* @ingroup types
|
||||
*
|
||||
@ -96,19 +53,15 @@ typedef void (*PLCrashReporterPostWriteReportCallback)(const char * const path,
|
||||
*/
|
||||
typedef struct PLCrashReporterCallbacks {
|
||||
/** The version number of this structure. If not one of the defined version numbers for this type, the behavior
|
||||
* is undefined. The current version of this structure is 1. */
|
||||
* is undefined. The current version of this structure is 0. */
|
||||
uint16_t version;
|
||||
|
||||
/** An arbitrary user-supplied context value. This value may be NULL. */
|
||||
void *context;
|
||||
|
||||
/** The callback used to report caught signal information. In versions 0 and 1 of this structure, all crashes
|
||||
* will be reported via this function. */
|
||||
/** The callback used to report caught signal information. In version 0 of this structure, all crashes will be
|
||||
* reported via this function. */
|
||||
PLCrashReporterPostCrashSignalCallback handleSignal;
|
||||
|
||||
/** The callback used to report completion of writing a crash log to disk. Only available in version 1 of this
|
||||
* structure. If a version 0 structure is used, or this field is set to NULL, no callback is made. */
|
||||
PLCrashReporterPostWriteReportCallback writeReport;
|
||||
} PLCrashReporterCallbacks;
|
||||
|
||||
@interface PLCrashReporter : NSObject {
|
||||
@ -138,26 +91,16 @@ typedef struct PLCrashReporterCallbacks {
|
||||
+ (PLCrashReporter *) sharedReporter;
|
||||
|
||||
- (BOOL) hasPendingCrashReport;
|
||||
- (BOOL) hasReportWithName: (NSString *) reportName;
|
||||
|
||||
- (NSData *) loadPendingCrashReportData;
|
||||
- (NSData *) loadPendingCrashReportDataAndReturnError: (NSError **) outError;
|
||||
- (NSData *) loadReportWithName: (NSString *) reportName;
|
||||
- (NSData *) loadReportWithName: (NSString *) reportName andReturnError: (NSError **) outError;
|
||||
|
||||
- (BOOL) purgePendingCrashReport;
|
||||
- (BOOL) purgePendingCrashReportAndReturnError: (NSError **) outError;
|
||||
- (BOOL) purgeReportWithName: (NSString *) reportName;
|
||||
- (BOOL) purgeReportWithName: (NSString *) reportName andReturnError: (NSError **) outError;
|
||||
|
||||
- (BOOL) enableCrashReporter;
|
||||
- (BOOL) enableCrashReporterAndReturnError: (NSError **) outError;
|
||||
- (BOOL) enableCrashReporterWithOptions: (PLCrashReporterOptions) options andReturnError: (NSError **) outError;
|
||||
|
||||
- (void) setCrashCallbacks: (PLCrashReporterCallbacks *) callbacks DEPRECATED_ATTRIBUTE;
|
||||
- (void) setReporterCallbacks: (PLCrashReporterCallbacks *) callbacks;
|
||||
|
||||
- (NSData *) generateReportData;
|
||||
- (BOOL) generateReportWithName: (NSString *) reportName;
|
||||
- (void) setCrashCallbacks: (PLCrashReporterCallbacks *) callbacks;
|
||||
|
||||
@end
|
||||
|
@ -19,7 +19,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<string>1.2-beta1</string>
|
||||
<key>DTCompiler</key>
|
||||
<string></string>
|
||||
<key>DTPlatformBuild</key>
|
||||
|
Loading…
x
Reference in New Issue
Block a user