diff options
author | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2017-10-16 11:53:42 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2017-10-19 09:22:57 (GMT) |
commit | eb07238e9c1a09a640dae06e8a433d7dba77f490 (patch) | |
tree | 51b618bbdf933bcca2b8deb915e131c48d80d5f7 /3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h | |
parent | 80ef26c165a08d5251d7ee56e0bd07b86fc82f55 (diff) | |
download | swift-eb07238e9c1a09a640dae06e8a433d7dba77f490.zip swift-eb07238e9c1a09a640dae06e8a433d7dba77f490.tar.bz2 |
Upgrade Breakpad to latest
This commit will upgrade breakpad to version 1.0.86
(I9957f27cd134f862b9831e4b1d90f8a014eb37b6) from
https://chromium.googlesource.com/breakpad/breakpad
Added a script(BreakpadSwiftCleanup.sh) that remove files from Breakpad's
repository that are not used by Swift.
This commit also re-applies the changes that were introduced in commit
7f0fe603be200c09c74cf9cc295a972f3c3dbdfd, that change the minidump
filename format to include version and date
Test-Information:
https://travis-ci.org/google/breakpad/builds/283789304
https://ci.appveyor.com/project/vapier/breakpad/build/job/1bu73ysmcfpwg9e4
Tested by adding some code that forces a crash to the client on Windows 10
with VS2015. Verified the name and contents of the generated crash dump.
Change-Id: Ied9e74088e43137845edc09d070c2c27494aeade
Diffstat (limited to '3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h')
-rw-r--r-- | 3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h b/3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h index 8394ce6..4e4b4a6 100644 --- a/3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h +++ b/3rdParty/Breakpad/src/client/mac/handler/minidump_generator.h @@ -37,6 +37,7 @@ #include <string> +#include "client/mac/handler/ucontext_compat.h" #include "client/minidump_file_writer.h" #include "common/memory.h" #include "common/mac/macho_utilities.h" @@ -49,7 +50,9 @@ #define HAS_PPC_SUPPORT #endif #if defined(__arm__) - #define HAS_ARM_SUPPORT +#define HAS_ARM_SUPPORT +#elif defined(__aarch64__) +#define HAS_ARM64_SUPPORT #elif defined(__i386__) || defined(__x86_64__) #define HAS_X86_SUPPORT #endif @@ -102,6 +105,11 @@ class MinidumpGenerator { exception_thread_ = thread_name; } + // Specify the task context. If |task_context| is not NULL, it will be used + // to retrieve the context of the current thread, instead of using + // |thread_get_state|. + void SetTaskContext(breakpad_ucontext_t *task_context); + // Gather system information. This should be call at least once before using // the MinidumpGenerator class. static void GatherSystemInformation(); @@ -125,7 +133,7 @@ class MinidumpGenerator { bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream); // Helpers - u_int64_t CurrentPCForStack(breakpad_thread_state_data_t state); + uint64_t CurrentPCForStack(breakpad_thread_state_data_t state); bool GetThreadState(thread_act_t target_thread, thread_state_t state, mach_msg_type_number_t *count); bool WriteStackFromStartAddress(mach_vm_address_t start_addr, @@ -146,31 +154,38 @@ class MinidumpGenerator { MDMemoryDescriptor *stack_location); bool WriteContextARM(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackARM(breakpad_thread_state_data_t state); + uint64_t CurrentPCForStackARM(breakpad_thread_state_data_t state); +#endif +#ifdef HAS_ARM64_SUPPORT + bool WriteStackARM64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextARM64(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackARM64(breakpad_thread_state_data_t state); #endif #ifdef HAS_PPC_SUPPORT bool WriteStackPPC(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContextPPC(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state); + uint64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state); bool WriteStackPPC64(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContextPPC64(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state); + uint64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state); #endif #ifdef HAS_X86_SUPPORT bool WriteStackX86(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContextX86(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackX86(breakpad_thread_state_data_t state); + uint64_t CurrentPCForStackX86(breakpad_thread_state_data_t state); bool WriteStackX86_64(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContextX86_64(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); - u_int64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state); + uint64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state); #endif // disallow copy ctor and operator= @@ -192,13 +207,16 @@ class MinidumpGenerator { // CPU type of the task being dumped. cpu_type_t cpu_type_; - + // System information static char build_string_[16]; static int os_major_version_; static int os_minor_version_; static int os_build_number_; - + + // Context of the task to dump. + breakpad_ucontext_t *task_context_; + // Information about dynamically loaded code DynamicImages *dynamic_images_; |