Fix framework targets, tests and demo app
This commit is contained in:
Родитель
12cb6da3d8
Коммит
397be57fec
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,8 @@
|
|||
framework module CrashReporter {
|
||||
umbrella header "CrashReporter.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
|
||||
link framework "Foundation"
|
||||
}
|
|
@ -18,6 +18,8 @@
|
|||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
|
@ -18,6 +18,8 @@
|
|||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
</dict>
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,365 +0,0 @@
|
|||
/*
|
||||
* Author: Landon Fuller <landonf@plausiblelabs.com>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package plcrash;
|
||||
option java_package = "coop.plausible.crashreporter";
|
||||
option java_outer_classname = "CrashReport_pb";
|
||||
|
||||
/* A crash report */
|
||||
message CrashReport_V2 {
|
||||
/* Known report types. */
|
||||
enum ReportType {
|
||||
/* Unknown report type. This will never be specified in a generated report. */
|
||||
UNKNOWN = 0;
|
||||
|
||||
/* A report generated due to a fatal signal or machine exception. */
|
||||
CRASH = 1;
|
||||
|
||||
/* A report generated due to an unhandled language-level exception. */
|
||||
LANGUAGE_EXCEPTION = 2;
|
||||
|
||||
/* A report generated due to a process deadlock and/or watchdog event. The responsible
|
||||
* thread will be the deadlocked thread. A watchdog report is not required to trigger process
|
||||
* termination. */
|
||||
WATCHDOG = 3;
|
||||
|
||||
/* A report generated on a running process, where no crash occured, based on user
|
||||
* request. */
|
||||
LIVE = 4;
|
||||
}
|
||||
|
||||
/** The report type. */
|
||||
required ReportType type = 1 [default = UNKNOWN];
|
||||
|
||||
/* Time that this report was generated (as seconds since UNIX epoch). The field may be
|
||||
* ommitted if the time can not be determined during report generation. */
|
||||
optional uint64 timestamp = 2;
|
||||
|
||||
|
||||
/* Application info */
|
||||
message ApplicationInfo {
|
||||
/* Unique application identifier */
|
||||
required string identifier = 1;
|
||||
|
||||
/* Application version string */
|
||||
required string version = 2;
|
||||
}
|
||||
|
||||
/* Application identifiers. These may not be available for all applications. */
|
||||
optional ApplicationInfo application_info = 3;
|
||||
|
||||
|
||||
|
||||
/* OS Information */
|
||||
message OperatingSystem {
|
||||
/* Known operating system types */
|
||||
enum OperatingSystem {
|
||||
/* Unknown operating system. */
|
||||
UNKNOWN = 0;
|
||||
|
||||
/* Mac OS X */
|
||||
MAC_OS_X = 1;
|
||||
|
||||
/* iPhone OS */
|
||||
IPHONE_OS = 2;
|
||||
|
||||
/* iPhone Simulator (Mac OS X w/ simulator runtime environment) */
|
||||
IPHONE_SIMULATOR = 3;
|
||||
|
||||
/* Android */
|
||||
ANDROID = 4;
|
||||
}
|
||||
|
||||
/* Operating system */
|
||||
optional OperatingSystem type = 1 [default = UNKNOWN];
|
||||
|
||||
/* OS version */
|
||||
required string version = 2;
|
||||
|
||||
/* OS build number (eg, 10J869) */
|
||||
optional string build = 5;
|
||||
}
|
||||
|
||||
required OperatingSystem os = 10;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Processor information
|
||||
*/
|
||||
message Processor {
|
||||
/*
|
||||
* CPU Type Encodings
|
||||
*
|
||||
* The wire format maintains support for multiple CPU type encodings; it is expected that different operating
|
||||
* systems may target different processors, and the reported CPU type and subtype information may not be
|
||||
* easily or directly expressed when not using the vendor's own defined types.
|
||||
*
|
||||
* Currently, only Apple Mach CPU type/subtype information is supported by the wire protocol. These types are
|
||||
* stable, intended to be encoded in Mach-O files, and are defined in mach/machine.h on Mac OS X.
|
||||
*
|
||||
* Implementations must gracefully handle the addition of unknown type encodings.
|
||||
*/
|
||||
enum TypeEncoding {
|
||||
/* Unknown processor type encoding. */
|
||||
UNKNOWN = 0;
|
||||
|
||||
/* Apple Mach-defined processor types. */
|
||||
MACH = 1;
|
||||
}
|
||||
|
||||
/** The CPU type encoding that should be used to interpret cpu_type and cpu_subtype. This value is required. */
|
||||
optional TypeEncoding encoding = 1 [default = UNKNOWN];
|
||||
|
||||
/** The CPU type. */
|
||||
required uint64 type = 2;
|
||||
|
||||
/** The CPU subtype. */
|
||||
required uint64 subtype = 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Host architecture information.
|
||||
*/
|
||||
message Machine {
|
||||
/* Hardware model (eg, MacBookPro6,1) */
|
||||
optional string model = 1;
|
||||
|
||||
/* The host processor. */
|
||||
required Processor processor = 2;
|
||||
|
||||
/*
|
||||
* The number of actual physical processor cores. Note that the number of active processors may be managed by the
|
||||
* operating system's power management system, and this value may not reflect the number of active
|
||||
* processors at the time of the crash. */
|
||||
required uint32 processor_count = 3;
|
||||
|
||||
/* The number of logical processors. Note that the number of active processors may be managed by the
|
||||
* operating system's power management system, and this value may not reflect the number of active
|
||||
* processors at the time of the crash.
|
||||
*/
|
||||
required uint32 logical_processor_count = 4;
|
||||
}
|
||||
|
||||
/* Host architecture information. */
|
||||
optional Machine machine = 11;
|
||||
|
||||
|
||||
|
||||
/* Process Data. */
|
||||
message Process {
|
||||
/* Application process name */
|
||||
optional string name = 1;
|
||||
|
||||
/* Application process ID */
|
||||
required uint64 pid = 2;
|
||||
|
||||
/* Application process path */
|
||||
optional string path = 3;
|
||||
|
||||
/** The start time of the process (as seconds since UNIX epoch). The field may be
|
||||
* ommitted if the start time can not be determined. */
|
||||
optional uint64 start_time = 4;
|
||||
|
||||
/* Application parent process name */
|
||||
optional string parent_name = 5;
|
||||
|
||||
/* Application parent process ID */
|
||||
required uint64 parent_pid = 6;
|
||||
|
||||
/** If false, the process is being run via process-level CPU emulation (such as Rosetta). If unknown, this
|
||||
* value must be ommitted. */
|
||||
optional bool native = 7;
|
||||
}
|
||||
|
||||
/* The process info. */
|
||||
required Process process = 12;
|
||||
|
||||
/* A symbol table entry. */
|
||||
message Symbol {
|
||||
/* The symbol name. This value will be platform-specific; eg, on Mac OS X and iOS, global symbols
|
||||
* are prefixed by _ by default. */
|
||||
required string name = 1;
|
||||
|
||||
/* The symbol start address */
|
||||
required uint64 start_address = 2;
|
||||
|
||||
/* The symbol end address, if explicitly defined. This will only be included if the end address is
|
||||
* explicitly defined (eg, by DWARF debugging information), will not be derived by best-guess
|
||||
* heuristics. */
|
||||
optional uint64 end_address = 3;
|
||||
}
|
||||
|
||||
/* Register State.
|
||||
* This message type serves as a union of the support register state types. */
|
||||
// TODO: Should the individual registers be marked as optional? It is possible
|
||||
// that we may be able to fetch partial register state in certain cases.
|
||||
message RegisterState {
|
||||
/* x86-32 Register State */
|
||||
message x86_32 {
|
||||
required uint32 eax = 1;
|
||||
required uint32 ebx = 2;
|
||||
required uint32 ecx = 3;
|
||||
required uint32 edx = 4;
|
||||
required uint32 edi = 5;
|
||||
required uint32 esi = 6;
|
||||
required uint32 ebp = 7;
|
||||
required uint32 esp = 8;
|
||||
required uint32 eflags = 10;
|
||||
required uint32 eip = 11;
|
||||
required uint32 cs = 12;
|
||||
required uint32 ds = 13;
|
||||
required uint32 es = 14;
|
||||
required uint32 fs = 15;
|
||||
required uint32 gs = 16;
|
||||
required uint32 ss = 17;
|
||||
}
|
||||
|
||||
/* x86-64 Register State */
|
||||
message x86_64 {
|
||||
required uint64 rax = 1
|
||||
required uint64 rbx = 2
|
||||
required uint64 rcx = 3;
|
||||
required uint64 rdx = 4;
|
||||
required uint64 rdi = 5;
|
||||
required uint64 rsi = 6;
|
||||
required uint64 rbp = 7;
|
||||
required uint64 rsp = 8;
|
||||
required uint64 r8 = 9;
|
||||
required uint64 r9 = 10;
|
||||
required uint64 r10 = 11;
|
||||
required uint64 r11 = 12;
|
||||
required uint64 r12 = 13;
|
||||
required uint64 r13 = 14;
|
||||
required uint64 r14 = 15;
|
||||
required uint64 r15 = 16;
|
||||
required uint64 rip = 17;
|
||||
required uint64 rflags = 18;
|
||||
required uint64 cs = 19;
|
||||
required uint64 fs = 20;
|
||||
required uint64 gs = 21;
|
||||
}
|
||||
|
||||
/* ARM Register State */
|
||||
message ARM {
|
||||
/* General purpose register r0-r12 */
|
||||
required uint32 r0 = 1;
|
||||
required uint32 r1 = 2;
|
||||
required uint32 r2 = 3;
|
||||
required uint32 r3 = 4;
|
||||
required uint32 r4 = 5;
|
||||
required uint32 r5 = 6;
|
||||
required uint32 r6 = 7;
|
||||
required uint32 r7 = 8;
|
||||
required uint32 r8 = 9;
|
||||
required uint32 r9 = 10;
|
||||
required uint32 r10 = 11;
|
||||
required uint32 r11 = 12;
|
||||
required uint32 r12 = 13;
|
||||
|
||||
/* r13 */
|
||||
required uint32 sp;
|
||||
|
||||
/* r14 */
|
||||
required uint32 lr;
|
||||
|
||||
/* r15 */
|
||||
required uint32 pc;
|
||||
|
||||
required uint32 cpsr;
|
||||
}
|
||||
|
||||
/* Only one of the following register state types will be provided. */
|
||||
optional x86_32 = 1;
|
||||
optional x86_64 = 2;
|
||||
optional ARM = 3;
|
||||
}
|
||||
|
||||
/* Stack frame */
|
||||
message StackFrame {
|
||||
/* Instruction pointer */
|
||||
required uint64 pc = 1;
|
||||
|
||||
/* Thread registers (required if this is the crashed thread, optional otherwise). */
|
||||
optional RegisterState registers;
|
||||
|
||||
/*
|
||||
* Optional symbol information for this frame's PC. If computed client-side, this value is a best guess, and may
|
||||
* be inaccurate.
|
||||
*
|
||||
* Symbol information may not be available, in which case this field will be excluded from the report.
|
||||
*
|
||||
* This method of encoding symbol records is unfortunately ineffecient, as it is possible that the same
|
||||
* symbol will be included multiple times in a single crash report. Unfortunately, insofar as the crash reporter
|
||||
* must remain async-safe, there is no reasonable way to perform symbol uniquing at the time the report
|
||||
* is written. A future version of this format may resolve this issue, and migrate to the use of an index
|
||||
* into a shared symbol table.
|
||||
*/
|
||||
optional Symbol symbol = 2;
|
||||
}
|
||||
|
||||
/* Thread state */
|
||||
message Thread {
|
||||
/* Thread number (indexed at 0, must be unique within a crash report) */
|
||||
required uint32 thread_number = 1;
|
||||
|
||||
/* Stack frames */
|
||||
repeated StackFrame frames = 2;
|
||||
|
||||
/* True if this is the thread responsible for generating this crash report. */
|
||||
required bool responsible = 3;
|
||||
}
|
||||
|
||||
/* All threads */
|
||||
repeated Thread threads = 13;
|
||||
|
||||
/* Binary image */
|
||||
message BinaryImage {
|
||||
/* Image base address */
|
||||
required uint64 base_address = 1;
|
||||
|
||||
/* Segment size */
|
||||
required uint64 size = 2;
|
||||
|
||||
/* Name of the binary image (should be a full path name) */
|
||||
required string name = 3;
|
||||
|
||||
/* A UUID for this image. The exact contents are platform-defined; on iOS and Mac OS X, this will be 128-bit
|
||||
* object UUID (matches Mach-O DWARF dSYM files) */
|
||||
optional bytes uuid = 4;
|
||||
|
||||
/* The image's code type. The code type may differ between binaries in the case of architectures with
|
||||
* forwards-compatible code types, such as ARM, where armv6 and armv7 images may be mixed. */
|
||||
required Processor code_type = 5;
|
||||
}
|
||||
|
||||
/* All loaded binary images */
|
||||
repeated BinaryImage binary_images = 14;
|
||||
}
|
|
@ -153,7 +153,13 @@ int main (int argc, char *argv[]) {
|
|||
#endif /* TARGET_IPHONE_OS */
|
||||
|
||||
/* Configure our reporter */
|
||||
PLCrashReporterConfig *config = [[[PLCrashReporterConfig alloc] initWithSignalHandlerType: PLCrashReporterSignalHandlerTypeMach
|
||||
PLCrashReporterSignalHandlerType signalHandlerType =
|
||||
#if !TARGET_OS_TV
|
||||
PLCrashReporterSignalHandlerTypeMach;
|
||||
#else
|
||||
PLCrashReporterSignalHandlerTypeBSD;
|
||||
#endif
|
||||
PLCrashReporterConfig *config = [[[PLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
|
||||
symbolicationStrategy: PLCrashReporterSymbolicationStrategyAll] autorelease];
|
||||
PLCrashReporter *reporter = [[[PLCrashReporter alloc] initWithConfiguration: config] autorelease];
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
// it redefines symbol names
|
||||
#import "PLCrashNamespace.h"
|
||||
|
||||
/* Library Imports */
|
||||
#import "PLCrashReporter.h"
|
||||
#import "PLCrashReport.h"
|
||||
#import "PLCrashReportTextFormatter.h"
|
||||
|
@ -98,12 +99,6 @@ typedef enum {
|
|||
PLCrashReporterErrorResourceBusy = 3
|
||||
} PLCrashReporterError;
|
||||
|
||||
|
||||
/* Library Imports */
|
||||
#import "PLCrashReporter.h"
|
||||
#import "PLCrashReport.h"
|
||||
#import "PLCrashReportTextFormatter.h"
|
||||
|
||||
/**
|
||||
* @mainpage Plausible Crash Reporter
|
||||
*
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
message EncoderTest {
|
||||
enum Enum {
|
||||
Value1 = 1;
|
||||
|
@ -54,4 +54,4 @@ message EncoderTest {
|
|||
optional bytes bytes = 15;
|
||||
|
||||
optional string string = 16;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче