Skip to content

Commit

Permalink
Upgrade to latest PLCrashReporter to support Apple Silicon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoff Raeder committed Nov 16, 2020
1 parent caccf2a commit 39bc73b
Show file tree
Hide file tree
Showing 50 changed files with 1,130 additions and 232 deletions.
2 changes: 1 addition & 1 deletion BugsplatMac.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BugsplatMac'
s.version = '1.0.17'
s.version = '1.1'
s.license = 'MIT'
s.homepage = 'http://bugsplat.com'
s.summary = 'Bugsplat macOS framework'
Expand Down
140 changes: 33 additions & 107 deletions BugsplatMac.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"
#pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
#import "CrashReporter.h"
#import <CrashReporter/CrashReporter.h>
#pragma clang diagnostic pop

// stores the set of crashreports that have been approved but aren't sent yet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#import <Foundation/Foundation.h>

#import "PLCrashNamespace.h"
#import "PLCrashReport.h"
#import <CrashReporter/CrashReporter.h>

// Dictionary keys for array elements returned by arrayOfAppUUIDsForCrashReport:
#ifndef kBITBinaryImageKeyUUID
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
// it redefines symbol names
#import "PLCrashNamespace.h"

/* Library Imports */
#import "PLCrashReporter.h"
#import "PLCrashReport.h"
#import "PLCrashReportTextFormatter.h"
Expand Down Expand Up @@ -98,12 +99,6 @@ typedef enum {
PLCrashReporterErrorResourceBusy = 3
} PLCrashReporterError;


/* Library Imports */
#import "PLCrashReporter.h"
#import "PLCrashReport.h"
#import "PLCrashReportTextFormatter.h"

/**
* @mainpage Plausible Crash Reporter
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
# define PLCRASH_FEATURE_UNWIND_COMPACT 1
#endif

/**
/*
* @}
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define PLCRASH_CONSTANTS_H

#include <assert.h>
#include <TargetConditionals.h>

#if defined(__cplusplus)
# define PLCR_EXPORT extern "C"
Expand All @@ -42,7 +43,10 @@
#endif

#if defined(__cplusplus)
# if defined(PLCRASHREPORTER_PREFIX)
# define NO_OTHER_MACRO_STARTS_WITH_THIS_NAME_
# define IS_EMPTY_(name) defined(NO_OTHER_MACRO_STARTS_WITH_THIS_NAME_ ## name)
# define IS_EMPTY(name) IS_EMPTY_(name)
# if defined(PLCRASHREPORTER_PREFIX) && !IS_EMPTY(PLCRASHREPORTER_PREFIX)
/** @internal Define the plcrash namespace, automatically inserting an inline namespace containing the configured PLCRASHREPORTER_PREFIX, if any. */
# define PLCR_CPP_BEGIN_NS namespace plcrash { inline namespace PLCRASHREPORTER_PREFIX {

Expand All @@ -60,12 +64,59 @@
# define PLCR_PRAGMA_CLANG(_p)
#endif

#ifdef __clang__
# define PLCR_DEPRECATED __attribute__((deprecated))
#else
# define PLCR_DEPRECATED
#endif

#if defined(__clang__) || defined(__GNUC__)
# define PLCR_UNUSED __attribute__((unused))
#else
# define PLCR_UNUSED
#endif

#ifdef PLCR_PRIVATE
/**
* Marks a definition as deprecated only for for external clients, allowing
* uses of it internal fo the framework.
*/
# define PLCR_EXTERNAL_DEPRECATED

/**
* @internal
* A macro to put above a definition marked PLCR_EXTERNAL_DEPRECATED that will
* silence warnings about there being a deprecation documentation marker but the
* definition not being marked deprecated.
*/
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH() \
PLCR_PRAGMA_CLANG("clang diagnostic push"); \
PLCR_PRAGMA_CLANG("clang diagnostic ignored \"-Wdocumentation-deprecated-sync\"")

/**
* @internal
* A macro to put below a definition marked PLCR_EXTERNAL_DEPRECATED that will
* silence warnings about there being a deprecation documentation marker but the
* definition not being marked deprecated.
*/
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_POP() PLCR_PRAGMA_CLANG("clang diagnostic pop")

#else

# define PLCR_EXTERNAL_DEPRECATED PLCR_DEPRECATED
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH()
# define PLCR_EXTERNAL_DEPRECATED_NOWARN_PUSH()

#endif /* PLCR_PRIVATE */

#ifdef PLCR_PRIVATE
# if defined(__clang__) && __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
# define PLCR_FALLTHROUGH [[clang::fallthrough]]
# else
# define PLCR_FALLTHROUGH do {} while (0)
# endif
#endif

#ifdef PLCR_PRIVATE
/**
* @internal
Expand All @@ -89,4 +140,14 @@
# endif
#endif /* PLCR_PRIVATE */

#ifdef PLCR_PRIVATE
# if TARGET_OS_MACCATALYST
# include <os/log.h>
# define PLCR_LOG(msg, args...) os_log(OS_LOG_DEFAULT, "[PLCrashReporter] " msg, ## args)
# else
# include <asl.h>
# define PLCR_LOG(msg, args...) asl_log(NULL, NULL, ASL_LEVEL_INFO, "[PLCrashReporter] " msg, ## args)
# endif /* TARGET_OS_MACCATALYST */
#endif /* PLCR_PRIVATE */

#endif /* PLCRASH_CONSTANTS_H */
Original file line number Diff line number Diff line change
Expand Up @@ -104,41 +104,46 @@
* building the library, and executing the following:
* nm -g -U <static library> | grep '^[0-9]' | c++filt | grep -v AcmeCo | grep -E '_pl|_PL' | awk '{print $3}' | cut -c 2- | sort | uniq | awk '{print "#define",$1,"PLNS("$1")"}'
*/
#define PLCRASH_ASYNC_OBJC_ISA_NONPTR_CLASS_MASK PLNS(PLCRASH_ASYNC_OBJC_ISA_NONPTR_CLASS_MASK)
#define pl_mach_thread_self PLNS(pl_mach_thread_self)
#define plcrash__architecture__descriptor PLNS(plcrash__architecture__descriptor)
#define plcrash__architecture__enum_values_by_name PLNS(plcrash__architecture__enum_values_by_name)
#define plcrash__architecture__enum_values_by_number PLNS(plcrash__architecture__enum_values_by_number)
#define plcrash__crash_report__application_info__descriptor PLNS(plcrash__crash_report__application_info__descriptor)
#define plcrash__crash_report__application_info__init PLNS(plcrash__crash_report__application_info__init)
#define plcrash__crash_report__binary_image__descriptor PLNS(plcrash__crash_report__binary_image__descriptor)
#define plcrash__crash_report__binary_image__init PLNS(plcrash__crash_report__binary_image__init)
#define plcrash__crash_report__descriptor PLNS(plcrash__crash_report__descriptor)
#define plcrash__crash_report__exception__descriptor PLNS(plcrash__crash_report__exception__descriptor)
#define plcrash__crash_report__exception__init PLNS(plcrash__crash_report__exception__init)
#define plcrash__crash_report__free_unpacked PLNS(plcrash__crash_report__free_unpacked)
#define plcrash__crash_report__get_packed_size PLNS(plcrash__crash_report__get_packed_size)
#define plcrash__crash_report__init PLNS(plcrash__crash_report__init)
#define plcrash__crash_report__machine_info__descriptor PLNS(plcrash__crash_report__machine_info__descriptor)
#define plcrash__crash_report__machine_info__init PLNS(plcrash__crash_report__machine_info__init)
#define plcrash__crash_report__pack PLNS(plcrash__crash_report__pack)
#define plcrash__crash_report__pack_to_buffer PLNS(plcrash__crash_report__pack_to_buffer)
#define plcrash__crash_report__process_info__descriptor PLNS(plcrash__crash_report__process_info__descriptor)
#define plcrash__crash_report__process_info__init PLNS(plcrash__crash_report__process_info__init)
#define plcrash__crash_report__processor__descriptor PLNS(plcrash__crash_report__processor__descriptor)
#define plcrash__crash_report__processor__init PLNS(plcrash__crash_report__processor__init)
#define plcrash__crash_report__processor__type_encoding__descriptor PLNS(plcrash__crash_report__processor__type_encoding__descriptor)
#define plcrash__crash_report__processor__type_encoding__enum_values_by_name PLNS(plcrash__crash_report__processor__type_encoding__enum_values_by_name)
#define plcrash__crash_report__processor__type_encoding__enum_values_by_number PLNS(plcrash__crash_report__processor__type_encoding__enum_values_by_number)
#define plcrash__crash_report__report_info__descriptor PLNS(plcrash__crash_report__report_info__descriptor)
#define plcrash__crash_report__report_info__init PLNS(plcrash__crash_report__report_info__init)
#define plcrash__crash_report__signal__descriptor PLNS(plcrash__crash_report__signal__descriptor)
#define plcrash__crash_report__signal__init PLNS(plcrash__crash_report__signal__init)
#define plcrash__crash_report__signal__mach_exception__descriptor PLNS(plcrash__crash_report__signal__mach_exception__descriptor)
#define plcrash__crash_report__signal__mach_exception__init PLNS(plcrash__crash_report__signal__mach_exception__init)
#define plcrash__crash_report__symbol__descriptor PLNS(plcrash__crash_report__symbol__descriptor)
#define plcrash__crash_report__symbol__init PLNS(plcrash__crash_report__symbol__init)
#define plcrash__crash_report__system_info__descriptor PLNS(plcrash__crash_report__system_info__descriptor)
#define plcrash__crash_report__system_info__init PLNS(plcrash__crash_report__system_info__init)
#define plcrash__crash_report__system_info__operating_system__descriptor PLNS(plcrash__crash_report__system_info__operating_system__descriptor)
#define plcrash__crash_report__system_info__operating_system__enum_values_by_name PLNS(plcrash__crash_report__system_info__operating_system__enum_values_by_name)
#define plcrash__crash_report__system_info__operating_system__enum_values_by_number PLNS(plcrash__crash_report__system_info__operating_system__enum_values_by_number)
#define plcrash__crash_report__thread__descriptor PLNS(plcrash__crash_report__thread__descriptor)
#define plcrash__crash_report__thread__init PLNS(plcrash__crash_report__thread__init)
#define plcrash__crash_report__thread__register_value__descriptor PLNS(plcrash__crash_report__thread__register_value__descriptor)
#define plcrash__crash_report__thread__register_value__init PLNS(plcrash__crash_report__thread__register_value__init)
#define plcrash__crash_report__thread__stack_frame__descriptor PLNS(plcrash__crash_report__thread__stack_frame__descriptor)
#define plcrash__crash_report__thread__stack_frame__init PLNS(plcrash__crash_report__thread__stack_frame__init)
#define plcrash__crash_report__unpack PLNS(plcrash__crash_report__unpack)
#define plcrash_async_address_apply_offset PLNS(plcrash_async_address_apply_offset)
#define plcrash_async_allocator_alloc PLNS(plcrash_async_allocator_alloc)
#define plcrash_async_allocator_new PLNS(plcrash_async_allocator_new)
#define plcrash_async_byteorder_big_endian PLNS(plcrash_async_byteorder_big_endian)
#define plcrash_async_byteorder_direct PLNS(plcrash_async_byteorder_direct)
#define plcrash_async_byteorder_little_endian PLNS(plcrash_async_byteorder_little_endian)
Expand Down Expand Up @@ -205,8 +210,6 @@
#define plcrash_async_objc_cache_free PLNS(plcrash_async_objc_cache_free)
#define plcrash_async_objc_cache_init PLNS(plcrash_async_objc_cache_init)
#define plcrash_async_objc_find_method PLNS(plcrash_async_objc_find_method)
#define plcrash_async_objc_supports_nonptr_isa PLNS(plcrash_async_objc_supports_nonptr_isa)
#define plcrash_async_read_addr PLNS(plcrash_async_read_addr)
#define plcrash_async_signal_sigcode PLNS(plcrash_async_signal_sigcode)
#define plcrash_async_signal_signame PLNS(plcrash_async_signal_signame)
#define plcrash_async_strcmp PLNS(plcrash_async_strcmp)
Expand Down Expand Up @@ -243,6 +246,7 @@
#define plcrash_log_writer_init PLNS(plcrash_log_writer_init)
#define plcrash_log_writer_set_exception PLNS(plcrash_log_writer_set_exception)
#define plcrash_log_writer_write PLNS(plcrash_log_writer_write)
#define plcrash_log_writer_set_custom_data PLNS(plcrash_log_writer_set_custom_data)
#define plcrash_nasync_image_list_append PLNS(plcrash_nasync_image_list_append)
#define plcrash_nasync_image_list_free PLNS(plcrash_nasync_image_list_free)
#define plcrash_nasync_image_list_init PLNS(plcrash_nasync_image_list_init)
Expand All @@ -252,6 +256,7 @@
#define plcrash_populate_error PLNS(plcrash_populate_error)
#define plcrash_populate_mach_error PLNS(plcrash_populate_mach_error)
#define plcrash_populate_posix_error PLNS(plcrash_populate_posix_error)
#define plcrash_signal_handler PLNS(plcrash_signal_handler)
#define plcrash_sysctl_int PLNS(plcrash_sysctl_int)
#define plcrash_sysctl_string PLNS(plcrash_sysctl_string)
#define plcrash_sysctl_valid_utf8_bytes PLNS(plcrash_sysctl_valid_utf8_bytes)
Expand All @@ -269,8 +274,6 @@
#define plframe_cursor_read_frame_ptr PLNS(plframe_cursor_read_frame_ptr)
#define plframe_cursor_thread_init PLNS(plframe_cursor_thread_init)
#define plframe_strerror PLNS(plframe_strerror)
#define plframe_test_thread_spawn PLNS(plframe_test_thread_spawn)
#define plframe_test_thread_stop PLNS(plframe_test_thread_stop)

#endif

Expand All @@ -296,19 +299,22 @@
# endif

# define protobuf_c_buffer_simple_append PLNS(protobuf_c_buffer_simple_append)
# define protobuf_c_default_allocator PLNS(protobuf_c_default_allocator)
# define protobuf_c_empty_string PLNS(protobuf_c_empty_string)
# define protobuf_c_enum_descriptor_get_value PLNS(protobuf_c_enum_descriptor_get_value)
# define protobuf_c_enum_descriptor_get_value_by_name PLNS(protobuf_c_enum_descriptor_get_value_by_name)
# define protobuf_c_message_check PLNS(protobuf_c_message_check)
# define protobuf_c_message_descriptor_get_field PLNS(protobuf_c_message_descriptor_get_field)
# define protobuf_c_message_descriptor_get_field_by_name PLNS(protobuf_c_message_descriptor_get_field_by_name)
# define protobuf_c_message_free_unpacked PLNS(protobuf_c_message_free_unpacked)
# define protobuf_c_message_get_packed_size PLNS(protobuf_c_message_get_packed_size)
# define protobuf_c_message_init PLNS(protobuf_c_message_init)
# define protobuf_c_message_pack PLNS(protobuf_c_message_pack)
# define protobuf_c_message_pack_to_buffer PLNS(protobuf_c_message_pack_to_buffer)
# define protobuf_c_message_unpack PLNS(protobuf_c_message_unpack)
# define protobuf_c_out_of_memory PLNS(protobuf_c_out_of_memory)
# define protobuf_c_service_descriptor_get_method_by_name PLNS(protobuf_c_service_descriptor_get_method_by_name)
# define protobuf_c_service_destroy PLNS(protobuf_c_service_destroy)
# define protobuf_c_service_generated_init PLNS(protobuf_c_service_generated_init)
# define protobuf_c_system_allocator PLNS(protobuf_c_system_allocator)
# define protobuf_c_service_invoke_internal PLNS(protobuf_c_service_invoke_internal)
# define protobuf_c_version PLNS(protobuf_c_version)
# define protobuf_c_version_number PLNS(protobuf_c_version_number)
#endif /* PLCR_PRIVATE */
Loading

0 comments on commit 39bc73b

Please sign in to comment.