├── CrashDump ├── CrashDump.uplugin ├── Resources │ └── Icon128.png └── Source │ ├── CrashDump │ ├── CrashDump.Build.cs │ ├── CrashDump_UPL_Android.xml │ ├── Private │ │ └── CrashDump.cpp │ └── Public │ │ └── CrashDump.h │ └── ThirdParty │ └── GoogleBreakpad │ ├── LICENSE │ ├── include │ ├── breakpad_googletest_includes.h │ ├── client │ │ ├── linux │ │ │ ├── crash_generation │ │ │ │ ├── client_info.h │ │ │ │ ├── crash_generation_client.h │ │ │ │ └── crash_generation_server.h │ │ │ ├── dump_writer_common │ │ │ │ ├── mapping_info.h │ │ │ │ ├── raw_context_cpu.h │ │ │ │ ├── thread_info.h │ │ │ │ └── ucontext_reader.h │ │ │ ├── handler │ │ │ │ ├── exception_handler.h │ │ │ │ ├── microdump_extra_info.h │ │ │ │ └── minidump_descriptor.h │ │ │ ├── log │ │ │ │ └── log.h │ │ │ ├── microdump_writer │ │ │ │ └── microdump_writer.h │ │ │ └── minidump_writer │ │ │ │ ├── cpu_set.h │ │ │ │ ├── directory_reader.h │ │ │ │ ├── line_reader.h │ │ │ │ ├── linux_core_dumper.h │ │ │ │ ├── linux_dumper.h │ │ │ │ ├── linux_ptrace_dumper.h │ │ │ │ ├── minidump_writer.h │ │ │ │ ├── minidump_writer_unittest_utils.h │ │ │ │ └── proc_cpuinfo_reader.h │ │ ├── minidump_file_writer-inl.h │ │ └── minidump_file_writer.h │ ├── common │ │ ├── android │ │ │ ├── include │ │ │ │ ├── elf.h │ │ │ │ ├── link.h │ │ │ │ ├── sgidefs.h │ │ │ │ ├── stab.h │ │ │ │ ├── sys │ │ │ │ │ ├── procfs.h │ │ │ │ │ ├── signal.h │ │ │ │ │ └── user.h │ │ │ │ └── ucontext.h │ │ │ └── ucontext_constants.h │ │ ├── basictypes.h │ │ ├── byte_cursor.h │ │ ├── convert_UTF.h │ │ ├── dwarf_cfi_to_module.h │ │ ├── dwarf_cu_to_module.h │ │ ├── dwarf_line_to_module.h │ │ ├── language.h │ │ ├── linux │ │ │ ├── crc32.h │ │ │ ├── dump_symbols.h │ │ │ ├── eintr_wrapper.h │ │ │ ├── elf_core_dump.h │ │ │ ├── elf_gnu_compat.h │ │ │ ├── elf_symbols_to_module.h │ │ │ ├── elfutils-inl.h │ │ │ ├── elfutils.h │ │ │ ├── file_id.h │ │ │ ├── google_crashdump_uploader.h │ │ │ ├── guid_creator.h │ │ │ ├── http_upload.h │ │ │ ├── ignore_ret.h │ │ │ ├── libcurl_wrapper.h │ │ │ ├── linux_libc_support.h │ │ │ ├── memory_mapped_file.h │ │ │ ├── safe_readlink.h │ │ │ ├── symbol_upload.h │ │ │ └── synth_elf.h │ │ ├── md5.h │ │ ├── memory.h │ │ ├── memory_range.h │ │ ├── minidump_type_helper.h │ │ ├── module.h │ │ ├── scoped_ptr.h │ │ ├── simple_string_dictionary.h │ │ ├── stabs_reader.h │ │ ├── stabs_to_module.h │ │ ├── stdio_wrapper.h │ │ ├── string_conversion.h │ │ ├── symbol_data.h │ │ ├── test_assembler.h │ │ ├── unordered.h │ │ └── using_std_string.h │ ├── config.h │ ├── google_breakpad │ │ ├── common │ │ │ ├── breakpad_types.h │ │ │ ├── minidump_cpu_amd64.h │ │ │ ├── minidump_cpu_arm.h │ │ │ ├── minidump_cpu_arm64.h │ │ │ ├── minidump_cpu_mips.h │ │ │ ├── minidump_cpu_ppc.h │ │ │ ├── minidump_cpu_ppc64.h │ │ │ ├── minidump_cpu_sparc.h │ │ │ ├── minidump_cpu_x86.h │ │ │ ├── minidump_exception_linux.h │ │ │ ├── minidump_exception_mac.h │ │ │ ├── minidump_exception_ps3.h │ │ │ ├── minidump_exception_solaris.h │ │ │ ├── minidump_exception_win32.h │ │ │ ├── minidump_format.h │ │ │ └── minidump_size.h │ │ └── processor │ │ │ ├── basic_source_line_resolver.h │ │ │ ├── call_stack.h │ │ │ ├── code_module.h │ │ │ ├── code_modules.h │ │ │ ├── dump_context.h │ │ │ ├── dump_object.h │ │ │ ├── exploitability.h │ │ │ ├── fast_source_line_resolver.h │ │ │ ├── memory_region.h │ │ │ ├── microdump.h │ │ │ ├── microdump_processor.h │ │ │ ├── minidump.h │ │ │ ├── minidump_processor.h │ │ │ ├── proc_maps_linux.h │ │ │ ├── process_result.h │ │ │ ├── process_state.h │ │ │ ├── source_line_resolver_base.h │ │ │ ├── source_line_resolver_interface.h │ │ │ ├── stack_frame.h │ │ │ ├── stack_frame_cpu.h │ │ │ ├── stack_frame_symbolizer.h │ │ │ ├── stackwalker.h │ │ │ ├── symbol_supplier.h │ │ │ └── system_info.h │ ├── processor │ │ ├── address_map-inl.h │ │ ├── address_map.h │ │ ├── basic_code_module.h │ │ ├── basic_code_modules.h │ │ ├── basic_source_line_resolver_types.h │ │ ├── cfi_frame_info-inl.h │ │ ├── cfi_frame_info.h │ │ ├── contained_range_map-inl.h │ │ ├── contained_range_map.h │ │ ├── disassembler_x86.h │ │ ├── exploitability_linux.h │ │ ├── exploitability_win.h │ │ ├── fast_source_line_resolver_types.h │ │ ├── linked_ptr.h │ │ ├── logging.h │ │ ├── map_serializers-inl.h │ │ ├── map_serializers.h │ │ ├── module_comparer.h │ │ ├── module_factory.h │ │ ├── module_serializer.h │ │ ├── pathname_stripper.h │ │ ├── postfix_evaluator-inl.h │ │ ├── postfix_evaluator.h │ │ ├── range_map-inl.h │ │ ├── range_map.h │ │ ├── simple_serializer-inl.h │ │ ├── simple_serializer.h │ │ ├── simple_symbol_supplier.h │ │ ├── source_line_resolver_base_types.h │ │ ├── stackwalk_common.h │ │ ├── stackwalker_address_list.h │ │ ├── stackwalker_amd64.h │ │ ├── stackwalker_arm.h │ │ ├── stackwalker_arm64.h │ │ ├── stackwalker_mips.h │ │ ├── stackwalker_ppc.h │ │ ├── stackwalker_ppc64.h │ │ ├── stackwalker_selftest_sol.s │ │ ├── stackwalker_sparc.h │ │ ├── stackwalker_unittest_utils.h │ │ ├── stackwalker_x86.h │ │ ├── static_address_map-inl.h │ │ ├── static_address_map.h │ │ ├── static_contained_range_map-inl.h │ │ ├── static_contained_range_map.h │ │ ├── static_map-inl.h │ │ ├── static_map.h │ │ ├── static_map_iterator-inl.h │ │ ├── static_map_iterator.h │ │ ├── static_range_map-inl.h │ │ ├── static_range_map.h │ │ ├── symbolic_constants_win.h │ │ ├── synth_minidump.h │ │ ├── synth_minidump_unittest_data.h │ │ ├── tokenize.h │ │ └── windows_frame_info.h │ └── third_party │ │ └── lss │ │ └── linux_syscall_support.h │ └── libbreakpad_client.a ├── Extras └── jni.zip ├── LICENSE.txt └── README.md /CrashDump/CrashDump.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "CrashDump", 6 | "Description": "A component which dumps NDK crashes on Android", 7 | "Category": "Other", 8 | "CreatedBy": "Damian Nowakowski", 9 | "CreatedByURL": "https://damnow.blogspot.com", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "CanContainContent": true, 14 | "IsBetaVersion": true, 15 | "Installed": false, 16 | "Modules": [ 17 | { 18 | "Name": "CrashDump", 19 | "Type": "Developer", 20 | "LoadingPhase": "Default" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /CrashDump/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zompi2/UE4AndroidCrashDump/d5d3276d471cf807e7d26ed45fafe6ccfe482b23/CrashDump/Resources/Icon128.png -------------------------------------------------------------------------------- /CrashDump/Source/CrashDump/CrashDump.Build.cs: -------------------------------------------------------------------------------- 1 | // (c) 2017 Damian Nowakowski 2 | 3 | using System; 4 | using System.IO; 5 | using UnrealBuildTool; 6 | 7 | public class CrashDump : ModuleRules 8 | { 9 | public CrashDump(ReadOnlyTargetRules Target) : base(Target) 10 | { 11 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 12 | 13 | PublicIncludePaths.AddRange(new string[] {"CrashDump/Public"}); 14 | PrivateIncludePaths.AddRange(new string[] {"CrashDump/Private"}); 15 | PublicDependencyModuleNames.AddRange(new string[]{"Core", "CoreUObject","Engine"}); 16 | 17 | if (Target.Platform == UnrealTargetPlatform.Android && 18 | Target.Configuration != UnrealTargetConfiguration.Shipping && 19 | Target.Configuration != UnrealTargetConfiguration.Test) 20 | { 21 | Definitions.Add("WITH_CRASH_DUMP=1"); 22 | PrivateDependencyModuleNames.AddRange(new string[] { "Launch" }); 23 | 24 | string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath); 25 | AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "CrashDump_UPL_Android.xml"))); 26 | 27 | string ThirdPartyPath = Path.Combine(ModuleDirectory, "..", "ThirdParty"); 28 | PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "GoogleBreakpad", "include")); 29 | PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "GoogleBreakpad", "libbreakpad_client.a")); 30 | } 31 | else 32 | { 33 | Definitions.Add("WITH_CRASH_DUMP=0"); 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /CrashDump/Source/CrashDump/CrashDump_UPL_Android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | import android.os.Environment; 7 | 8 | 9 | 10 | 11 | private native void setUpBreakpad(String filepath); 12 | 13 | 14 | 15 | 16 | try { 17 | String crashDumpDirectoryPath = Environment.getExternalStorageDirectory().getPath() + "/UE4CrashDumps/" + getPackageName() + "/"; 18 | File crashDumpDir = new File(crashDumpDirectoryPath); 19 | if (crashDumpDir.exists() == false) { 20 | crashDumpDir.mkdirs(); 21 | } 22 | setUpBreakpad(crashDumpDirectoryPath); 23 | } catch (Exception e) { 24 | Log.debug("Can't create a dir for crash dump logs. Exception: " + e); 25 | } 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /CrashDump/Source/CrashDump/Private/CrashDump.cpp: -------------------------------------------------------------------------------- 1 | // (c) 2017 Damian Nowakowski 2 | 3 | #include "CrashDump.h" 4 | 5 | #if PLATFORM_ANDROID 6 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) 7 | 8 | #include "Android/AndroidJNI.h" 9 | #include "Android/AndroidApplication.h" 10 | #include 11 | 12 | #include "client/linux/handler/exception_handler.h" 13 | #include "client/linux/handler/minidump_descriptor.h" 14 | 15 | #endif 16 | #endif 17 | 18 | #define LOCTEXT_NAMESPACE "FCrashDumpModule" 19 | 20 | #if PLATFORM_ANDROID 21 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) 22 | 23 | static google_breakpad::ExceptionHandler* exceptionHandler; 24 | bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) 25 | { 26 | FPlatformMisc::LowLevelOutputDebugStringf(TEXT("Dumping Callstack (%i): %s"), succeeded, descriptor.path()); 27 | return succeeded; 28 | } 29 | 30 | extern "C" void Java_com_epicgames_ue4_GameActivity_setUpBreakpad(JNIEnv* env, jobject obj, jstring filepath) 31 | { 32 | const char *path = env->GetStringUTFChars(filepath, 0); 33 | FPlatformMisc::LowLevelOutputDebugStringf(TEXT("Running Java_com_epicgames_ue4_GameActivity_setUpBreakpad: %s"), path); 34 | google_breakpad::MinidumpDescriptor descriptor(path); 35 | exceptionHandler = new google_breakpad::ExceptionHandler(descriptor, NULL, DumpCallback, NULL, true, -1); 36 | } 37 | 38 | #endif 39 | #endif 40 | 41 | void FCrashDumpModule::StartupModule() 42 | { 43 | } 44 | 45 | void FCrashDumpModule::ShutdownModule() 46 | { 47 | } 48 | #undef LOCTEXT_NAMESPACE 49 | 50 | IMPLEMENT_MODULE(FCrashDumpModule, CrashDump) -------------------------------------------------------------------------------- /CrashDump/Source/CrashDump/Public/CrashDump.h: -------------------------------------------------------------------------------- 1 | // (c) 2017 Damian Nowakowski 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "ModuleManager.h" 7 | 8 | class FCrashDumpModule : public IModuleInterface 9 | { 10 | public: 11 | 12 | /** IModuleInterface implementation */ 13 | virtual void StartupModule() override; 14 | virtual void ShutdownModule() override; 15 | }; -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | -------------------------------------------------------------------- 31 | 32 | Copyright 2001-2004 Unicode, Inc. 33 | 34 | Disclaimer 35 | 36 | This source code is provided as is by Unicode, Inc. No claims are 37 | made as to fitness for any particular purpose. No warranties of any 38 | kind are expressed or implied. The recipient agrees to determine 39 | applicability of information provided. If this file has been 40 | purchased on magnetic or optical media from Unicode, Inc., the 41 | sole remedy for any claim will be exchange of defective media 42 | within 90 days of receipt. 43 | 44 | Limitations on Rights to Redistribute This Code 45 | 46 | Unicode, Inc. hereby grants the right to freely use the information 47 | supplied in this file in the creation of products supporting the 48 | Unicode Standard, and to make copies of this file in any form 49 | for internal or external distribution as long as this notice 50 | remains attached. 51 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/breakpad_googletest_includes.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef BREAKPAD_GOOGLETEST_INCLUDES_H__ 31 | #define BREAKPAD_GOOGLETEST_INCLUDES_H__ 32 | 33 | #include "gtest/gtest.h" 34 | #include "gmock/gmock.h" 35 | 36 | // If AddressSanitizer is used, NULL pointer dereferences generate SIGILL 37 | // (illegal instruction) instead of SIGSEGV (segmentation fault). Also, 38 | // the number of memory regions differs, so there is no point in running 39 | // this test if AddressSanitizer is used. 40 | // 41 | // Ideally we'd use this attribute to disable ASAN on a per-func basis, 42 | // but this doesn't seem to actually work, and it's changed names over 43 | // time. So just stick with disabling the actual tests. 44 | // http://crbug.com/304575 45 | //#define NO_ASAN __attribute__((no_sanitize_address)) 46 | #if defined(__clang__) && defined(__has_feature) 47 | // Have to keep this check sep from above as newer gcc will barf on it. 48 | # if __has_feature(address_sanitizer) 49 | # define ADDRESS_SANITIZER 50 | # endif 51 | #elif defined(__GNUC__) && defined(__SANITIZE_ADDRESS__) 52 | # define ADDRESS_SANITIZER 53 | #else 54 | # undef ADDRESS_SANITIZER 55 | #endif 56 | 57 | #endif // BREAKPAD_GOOGLETEST_INCLUDES_H__ 58 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/crash_generation/client_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_ 31 | #define CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_ 32 | 33 | namespace google_breakpad { 34 | 35 | class CrashGenerationServer; 36 | 37 | class ClientInfo { 38 | public: 39 | ClientInfo(pid_t pid, CrashGenerationServer* crash_server) 40 | : crash_server_(crash_server), 41 | pid_(pid) {} 42 | 43 | CrashGenerationServer* crash_server() const { return crash_server_; } 44 | pid_t pid() const { return pid_; } 45 | 46 | private: 47 | CrashGenerationServer* crash_server_; 48 | pid_t pid_; 49 | }; 50 | 51 | } 52 | 53 | #endif // CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_ 54 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/crash_generation/crash_generation_client.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ 31 | #define CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ 32 | 33 | #include "common/basictypes.h" 34 | 35 | #include 36 | 37 | namespace google_breakpad { 38 | 39 | // CrashGenerationClient is an interface for implementing out-of-process crash 40 | // dumping. The default implementation, accessed via the TryCreate() factory, 41 | // works in conjunction with the CrashGenerationServer to generate a minidump 42 | // via a remote process. 43 | class CrashGenerationClient { 44 | public: 45 | CrashGenerationClient() {} 46 | virtual ~CrashGenerationClient() {} 47 | 48 | // Request the crash server to generate a dump. |blob| is an opaque 49 | // CrashContext pointer from exception_handler.h. 50 | // Returns true if the dump was successful; false otherwise. 51 | virtual bool RequestDump(const void* blob, size_t blob_size) = 0; 52 | 53 | // Returns a new CrashGenerationClient if |server_fd| is valid and 54 | // connects to a CrashGenerationServer. Otherwise, return NULL. 55 | // The returned CrashGenerationClient* is owned by the caller of 56 | // this function. 57 | static CrashGenerationClient* TryCreate(int server_fd); 58 | 59 | private: 60 | DISALLOW_COPY_AND_ASSIGN(CrashGenerationClient); 61 | }; 62 | 63 | } // namespace google_breakpad 64 | 65 | #endif // CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ 66 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/mapping_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_MAPPING_INFO_H_ 31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_MAPPING_INFO_H_ 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #include "google_breakpad/common/minidump_format.h" 38 | 39 | namespace google_breakpad { 40 | 41 | // One of these is produced for each mapping in the process (i.e. line in 42 | // /proc/$x/maps). 43 | struct MappingInfo { 44 | // On Android, relocation packing can mean that the reported start 45 | // address of the mapping must be adjusted by a bias in order to 46 | // compensate for the compression of the relocation section. The 47 | // following two members hold (after LateInit) the adjusted mapping 48 | // range. See crbug.com/606972 for more information. 49 | uintptr_t start_addr; 50 | size_t size; 51 | // When Android relocation packing causes |start_addr| and |size| to 52 | // be modified with a load bias, we need to remember the unbiased 53 | // address range. The following structure holds the original mapping 54 | // address range as reported by the operating system. 55 | struct { 56 | uintptr_t start_addr; 57 | uintptr_t end_addr; 58 | } system_mapping_info; 59 | size_t offset; // offset into the backed file. 60 | bool exec; // true if the mapping has the execute bit set. 61 | char name[NAME_MAX]; 62 | }; 63 | 64 | struct MappingEntry { 65 | MappingInfo first; 66 | uint8_t second[sizeof(MDGUID)]; 67 | }; 68 | 69 | // A list of 70 | typedef std::list MappingList; 71 | 72 | } // namespace google_breakpad 73 | 74 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_MAPPING_INFO_H_ 75 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/raw_context_cpu.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_RAW_CONTEXT_CPU_H 31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_RAW_CONTEXT_CPU_H 32 | 33 | #include "google_breakpad/common/minidump_format.h" 34 | 35 | namespace google_breakpad { 36 | 37 | #if defined(__i386__) 38 | typedef MDRawContextX86 RawContextCPU; 39 | #elif defined(__x86_64) 40 | typedef MDRawContextAMD64 RawContextCPU; 41 | #elif defined(__ARM_EABI__) 42 | typedef MDRawContextARM RawContextCPU; 43 | #elif defined(__aarch64__) 44 | typedef MDRawContextARM64 RawContextCPU; 45 | #elif defined(__mips__) 46 | typedef MDRawContextMIPS RawContextCPU; 47 | #else 48 | #error "This code has not been ported to your platform yet." 49 | #endif 50 | 51 | } // namespace google_breakpad 52 | 53 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_RAW_CONTEXT_CPU_H 54 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/thread_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_ 31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_ 32 | 33 | #include 34 | #include 35 | 36 | #include "client/linux/dump_writer_common/raw_context_cpu.h" 37 | #include "common/memory.h" 38 | #include "google_breakpad/common/minidump_format.h" 39 | 40 | namespace google_breakpad { 41 | 42 | #if defined(__i386) || defined(__x86_64) 43 | typedef __typeof__(((struct user*) 0)->u_debugreg[0]) debugreg_t; 44 | #endif 45 | 46 | // We produce one of these structures for each thread in the crashed process. 47 | struct ThreadInfo { 48 | pid_t tgid; // thread group id 49 | pid_t ppid; // parent process 50 | 51 | uintptr_t stack_pointer; // thread stack pointer 52 | 53 | 54 | #if defined(__i386) || defined(__x86_64) 55 | user_regs_struct regs; 56 | user_fpregs_struct fpregs; 57 | static const unsigned kNumDebugRegisters = 8; 58 | debugreg_t dregs[8]; 59 | #if defined(__i386) 60 | user_fpxregs_struct fpxregs; 61 | #endif // defined(__i386) 62 | 63 | #elif defined(__ARM_EABI__) 64 | // Mimicking how strace does this(see syscall.c, search for GETREGS) 65 | struct user_regs regs; 66 | struct user_fpregs fpregs; 67 | #elif defined(__aarch64__) 68 | // Use the structures defined in 69 | struct user_regs_struct regs; 70 | struct user_fpsimd_struct fpregs; 71 | #elif defined(__mips__) 72 | // Use the structure defined in . 73 | mcontext_t mcontext; 74 | #endif 75 | 76 | // Returns the instruction pointer (platform-dependent impl.). 77 | uintptr_t GetInstructionPointer() const; 78 | 79 | // Fills a RawContextCPU using the context in the ThreadInfo object. 80 | void FillCPUContext(RawContextCPU* out) const; 81 | 82 | // Returns the pointer and size of general purpose register area. 83 | void GetGeneralPurposeRegisters(void** gp_regs, size_t* size); 84 | 85 | // Returns the pointer and size of float point register area. 86 | void GetFloatingPointRegisters(void** fp_regs, size_t* size); 87 | }; 88 | 89 | } // namespace google_breakpad 90 | 91 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_ 92 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/ucontext_reader.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H 31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H 32 | 33 | #include 34 | #include 35 | 36 | #include "client/linux/dump_writer_common/raw_context_cpu.h" 37 | #include "common/memory.h" 38 | #include "google_breakpad/common/minidump_format.h" 39 | 40 | namespace google_breakpad { 41 | 42 | // Wraps platform-dependent implementations of accessors to ucontext structs. 43 | struct UContextReader { 44 | static uintptr_t GetStackPointer(const struct ucontext* uc); 45 | 46 | static uintptr_t GetInstructionPointer(const struct ucontext* uc); 47 | 48 | // Juggle a arch-specific ucontext into a minidump format 49 | // out: the minidump structure 50 | // info: the collection of register structures. 51 | #if defined(__i386__) || defined(__x86_64) 52 | static void FillCPUContext(RawContextCPU *out, const ucontext *uc, 53 | const struct _libc_fpstate* fp); 54 | #elif defined(__aarch64__) 55 | static void FillCPUContext(RawContextCPU *out, const ucontext *uc, 56 | const struct fpsimd_context* fpregs); 57 | #else 58 | static void FillCPUContext(RawContextCPU *out, const ucontext *uc); 59 | #endif 60 | }; 61 | 62 | } // namespace google_breakpad 63 | 64 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H 65 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/handler/microdump_extra_info.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_ 31 | #define CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_ 32 | 33 | namespace google_breakpad { 34 | 35 | struct MicrodumpExtraInfo { 36 | // Strings pointed to by this struct are not copied, and are 37 | // expected to remain valid for the lifetime of the process. 38 | const char* build_fingerprint; 39 | const char* product_info; 40 | const char* gpu_fingerprint; 41 | const char* process_type; 42 | 43 | MicrodumpExtraInfo() 44 | : build_fingerprint(NULL), 45 | product_info(NULL), 46 | gpu_fingerprint(NULL), 47 | process_type(NULL) {} 48 | }; 49 | 50 | } 51 | 52 | #endif // CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_ 53 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/log/log.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_LOG_LOG_H_ 31 | #define CLIENT_LINUX_LOG_LOG_H_ 32 | 33 | #include 34 | 35 | namespace logger { 36 | 37 | int write(const char* buf, size_t nbytes); 38 | 39 | // In the case of Android the log can be written to the default system log 40 | // (default behavior of write() above, or to the crash log (see 41 | // writeToCrashLog() below). 42 | #if defined(__ANDROID__) 43 | 44 | // The logger must be initialized in a non-compromised context. 45 | void initializeCrashLogWriter(); 46 | 47 | // Once initialized, writeToCrashLog is safe to use in a compromised context, 48 | // even if the initialization failed, in which case this will silently fall 49 | // back on write(). 50 | int writeToCrashLog(const char* buf); 51 | #endif 52 | 53 | } // namespace logger 54 | 55 | #endif // CLIENT_LINUX_LOG_LOG_H_ 56 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/microdump_writer/microdump_writer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_MINIDUMP_WRITER_MICRODUMP_WRITER_H_ 31 | #define CLIENT_LINUX_MINIDUMP_WRITER_MICRODUMP_WRITER_H_ 32 | 33 | #include 34 | #include 35 | 36 | #include "client/linux/dump_writer_common/mapping_info.h" 37 | 38 | namespace google_breakpad { 39 | 40 | struct MicrodumpExtraInfo; 41 | 42 | // Writes a microdump (a reduced dump containing only the state of the crashing 43 | // thread) on the console (logcat on Android). These functions do not malloc nor 44 | // use libc functions which may. Thus, it can be used in contexts where the 45 | // state of the heap may be corrupt. 46 | // Args: 47 | // crashing_process: the pid of the crashing process. This must be trusted. 48 | // blob: a blob of data from the crashing process. See exception_handler.h 49 | // blob_size: the length of |blob| in bytes. 50 | // mappings: a list of additional mappings provided by the application. 51 | // build_fingerprint: a (optional) C string which determines the OS 52 | // build fingerprint (e.g., aosp/occam/mako:5.1.1/LMY47W/1234:eng/dev-keys). 53 | // product_info: a (optional) C string which determines the product name and 54 | // version (e.g., WebView:42.0.2311.136). 55 | // 56 | // Returns true iff successful. 57 | bool WriteMicrodump(pid_t crashing_process, 58 | const void* blob, 59 | size_t blob_size, 60 | const MappingList& mappings, 61 | bool skip_dump_if_main_module_not_referenced, 62 | uintptr_t address_within_main_module, 63 | bool sanitize_stack, 64 | const MicrodumpExtraInfo& microdump_extra_info); 65 | 66 | } // namespace google_breakpad 67 | 68 | #endif // CLIENT_LINUX_MINIDUMP_WRITER_MICRODUMP_WRITER_H_ 69 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/minidump_writer/directory_reader.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_ 31 | #define CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_ 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #include "common/linux/linux_libc_support.h" 41 | #include "third_party/lss/linux_syscall_support.h" 42 | 43 | namespace google_breakpad { 44 | 45 | // A class for enumerating a directory without using diropen/readdir or other 46 | // functions which may allocate memory. 47 | class DirectoryReader { 48 | public: 49 | DirectoryReader(int fd) 50 | : fd_(fd), 51 | buf_used_(0) { 52 | } 53 | 54 | // Return the next entry from the directory 55 | // name: (output) the NUL terminated entry name 56 | // 57 | // Returns true iff successful (false on EOF). 58 | // 59 | // After calling this, one must call |PopEntry| otherwise you'll get the same 60 | // entry over and over. 61 | bool GetNextEntry(const char** name) { 62 | struct kernel_dirent* const dent = 63 | reinterpret_cast(buf_); 64 | 65 | if (buf_used_ == 0) { 66 | // need to read more entries. 67 | const int n = sys_getdents(fd_, dent, sizeof(buf_)); 68 | if (n < 0) { 69 | return false; 70 | } else if (n == 0) { 71 | hit_eof_ = true; 72 | } else { 73 | buf_used_ += n; 74 | } 75 | } 76 | 77 | if (buf_used_ == 0 && hit_eof_) 78 | return false; 79 | 80 | assert(buf_used_ > 0); 81 | 82 | *name = dent->d_name; 83 | return true; 84 | } 85 | 86 | void PopEntry() { 87 | if (!buf_used_) 88 | return; 89 | 90 | const struct kernel_dirent* const dent = 91 | reinterpret_cast(buf_); 92 | 93 | buf_used_ -= dent->d_reclen; 94 | my_memmove(buf_, buf_ + dent->d_reclen, buf_used_); 95 | } 96 | 97 | private: 98 | const int fd_; 99 | bool hit_eof_; 100 | unsigned buf_used_; 101 | uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1]; 102 | }; 103 | 104 | } // namespace google_breakpad 105 | 106 | #endif // CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_ 107 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/minidump_writer/minidump_writer_unittest_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // minidump_writer_unittest_utils.h: 31 | // Shared routines used by unittests under client/linux/minidump_writer. 32 | 33 | #ifndef CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_UNITTEST_UTILS_H_ 34 | #define CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_UNITTEST_UTILS_H_ 35 | 36 | #include 37 | 38 | #include "common/using_std_string.h" 39 | 40 | namespace google_breakpad { 41 | 42 | // Returns the full path to linux_dumper_unittest_helper. The full path is 43 | // discovered either by using the environment variable "bindir" or by using 44 | // the location of the main module of the currently running process. 45 | string GetHelperBinary(); 46 | 47 | } // namespace google_breakpad 48 | 49 | #endif // CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_UNITTEST_UTILS_H_ 50 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/minidump_file_writer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // minidump_file_writer-inl.h: Minidump file writer implementation. 31 | // 32 | // See minidump_file_writer.h for documentation. 33 | 34 | #ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__ 35 | #define CLIENT_MINIDUMP_FILE_WRITER_INL_H__ 36 | 37 | #include 38 | 39 | #include "client/minidump_file_writer.h" 40 | #include "google_breakpad/common/minidump_size.h" 41 | 42 | namespace google_breakpad { 43 | 44 | template 45 | inline bool TypedMDRVA::Allocate() { 46 | allocation_state_ = SINGLE_OBJECT; 47 | return UntypedMDRVA::Allocate(minidump_size::size()); 48 | } 49 | 50 | template 51 | inline bool TypedMDRVA::Allocate(size_t additional) { 52 | allocation_state_ = SINGLE_OBJECT; 53 | return UntypedMDRVA::Allocate(minidump_size::size() + additional); 54 | } 55 | 56 | template 57 | inline bool TypedMDRVA::AllocateArray(size_t count) { 58 | assert(count); 59 | allocation_state_ = ARRAY; 60 | return UntypedMDRVA::Allocate(minidump_size::size() * count); 61 | } 62 | 63 | template 64 | inline bool TypedMDRVA::AllocateObjectAndArray(size_t count, 65 | size_t length) { 66 | assert(count && length); 67 | allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; 68 | return UntypedMDRVA::Allocate(minidump_size::size() + count * length); 69 | } 70 | 71 | template 72 | inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { 73 | assert(allocation_state_ == ARRAY); 74 | return writer_->Copy( 75 | static_cast(position_ + index * minidump_size::size()), 76 | item, minidump_size::size()); 77 | } 78 | 79 | template 80 | inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, 81 | const void *src, 82 | size_t length) { 83 | assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); 84 | return writer_->Copy( 85 | static_cast(position_ + minidump_size::size() 86 | + index * length), 87 | src, length); 88 | } 89 | 90 | template 91 | inline bool TypedMDRVA::Flush() { 92 | return writer_->Copy(position_, &data_, minidump_size::size()); 93 | } 94 | 95 | } // namespace google_breakpad 96 | 97 | #endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__ 98 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/link.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H 31 | #define GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H 32 | 33 | /* Android doesn't provide all the data-structures required in its . 34 | Provide custom version here. */ 35 | #include_next 36 | 37 | // TODO(rmcilroy): Remove this file once the ndk is updated for other 38 | // architectures - crbug.com/358831 39 | #if !defined(__aarch64__) && !defined(__x86_64__) && \ 40 | !(defined(__mips__) && _MIPS_SIM == _ABI64) 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif // __cplusplus 45 | 46 | struct r_debug { 47 | int r_version; 48 | struct link_map* r_map; 49 | ElfW(Addr) r_brk; 50 | enum { 51 | RT_CONSISTENT, 52 | RT_ADD, 53 | RT_DELETE } r_state; 54 | ElfW(Addr) r_ldbase; 55 | }; 56 | 57 | struct link_map { 58 | ElfW(Addr) l_addr; 59 | char* l_name; 60 | ElfW(Dyn)* l_ld; 61 | struct link_map* l_next; 62 | struct link_map* l_prev; 63 | }; 64 | 65 | #ifdef __cplusplus 66 | } // extern "C" 67 | #endif // __cplusplus 68 | 69 | #endif // !defined(__aarch64__) && !defined(__x86_64__) 70 | 71 | #endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */ 72 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/sgidefs.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H 31 | #define GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H 32 | 33 | #ifdef __mips__ 34 | 35 | // Android doesn't contain sgidefs.h, but does have which 36 | // contains what we need. 37 | #include 38 | 39 | #endif // __mips__ 40 | 41 | #endif // GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H 42 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/stab.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H 31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H 32 | 33 | #include 34 | 35 | #ifdef __BIONIC_HAVE_STAB_H 36 | #include 37 | #else 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif // __cplusplus 42 | 43 | #define _STAB_CODE_LIST \ 44 | _STAB_CODE_DEF(UNDF,0x00) \ 45 | _STAB_CODE_DEF(GSYM,0x20) \ 46 | _STAB_CODE_DEF(FNAME,0x22) \ 47 | _STAB_CODE_DEF(FUN,0x24) \ 48 | _STAB_CODE_DEF(STSYM,0x26) \ 49 | _STAB_CODE_DEF(LCSYM,0x28) \ 50 | _STAB_CODE_DEF(MAIN,0x2a) \ 51 | _STAB_CODE_DEF(PC,0x30) \ 52 | _STAB_CODE_DEF(NSYMS,0x32) \ 53 | _STAB_CODE_DEF(NOMAP,0x34) \ 54 | _STAB_CODE_DEF(OBJ,0x38) \ 55 | _STAB_CODE_DEF(OPT,0x3c) \ 56 | _STAB_CODE_DEF(RSYM,0x40) \ 57 | _STAB_CODE_DEF(M2C,0x42) \ 58 | _STAB_CODE_DEF(SLINE,0x44) \ 59 | _STAB_CODE_DEF(DSLINE,0x46) \ 60 | _STAB_CODE_DEF(BSLINE,0x48) \ 61 | _STAB_CODE_DEF(BROWS,0x48) \ 62 | _STAB_CODE_DEF(DEFD,0x4a) \ 63 | _STAB_CODE_DEF(EHDECL,0x50) \ 64 | _STAB_CODE_DEF(MOD2,0x50) \ 65 | _STAB_CODE_DEF(CATCH,0x54) \ 66 | _STAB_CODE_DEF(SSYM,0x60) \ 67 | _STAB_CODE_DEF(SO,0x64) \ 68 | _STAB_CODE_DEF(LSYM,0x80) \ 69 | _STAB_CODE_DEF(BINCL,0x82) \ 70 | _STAB_CODE_DEF(SOL,0x84) \ 71 | _STAB_CODE_DEF(PSYM,0xa0) \ 72 | _STAB_CODE_DEF(EINCL,0xa2) \ 73 | _STAB_CODE_DEF(ENTRY,0xa4) \ 74 | _STAB_CODE_DEF(LBRAC,0xc0) \ 75 | _STAB_CODE_DEF(EXCL,0xc2) \ 76 | _STAB_CODE_DEF(SCOPE,0xc4) \ 77 | _STAB_CODE_DEF(RBRAC,0xe0) \ 78 | _STAB_CODE_DEF(BCOMM,0xe2) \ 79 | _STAB_CODE_DEF(ECOMM,0xe4) \ 80 | _STAB_CODE_DEF(ECOML,0xe8) \ 81 | _STAB_CODE_DEF(NBTEXT,0xf0) \ 82 | _STAB_CODE_DEF(NBDATA,0xf2) \ 83 | _STAB_CODE_DEF(NBBSS,0xf4) \ 84 | _STAB_CODE_DEF(NBSTS,0xf6) \ 85 | _STAB_CODE_DEF(NBLCS,0xf8) \ 86 | _STAB_CODE_DEF(LENG,0xfe) 87 | 88 | enum __stab_debug_code { 89 | #define _STAB_CODE_DEF(x,y) N_##x = y, 90 | _STAB_CODE_LIST 91 | #undef _STAB_CODE_DEF 92 | }; 93 | 94 | #ifdef __cplusplus 95 | } // extern "C" 96 | #endif // __cplusplus 97 | 98 | #endif // __BIONIC_HAVE_STAB_H 99 | 100 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H 101 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/sys/signal.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H 31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H 32 | 33 | #include 34 | 35 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H 36 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/sys/user.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H 31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H 32 | 33 | // The purpose of this file is to glue the mismatching headers (Android NDK vs 34 | // glibc) and therefore avoid doing otherwise awkward #ifdefs in the code. 35 | // The following quirks are currently handled by this file: 36 | // - i386: Use the Android NDK but alias user_fxsr_struct > user_fpxregs_struct. 37 | // - aarch64: 38 | // - NDK r10: Add missing user_regs_struct and user_fpsimd_struct structs. 39 | // - NDK r11+: Add missing include 40 | // - Other platforms: Just use the Android NDK unchanged. 41 | 42 | // TODO(primiano): remove these changes after Chromium has stably rolled to 43 | // an NDK with the appropriate fixes. 44 | 45 | #if defined(ANDROID_NDK_MAJOR_VERSION) && ANDROID_NDK_MAJOR_VERSION > 10 46 | #ifdef __aarch64__ 47 | #include 48 | #endif // __aarch64__ 49 | #endif // defined(ANDROID_NDK_MAJOR_VERSION) && ANDROID_NDK_MAJOR_VERSION > 10 50 | 51 | #include_next 52 | 53 | #ifdef __i386__ 54 | #ifdef __cplusplus 55 | extern "C" { 56 | #endif // __cplusplus 57 | typedef struct user_fxsr_struct user_fpxregs_struct; 58 | #ifdef __cplusplus 59 | } // extern "C" 60 | #endif // __cplusplus 61 | #endif // __i386__ 62 | 63 | #if !defined(ANDROID_NDK_MAJOR_VERSION) || ANDROID_NDK_MAJOR_VERSION == 10 64 | #ifdef __aarch64__ 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif // __cplusplus 68 | struct user_regs_struct { 69 | __u64 regs[31]; 70 | __u64 sp; 71 | __u64 pc; 72 | __u64 pstate; 73 | }; 74 | struct user_fpsimd_struct { 75 | __uint128_t vregs[32]; 76 | __u32 fpsr; 77 | __u32 fpcr; 78 | }; 79 | #ifdef __cplusplus 80 | } // extern "C" 81 | #endif // __cplusplus 82 | #endif // __aarch64__ 83 | #endif // defined(ANDROID_NDK_VERSION) && ANDROID_NDK_MAJOR_VERSION == 10 84 | 85 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H 86 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/ucontext.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H 31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H 32 | 33 | #include 34 | 35 | #ifdef __BIONIC_UCONTEXT_H 36 | #include 37 | #else 38 | 39 | #include 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif // __cplusplus 44 | 45 | // Provided by src/android/common/breakpad_getcontext.S 46 | int breakpad_getcontext(ucontext_t* ucp); 47 | 48 | #define getcontext(x) breakpad_getcontext(x) 49 | 50 | #ifdef __cplusplus 51 | } // extern "C" 52 | #endif // __cplusplus 53 | 54 | #endif // __BIONIC_UCONTEXT_H 55 | 56 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H 57 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/basictypes.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef COMMON_BASICTYPES_H_ 31 | #define COMMON_BASICTYPES_H_ 32 | 33 | // A macro to disallow the copy constructor and operator= functions 34 | // This should be used in the private: declarations for a class 35 | #ifndef DISALLOW_COPY_AND_ASSIGN 36 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ 37 | TypeName(const TypeName&); \ 38 | void operator=(const TypeName&) 39 | #endif // DISALLOW_COPY_AND_ASSIGN 40 | 41 | namespace google_breakpad { 42 | 43 | // Used to explicitly mark the return value of a function as unused. If you are 44 | // really sure you don't want to do anything with the return value of a function 45 | // that has been marked with __attribute__((warn_unused_result)), wrap it with 46 | // this. Example: 47 | // 48 | // scoped_ptr my_var = ...; 49 | // if (TakeOwnership(my_var.get()) == SUCCESS) 50 | // ignore_result(my_var.release()); 51 | // 52 | template 53 | inline void ignore_result(const T&) { 54 | } 55 | 56 | } // namespace google_breakpad 57 | 58 | #endif // COMMON_BASICTYPES_H_ 59 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/crc32.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef COMMON_LINUX_CRC32_H_ 31 | #define COMMON_LINUX_CRC32_H_ 32 | 33 | #include 34 | 35 | #include 36 | 37 | namespace google_breakpad { 38 | 39 | // Updates a CRC32 checksum with |len| bytes from |buf|. |initial| holds the 40 | // checksum result from the previous update; for the first call, it should be 0. 41 | uint32_t UpdateCrc32(uint32_t initial, const void* buf, size_t len); 42 | 43 | // Computes a CRC32 checksum using |len| bytes from |buf|. 44 | inline uint32_t ComputeCrc32(const void* buf, size_t len) { 45 | return UpdateCrc32(0, buf, len); 46 | } 47 | inline uint32_t ComputeCrc32(const std::string& str) { 48 | return ComputeCrc32(str.c_str(), str.size()); 49 | } 50 | 51 | } // namespace google_breakpad 52 | 53 | #endif // COMMON_LINUX_CRC32_H_ 54 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/dump_symbols.h: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | 3 | // Copyright (c) 2011, Google Inc. 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are 8 | // met: 9 | // 10 | // * Redistributions of source code must retain the above copyright 11 | // notice, this list of conditions and the following disclaimer. 12 | // * Redistributions in binary form must reproduce the above 13 | // copyright notice, this list of conditions and the following disclaimer 14 | // in the documentation and/or other materials provided with the 15 | // distribution. 16 | // * Neither the name of Google Inc. nor the names of its 17 | // contributors may be used to endorse or promote products derived from 18 | // this software without specific prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | // dump_symbols.h: Read debugging information from an ELF file, and write 33 | // it out as a Breakpad symbol file. 34 | 35 | #ifndef COMMON_LINUX_DUMP_SYMBOLS_H__ 36 | #define COMMON_LINUX_DUMP_SYMBOLS_H__ 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | #include "common/symbol_data.h" 43 | #include "common/using_std_string.h" 44 | 45 | namespace google_breakpad { 46 | 47 | class Module; 48 | 49 | struct DumpOptions { 50 | DumpOptions(SymbolData symbol_data, bool handle_inter_cu_refs) 51 | : symbol_data(symbol_data), 52 | handle_inter_cu_refs(handle_inter_cu_refs) { 53 | } 54 | 55 | SymbolData symbol_data; 56 | bool handle_inter_cu_refs; 57 | }; 58 | 59 | // Find all the debugging information in OBJ_FILE, an ELF executable 60 | // or shared library, and write it to SYM_STREAM in the Breakpad symbol 61 | // file format. 62 | // If OBJ_FILE has been stripped but contains a .gnu_debuglink section, 63 | // then look for the debug file in DEBUG_DIRS. 64 | // SYMBOL_DATA allows limiting the type of symbol data written. 65 | bool WriteSymbolFile(const string &obj_file, 66 | const std::vector& debug_dirs, 67 | const DumpOptions& options, 68 | std::ostream &sym_stream); 69 | 70 | // Read the selected object file's debugging information, and write out the 71 | // header only to |stream|. Return true on success; if an error occurs, report 72 | // it and return false. 73 | bool WriteSymbolFileHeader(const string& obj_file, 74 | std::ostream &sym_stream); 75 | 76 | // As above, but simply return the debugging information in MODULE 77 | // instead of writing it to a stream. The caller owns the resulting 78 | // Module object and must delete it when finished. 79 | bool ReadSymbolData(const string& obj_file, 80 | const std::vector& debug_dirs, 81 | const DumpOptions& options, 82 | Module** module); 83 | 84 | } // namespace google_breakpad 85 | 86 | #endif // COMMON_LINUX_DUMP_SYMBOLS_H__ 87 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/eintr_wrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef COMMON_LINUX_EINTR_WRAPPER_H_ 31 | #define COMMON_LINUX_EINTR_WRAPPER_H_ 32 | 33 | #include 34 | 35 | // This provides a wrapper around system calls which may be interrupted by a 36 | // signal and return EINTR. See man 7 signal. 37 | // 38 | 39 | #define HANDLE_EINTR(x) ({ \ 40 | __typeof__(x) eintr_wrapper_result; \ 41 | do { \ 42 | eintr_wrapper_result = (x); \ 43 | } while (eintr_wrapper_result == -1 && errno == EINTR); \ 44 | eintr_wrapper_result; \ 45 | }) 46 | 47 | #define IGNORE_EINTR(x) ({ \ 48 | __typeof__(x) eintr_wrapper_result; \ 49 | do { \ 50 | eintr_wrapper_result = (x); \ 51 | if (eintr_wrapper_result == -1 && errno == EINTR) { \ 52 | eintr_wrapper_result = 0; \ 53 | } \ 54 | } while (0); \ 55 | eintr_wrapper_result; \ 56 | }) 57 | 58 | #endif // COMMON_LINUX_EINTR_WRAPPER_H_ 59 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/elf_gnu_compat.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C++ -*- 2 | 3 | // Copyright (c) 2013, Google Inc. 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are 8 | // met: 9 | // 10 | // * Redistributions of source code must retain the above copyright 11 | // notice, this list of conditions and the following disclaimer. 12 | // * Redistributions in binary form must reproduce the above 13 | // copyright notice, this list of conditions and the following disclaimer 14 | // in the documentation and/or other materials provided with the 15 | // distribution. 16 | // * Neither the name of Google Inc. nor the names of its 17 | // contributors may be used to endorse or promote products derived from 18 | // this software without specific prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | // Original author: Lei Zhang 33 | 34 | // elf_gnu_compat.h: #defines unique to glibc's elf.h. 35 | 36 | #ifndef COMMON_LINUX_ELF_GNU_COMPAT_H_ 37 | #define COMMON_LINUX_ELF_GNU_COMPAT_H_ 38 | 39 | #include 40 | 41 | // A note type on GNU systems corresponding to the .note.gnu.build-id section. 42 | #ifndef NT_GNU_BUILD_ID 43 | #define NT_GNU_BUILD_ID 3 44 | #endif 45 | 46 | #endif // COMMON_LINUX_ELF_GNU_COMPAT_H_ 47 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/elf_symbols_to_module.h: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | 3 | // Copyright (c) 2011 Google Inc. All Rights Reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Original author: Ted Mielczarek 32 | 33 | // elf_symbols_to_module.h: Exposes ELFSymbolsToModule, a function 34 | // for reading ELF symbol tables and inserting exported symbol names 35 | // into a google_breakpad::Module as Extern definitions. 36 | 37 | #ifndef BREAKPAD_COMMON_LINUX_ELF_SYMBOLS_TO_MODULE_H_ 38 | #define BREAKPAD_COMMON_LINUX_ELF_SYMBOLS_TO_MODULE_H_ 39 | 40 | #include 41 | #include 42 | 43 | namespace google_breakpad { 44 | 45 | class Module; 46 | 47 | bool ELFSymbolsToModule(const uint8_t *symtab_section, 48 | size_t symtab_size, 49 | const uint8_t *string_section, 50 | size_t string_size, 51 | const bool big_endian, 52 | size_t value_size, 53 | Module *module); 54 | 55 | } // namespace google_breakpad 56 | 57 | 58 | #endif // BREAKPAD_COMMON_LINUX_ELF_SYMBOLS_TO_MODULE_H_ 59 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/elfutils-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef COMMON_LINUX_ELFUTILS_INL_H__ 31 | #define COMMON_LINUX_ELFUTILS_INL_H__ 32 | 33 | #include "common/linux/linux_libc_support.h" 34 | #include "elfutils.h" 35 | 36 | namespace google_breakpad { 37 | 38 | template 39 | const T* GetOffset(const typename ElfClass::Ehdr* elf_header, 40 | typename ElfClass::Off offset) { 41 | return reinterpret_cast(reinterpret_cast(elf_header) + 42 | offset); 43 | } 44 | 45 | template 46 | const typename ElfClass::Shdr* FindElfSectionByName( 47 | const char* name, 48 | typename ElfClass::Word section_type, 49 | const typename ElfClass::Shdr* sections, 50 | const char* section_names, 51 | const char* names_end, 52 | int nsection) { 53 | assert(name != NULL); 54 | assert(sections != NULL); 55 | assert(nsection > 0); 56 | 57 | int name_len = my_strlen(name); 58 | if (name_len == 0) 59 | return NULL; 60 | 61 | for (int i = 0; i < nsection; ++i) { 62 | const char* section_name = section_names + sections[i].sh_name; 63 | if (sections[i].sh_type == section_type && 64 | names_end - section_name >= name_len + 1 && 65 | my_strcmp(name, section_name) == 0) { 66 | return sections + i; 67 | } 68 | } 69 | return NULL; 70 | } 71 | 72 | } // namespace google_breakpad 73 | 74 | #endif // COMMON_LINUX_ELFUTILS_INL_H__ 75 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/file_id.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // file_id.h: Return a unique identifier for a file 31 | // 32 | 33 | #ifndef COMMON_LINUX_FILE_ID_H__ 34 | #define COMMON_LINUX_FILE_ID_H__ 35 | 36 | #include 37 | #include 38 | 39 | #include "common/linux/guid_creator.h" 40 | #include "common/memory.h" 41 | #include "common/using_std_string.h" 42 | 43 | namespace google_breakpad { 44 | 45 | // GNU binutils' ld defaults to 'sha1', which is 160 bits == 20 bytes, 46 | // so this is enough to fit that, which most binaries will use. 47 | // This is just a sensible default for auto_wasteful_vector so most 48 | // callers can get away with stack allocation. 49 | static const size_t kDefaultBuildIdSize = 20; 50 | 51 | class FileID { 52 | public: 53 | explicit FileID(const char* path); 54 | ~FileID() {} 55 | 56 | // Load the identifier for the elf file path specified in the constructor into 57 | // |identifier|. 58 | // 59 | // The current implementation will look for a .note.gnu.build-id 60 | // section and use that as the file id, otherwise it falls back to 61 | // XORing the first 4096 bytes of the .text section to generate an identifier. 62 | bool ElfFileIdentifier(wasteful_vector& identifier); 63 | 64 | // Load the identifier for the elf file mapped into memory at |base| into 65 | // |identifier|. Return false if the identifier could not be created for this 66 | // file. 67 | static bool ElfFileIdentifierFromMappedFile( 68 | const void* base, 69 | wasteful_vector& identifier); 70 | 71 | // Convert the |identifier| data to a string. The string will 72 | // be formatted as a UUID in all uppercase without dashes. 73 | // (e.g., 22F065BBFC9C49F780FE26A7CEBD7BCE). 74 | static string ConvertIdentifierToUUIDString( 75 | const wasteful_vector& identifier); 76 | 77 | // Convert the entire |identifier| data to a hex string. 78 | static string ConvertIdentifierToString( 79 | const wasteful_vector& identifier); 80 | 81 | private: 82 | // Storage for the path specified 83 | string path_; 84 | }; 85 | 86 | } // namespace google_breakpad 87 | 88 | #endif // COMMON_LINUX_FILE_ID_H__ 89 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/guid_creator.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef COMMON_LINUX_GUID_CREATOR_H__ 31 | #define COMMON_LINUX_GUID_CREATOR_H__ 32 | 33 | #include "google_breakpad/common/minidump_format.h" 34 | 35 | typedef MDGUID GUID; 36 | 37 | // Format string for parsing GUID. 38 | #define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x" 39 | // Length of GUID string. Don't count the ending '\0'. 40 | #define kGUIDStringLength 36 41 | 42 | // Create a guid. 43 | bool CreateGUID(GUID *guid); 44 | 45 | // Get the string from guid. 46 | bool GUIDToString(const GUID *guid, char *buf, int buf_len); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/ignore_ret.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef COMMON_LINUX_IGNORE_RET_H_ 31 | #define COMMON_LINUX_IGNORE_RET_H_ 32 | 33 | // Some compilers are prone to warn about unused return values. In cases where 34 | // either a) the call cannot fail, or b) there is nothing that can be done when 35 | // the call fails, IGNORE_RET() can be used to mark the return code as ignored. 36 | // This avoids spurious compiler warnings. 37 | 38 | #define IGNORE_RET(x) do { if (x) {} } while (0) 39 | 40 | #endif // COMMON_LINUX_IGNORE_RET_H_ 41 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/libcurl_wrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A wrapper for libcurl to do HTTP Uploads, to support easy mocking 31 | // and unit testing of the HTTPUpload class. 32 | 33 | #ifndef COMMON_LINUX_LIBCURL_WRAPPER_H_ 34 | #define COMMON_LINUX_LIBCURL_WRAPPER_H_ 35 | 36 | #include 37 | #include 38 | 39 | #include "common/using_std_string.h" 40 | #include "third_party/curl/curl.h" 41 | 42 | namespace google_breakpad { 43 | class LibcurlWrapper { 44 | public: 45 | LibcurlWrapper(); 46 | virtual ~LibcurlWrapper(); 47 | virtual bool Init(); 48 | virtual bool SetProxy(const string& proxy_host, 49 | const string& proxy_userpwd); 50 | virtual bool AddFile(const string& upload_file_path, 51 | const string& basename); 52 | virtual bool SendRequest(const string& url, 53 | const std::map& parameters, 54 | int* http_status_code, 55 | string* http_header_data, 56 | string* http_response_data); 57 | private: 58 | // This function initializes class state corresponding to function 59 | // pointers into the CURL library. 60 | bool SetFunctionPointers(); 61 | 62 | bool init_ok_; // Whether init succeeded 63 | void* curl_lib_; // Pointer to result of dlopen() on 64 | // curl library 65 | string last_curl_error_; // The text of the last error when 66 | // dealing 67 | // with CURL. 68 | 69 | CURL *curl_; // Pointer for handle for CURL calls. 70 | 71 | CURL* (*easy_init_)(void); 72 | 73 | // Stateful pointers for calling into curl_formadd() 74 | struct curl_httppost *formpost_; 75 | struct curl_httppost *lastptr_; 76 | struct curl_slist *headerlist_; 77 | 78 | // Function pointers into CURL library 79 | CURLcode (*easy_setopt_)(CURL *, CURLoption, ...); 80 | CURLFORMcode (*formadd_)(struct curl_httppost **, 81 | struct curl_httppost **, ...); 82 | struct curl_slist* (*slist_append_)(struct curl_slist *, const char *); 83 | void (*slist_free_all_)(struct curl_slist *); 84 | CURLcode (*easy_perform_)(CURL *); 85 | const char* (*easy_strerror_)(CURLcode); 86 | void (*easy_cleanup_)(CURL *); 87 | CURLcode (*easy_getinfo_)(CURL *, CURLINFO info, ...); 88 | void (*formfree_)(struct curl_httppost *); 89 | 90 | }; 91 | } 92 | 93 | #endif // COMMON_LINUX_LIBCURL_WRAPPER_H_ 94 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/linux_libc_support.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // This header provides replacements for libc functions that we need. We if 31 | // call the libc functions directly we risk crashing in the dynamic linker as 32 | // it tries to resolve uncached PLT entries. 33 | 34 | #ifndef CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ 35 | #define CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ 36 | 37 | #include 38 | #include 39 | #include 40 | 41 | extern "C" { 42 | 43 | extern size_t my_strlen(const char* s); 44 | 45 | extern int my_strcmp(const char* a, const char* b); 46 | 47 | extern int my_strncmp(const char* a, const char* b, size_t len); 48 | 49 | // Parse a non-negative integer. 50 | // result: (output) the resulting non-negative integer 51 | // s: a NUL terminated string 52 | // Return true iff successful. 53 | extern bool my_strtoui(int* result, const char* s); 54 | 55 | // Return the length of the given unsigned integer when expressed in base 10. 56 | extern unsigned my_uint_len(uintmax_t i); 57 | 58 | // Convert an unsigned integer to a string 59 | // output: (output) the resulting string is written here. This buffer must be 60 | // large enough to hold the resulting string. Call |my_uint_len| to get the 61 | // required length. 62 | // i: the unsigned integer to serialise. 63 | // i_len: the length of the integer in base 10 (see |my_uint_len|). 64 | extern void my_uitos(char* output, uintmax_t i, unsigned i_len); 65 | 66 | extern const char* my_strchr(const char* haystack, char needle); 67 | 68 | extern const char* my_strrchr(const char* haystack, char needle); 69 | 70 | // Read a hex value 71 | // result: (output) the resulting value 72 | // s: a string 73 | // Returns a pointer to the first invalid charactor. 74 | extern const char* my_read_hex_ptr(uintptr_t* result, const char* s); 75 | 76 | extern const char* my_read_decimal_ptr(uintptr_t* result, const char* s); 77 | 78 | extern void my_memset(void* ip, char c, size_t len); 79 | 80 | extern void* my_memchr(const void* src, int c, size_t len); 81 | 82 | // The following are considered safe to use in a compromised environment. 83 | // Besides, this gives the compiler an opportunity to optimize their calls. 84 | #define my_memcpy memcpy 85 | #define my_memmove memmove 86 | #define my_memcmp memcmp 87 | 88 | extern size_t my_strlcpy(char* s1, const char* s2, size_t len); 89 | 90 | extern size_t my_strlcat(char* s1, const char* s2, size_t len); 91 | 92 | extern int my_isspace(int ch); 93 | 94 | } // extern "C" 95 | 96 | #endif // CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ 97 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/memory_mapped_file.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // memory_mapped_file.h: Define the google_breakpad::MemoryMappedFile 31 | // class, which maps a file into memory for read-only access. 32 | 33 | #ifndef COMMON_LINUX_MEMORY_MAPPED_FILE_H_ 34 | #define COMMON_LINUX_MEMORY_MAPPED_FILE_H_ 35 | 36 | #include 37 | #include "common/basictypes.h" 38 | #include "common/memory_range.h" 39 | 40 | namespace google_breakpad { 41 | 42 | // A utility class for mapping a file into memory for read-only access of 43 | // the file content. Its implementation avoids calling into libc functions 44 | // by directly making system calls for open, close, mmap, and munmap. 45 | class MemoryMappedFile { 46 | public: 47 | MemoryMappedFile(); 48 | 49 | // Constructor that calls Map() to map a file at |path| into memory. 50 | // If Map() fails, the object behaves as if it is default constructed. 51 | MemoryMappedFile(const char* path, size_t offset); 52 | 53 | ~MemoryMappedFile(); 54 | 55 | // Maps a file at |path| into memory, which can then be accessed via 56 | // content() as a MemoryRange object or via data(), and returns true on 57 | // success. Mapping an empty file will succeed but with data() and size() 58 | // returning NULL and 0, respectively. An existing mapping is unmapped 59 | // before a new mapping is created. 60 | bool Map(const char* path, size_t offset); 61 | 62 | // Unmaps the memory for the mapped file. It's a no-op if no file is 63 | // mapped. 64 | void Unmap(); 65 | 66 | // Returns a MemoryRange object that covers the memory for the mapped 67 | // file. The MemoryRange object is empty if no file is mapped. 68 | const MemoryRange& content() const { return content_; } 69 | 70 | // Returns a pointer to the beginning of the memory for the mapped file. 71 | // or NULL if no file is mapped or the mapped file is empty. 72 | const void* data() const { return content_.data(); } 73 | 74 | // Returns the size in bytes of the mapped file, or zero if no file 75 | // is mapped. 76 | size_t size() const { return content_.length(); } 77 | 78 | private: 79 | // Mapped file content as a MemoryRange object. 80 | MemoryRange content_; 81 | 82 | DISALLOW_COPY_AND_ASSIGN(MemoryMappedFile); 83 | }; 84 | 85 | } // namespace google_breakpad 86 | 87 | #endif // COMMON_LINUX_MEMORY_MAPPED_FILE_H_ 88 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/safe_readlink.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // safe_readlink.h: Define the google_breakpad::SafeReadLink function, 31 | // which wraps sys_readlink and gurantees the result is NULL-terminated. 32 | 33 | #ifndef COMMON_LINUX_SAFE_READLINK_H_ 34 | #define COMMON_LINUX_SAFE_READLINK_H_ 35 | 36 | #include 37 | 38 | namespace google_breakpad { 39 | 40 | // This function wraps sys_readlink() and performs the same functionalty, 41 | // but guarantees |buffer| is NULL-terminated if sys_readlink() returns 42 | // no error. It takes the same arguments as sys_readlink(), but unlike 43 | // sys_readlink(), it returns true on success. 44 | // 45 | // |buffer_size| specifies the size of |buffer| in bytes. As this function 46 | // always NULL-terminates |buffer| on success, |buffer_size| should be 47 | // at least one byte longer than the expected path length (e.g. PATH_MAX, 48 | // which is typically defined as the maximum length of a path name 49 | // including the NULL byte). 50 | // 51 | // The implementation of this function calls sys_readlink() instead of 52 | // readlink(), it can thus be used in the context where calling to libc 53 | // functions is discouraged. 54 | bool SafeReadLink(const char* path, char* buffer, size_t buffer_size); 55 | 56 | // Same as the three-argument version of SafeReadLink() but deduces the 57 | // size of |buffer| if it is a char array of known size. 58 | template 59 | bool SafeReadLink(const char* path, char (&buffer)[N]) { 60 | return SafeReadLink(path, buffer, sizeof(buffer)); 61 | } 62 | 63 | } // namespace google_breakpad 64 | 65 | #endif // COMMON_LINUX_SAFE_READLINK_H_ 66 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/symbol_upload.h: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | 3 | // Copyright (c) 2011 Google Inc. 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are 8 | // met: 9 | // 10 | // * Redistributions of source code must retain the above copyright 11 | // notice, this list of conditions and the following disclaimer. 12 | // * Redistributions in binary form must reproduce the above 13 | // copyright notice, this list of conditions and the following disclaimer 14 | // in the documentation and/or other materials provided with the 15 | // distribution. 16 | // * Neither the name of Google Inc. nor the names of its 17 | // contributors may be used to endorse or promote products derived from 18 | // this software without specific prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | // symbol_upload.h: helper functions for linux symbol upload tool. 33 | 34 | #ifndef COMMON_LINUX_SYMBOL_UPLOAD_H_ 35 | #define COMMON_LINUX_SYMBOL_UPLOAD_H_ 36 | 37 | #include 38 | 39 | #include "common/using_std_string.h" 40 | 41 | namespace google_breakpad { 42 | namespace sym_upload { 43 | 44 | typedef struct { 45 | string symbolsPath; 46 | string uploadURLStr; 47 | string proxy; 48 | string proxy_user_pwd; 49 | string version; 50 | bool success; 51 | } Options; 52 | 53 | // Starts upload to symbol server with options. 54 | void Start(Options* options); 55 | 56 | } // namespace sym_upload 57 | } // namespace google_breakpad 58 | 59 | #endif // COMMON_LINUX_SYMBOL_UPLOAD_H_ 60 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/md5.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007 Google Inc. All Rights Reserved. 2 | // Author: liuli@google.com (Liu Li) 3 | #ifndef COMMON_MD5_H__ 4 | #define COMMON_MD5_H__ 5 | 6 | #include 7 | 8 | namespace google_breakpad { 9 | 10 | typedef uint32_t u32; 11 | typedef uint8_t u8; 12 | 13 | struct MD5Context { 14 | u32 buf[4]; 15 | u32 bits[2]; 16 | u8 in[64]; 17 | }; 18 | 19 | void MD5Init(struct MD5Context *ctx); 20 | 21 | void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len); 22 | 23 | void MD5Final(unsigned char digest[16], struct MD5Context *ctx); 24 | 25 | } // namespace google_breakpad 26 | 27 | #endif // COMMON_MD5_H__ 28 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/minidump_type_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_TYPE_HELPER_H_ 31 | #define GOOGLE_BREAKPAD_COMMON_MINIDUMP_TYPE_HELPER_H_ 32 | 33 | #include 34 | 35 | #include "google_breakpad/common/minidump_format.h" 36 | 37 | namespace google_breakpad { 38 | 39 | template 40 | struct MDTypeHelper; 41 | 42 | template <> 43 | struct MDTypeHelper { 44 | typedef MDRawDebug32 MDRawDebug; 45 | typedef MDRawLinkMap32 MDRawLinkMap; 46 | }; 47 | 48 | template <> 49 | struct MDTypeHelper { 50 | typedef MDRawDebug64 MDRawDebug; 51 | typedef MDRawLinkMap64 MDRawLinkMap; 52 | }; 53 | 54 | } // namespace google_breakpad 55 | 56 | #endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_TYPE_HELPER_H_ 57 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/stdio_wrapper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_COMMON_STDIO_WRAPPER_H 31 | #define GOOGLE_BREAKPAD_COMMON_STDIO_WRAPPER_H 32 | 33 | #include 34 | 35 | #if defined(_MSC_VER) && MSC_VER < 1900 36 | #include 37 | 38 | #define snprintf _snprintf 39 | typedef SSIZE_T ssize_t; 40 | #endif 41 | 42 | 43 | #endif // GOOGLE_BREAKPAD_COMMON_STDIO_WRAPPER_H 44 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/string_conversion.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // string_conversion.h: Conversion between different UTF-8/16/32 encodings. 31 | 32 | #ifndef COMMON_STRING_CONVERSION_H__ 33 | #define COMMON_STRING_CONVERSION_H__ 34 | 35 | #include 36 | #include 37 | 38 | #include "common/using_std_string.h" 39 | #include "google_breakpad/common/breakpad_types.h" 40 | 41 | namespace google_breakpad { 42 | 43 | using std::vector; 44 | 45 | // Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the 46 | // conversion failed, |out| will be zero length. 47 | void UTF8ToUTF16(const char *in, vector *out); 48 | 49 | // Convert at least one character (up to a maximum of |in_length|) from |in| 50 | // to UTF-16 into |out|. Return the number of characters consumed from |in|. 51 | // Any unused characters in |out| will be initialized to 0. No memory will 52 | // be allocated by this routine. 53 | int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]); 54 | 55 | // Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the 56 | // conversion failed, |out| will be zero length. 57 | void UTF32ToUTF16(const wchar_t *in, vector *out); 58 | 59 | // Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be 60 | // initialized to 0. No memory will be allocated by this routine. 61 | void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]); 62 | 63 | // Convert |in| to UTF-8. If |swap| is true, swap bytes before converting. 64 | string UTF16ToUTF8(const vector &in, bool swap); 65 | 66 | } // namespace google_breakpad 67 | 68 | #endif // COMMON_STRING_CONVERSION_H__ 69 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/symbol_data.h: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | 3 | // Copyright (c) 2013 Google Inc. 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are 8 | // met: 9 | // 10 | // * Redistributions of source code must retain the above copyright 11 | // notice, this list of conditions and the following disclaimer. 12 | // * Redistributions in binary form must reproduce the above 13 | // copyright notice, this list of conditions and the following disclaimer 14 | // in the documentation and/or other materials provided with the 15 | // distribution. 16 | // * Neither the name of Google Inc. nor the names of its 17 | // contributors may be used to endorse or promote products derived from 18 | // this software without specific prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | #ifndef COMMON_SYMBOL_DATA_H_ 33 | #define COMMON_SYMBOL_DATA_H_ 34 | 35 | // Control what data is used from the symbol file. 36 | enum SymbolData { 37 | ALL_SYMBOL_DATA, 38 | NO_CFI, 39 | ONLY_CFI 40 | }; 41 | 42 | #endif // COMMON_SYMBOL_DATA_H_ 43 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/unordered.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Include this file to use unordered_map and unordered_set. If tr1 31 | // or C++11 is not available, you can switch to using hash_set and 32 | // hash_map by defining BP_USE_HASH_SET. 33 | 34 | #ifndef COMMON_UNORDERED_H_ 35 | #define COMMON_UNORDERED_H_ 36 | 37 | #if defined(BP_USE_HASH_SET) 38 | #include 39 | #include 40 | 41 | // For hash. 42 | #include "util/hash/hash.h" 43 | 44 | template > 45 | struct unordered_map : public hash_map {}; 46 | template > 47 | struct unordered_set : public hash_set {}; 48 | 49 | #elif defined(_LIBCPP_VERSION) // c++11 50 | #include 51 | #include 52 | using std::unordered_map; 53 | using std::unordered_set; 54 | 55 | #else // Fallback to tr1::unordered 56 | #include 57 | #include 58 | using std::tr1::unordered_map; 59 | using std::tr1::unordered_set; 60 | #endif 61 | 62 | #endif // COMMON_UNORDERED_H_ 63 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/using_std_string.h: -------------------------------------------------------------------------------- 1 | // -*- mode: C++ -*- 2 | 3 | // Copyright (c) 2012, Google Inc. 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are 8 | // met: 9 | // 10 | // * Redistributions of source code must retain the above copyright 11 | // notice, this list of conditions and the following disclaimer. 12 | // * Redistributions in binary form must reproduce the above 13 | // copyright notice, this list of conditions and the following disclaimer 14 | // in the documentation and/or other materials provided with the 15 | // distribution. 16 | // * Neither the name of Google Inc. nor the names of its 17 | // contributors may be used to endorse or promote products derived from 18 | // this software without specific prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | // Original author: Ivan Penkov 33 | 34 | // using_std_string.h: Allows building this code in environments where 35 | // global string (::string) exists. 36 | // 37 | // The problem: 38 | // ------------- 39 | // Let's say you want to build this code in an environment where a global 40 | // string type is defined (i.e. ::string). Now, let's suppose that ::string 41 | // is different that std::string and you'd like to have the option to easily 42 | // choose between the two string types. Ideally you'd like to control which 43 | // string type is chosen by simply #defining an identifier. 44 | // 45 | // The solution: 46 | // ------------- 47 | // #define HAS_GLOBAL_STRING somewhere in a global header file and then 48 | // globally replace std::string with string. Then include this header 49 | // file everywhere where string is used. If you want to revert back to 50 | // using std::string, simply remove the #define (HAS_GLOBAL_STRING). 51 | 52 | #ifndef THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ 53 | #define THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ 54 | 55 | #ifdef HAS_GLOBAL_STRING 56 | typedef ::string google_breakpad_string; 57 | #else 58 | using std::string; 59 | typedef std::string google_breakpad_string; 60 | #endif 61 | 62 | // Inicates that type google_breakpad_string is defined 63 | #define HAS_GOOGLE_BREAKPAD_STRING 64 | 65 | #endif // THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ 66 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/config.h: -------------------------------------------------------------------------------- 1 | /* src/config.h. Generated from config.h.in by configure. */ 2 | /* src/config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define to 1 if you have the `arc4random' function. */ 5 | /* #undef HAVE_ARC4RANDOM */ 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_A_OUT_H 1 9 | 10 | /* define if the compiler supports basic C++11 syntax */ 11 | /* #undef HAVE_CXX11 */ 12 | 13 | /* Define to 1 if you have the `getrandom' function. */ 14 | /* #undef HAVE_GETRANDOM */ 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_INTTYPES_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_MEMORY_H 1 21 | 22 | /* Define if you have POSIX threads libraries and header files. */ 23 | #define HAVE_PTHREAD 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STDINT_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_STDLIB_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_STRINGS_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_STRING_H 1 36 | 37 | /* Define to 1 if you have the header file. */ 38 | /* #undef HAVE_SYS_RANDOM_H */ 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #define HAVE_SYS_STAT_H 1 42 | 43 | /* Define to 1 if you have the header file. */ 44 | #define HAVE_SYS_TYPES_H 1 45 | 46 | /* Define to 1 if you have the header file. */ 47 | #define HAVE_UNISTD_H 1 48 | 49 | /* Fallback definition for old systems */ 50 | /* #undef O_CLOEXEC */ 51 | 52 | /* Name of package */ 53 | #define PACKAGE "breakpad" 54 | 55 | /* Define to the address where bug reports for this package should be sent. */ 56 | #define PACKAGE_BUGREPORT "google-breakpad-dev@googlegroups.com" 57 | 58 | /* Define to the full name of this package. */ 59 | #define PACKAGE_NAME "breakpad" 60 | 61 | /* Define to the full name and version of this package. */ 62 | #define PACKAGE_STRING "breakpad 0.1" 63 | 64 | /* Define to the one symbol short name of this package. */ 65 | #define PACKAGE_TARNAME "breakpad" 66 | 67 | /* Define to the home page for this package. */ 68 | #define PACKAGE_URL "" 69 | 70 | /* Define to the version of this package. */ 71 | #define PACKAGE_VERSION "0.1" 72 | 73 | /* Define to necessary symbol if this constant uses a non-standard name on 74 | your system. */ 75 | /* #undef PTHREAD_CREATE_JOINABLE */ 76 | 77 | /* Define to 1 if you have the ANSI C header files. */ 78 | #define STDC_HEADERS 1 79 | 80 | /* Version number of package */ 81 | #define VERSION "0.1" 82 | 83 | /* Enable large inode numbers on Mac OS X 10.5. */ 84 | #ifndef _DARWIN_USE_64_BIT_INODE 85 | # define _DARWIN_USE_64_BIT_INODE 1 86 | #endif 87 | 88 | /* Number of bits in a file offset, on hosts where this is settable. */ 89 | /* #undef _FILE_OFFSET_BITS */ 90 | 91 | /* Define for large files, on AIX-style hosts. */ 92 | /* #undef _LARGE_FILES */ 93 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/common/breakpad_types.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, Google Inc. 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 29 | 30 | /* breakpad_types.h: Precise-width types 31 | * 32 | * (This is C99 source, please don't corrupt it with C++.) 33 | * 34 | * This file ensures that types uintN_t are defined for N = 8, 16, 32, and 35 | * 64. Types of precise widths are crucial to the task of writing data 36 | * structures on one platform and reading them on another. 37 | * 38 | * Author: Mark Mentovai */ 39 | 40 | #ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ 41 | #define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ 42 | 43 | #if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && \ 44 | !defined(__STDC_FORMAT_MACROS) 45 | #error "inttypes.h has already been included before this header file, but " 46 | #error "without __STDC_FORMAT_MACROS defined." 47 | #endif 48 | 49 | #ifndef __STDC_FORMAT_MACROS 50 | #define __STDC_FORMAT_MACROS 51 | #endif /* __STDC_FORMAT_MACROS */ 52 | #include 53 | 54 | typedef struct { 55 | uint64_t high; 56 | uint64_t low; 57 | } uint128_struct; 58 | 59 | typedef uint64_t breakpad_time_t; 60 | 61 | /* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to 62 | * llx, which is the format string for "long long" - this is a 64-bit 63 | * integral type on many systems. */ 64 | #ifndef PRIx64 65 | #define PRIx64 "llx" 66 | #endif /* !PRIx64 */ 67 | 68 | #endif /* GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ */ 69 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/common/minidump_exception_ps3.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Google Inc. 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 29 | 30 | /* minidump_exception_ps3.h: A definition of exception codes for 31 | * PS3 */ 32 | 33 | 34 | #ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ 35 | #define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ 36 | 37 | #include 38 | 39 | #include "google_breakpad/common/breakpad_types.h" 40 | 41 | typedef enum { 42 | MD_EXCEPTION_CODE_PS3_UNKNOWN = 0, 43 | MD_EXCEPTION_CODE_PS3_TRAP_EXCEP = 1, 44 | MD_EXCEPTION_CODE_PS3_PRIV_INSTR = 2, 45 | MD_EXCEPTION_CODE_PS3_ILLEGAL_INSTR = 3, 46 | MD_EXCEPTION_CODE_PS3_INSTR_STORAGE = 4, 47 | MD_EXCEPTION_CODE_PS3_INSTR_SEGMENT = 5, 48 | MD_EXCEPTION_CODE_PS3_DATA_STORAGE = 6, 49 | MD_EXCEPTION_CODE_PS3_DATA_SEGMENT = 7, 50 | MD_EXCEPTION_CODE_PS3_FLOAT_POINT = 8, 51 | MD_EXCEPTION_CODE_PS3_DABR_MATCH = 9, 52 | MD_EXCEPTION_CODE_PS3_ALIGN_EXCEP = 10, 53 | MD_EXCEPTION_CODE_PS3_MEMORY_ACCESS = 11, 54 | MD_EXCEPTION_CODE_PS3_COPRO_ALIGN = 12, 55 | MD_EXCEPTION_CODE_PS3_COPRO_INVALID_COM = 13, 56 | MD_EXCEPTION_CODE_PS3_COPRO_ERR = 14, 57 | MD_EXCEPTION_CODE_PS3_COPRO_FIR = 15, 58 | MD_EXCEPTION_CODE_PS3_COPRO_DATA_SEGMENT = 16, 59 | MD_EXCEPTION_CODE_PS3_COPRO_DATA_STORAGE = 17, 60 | MD_EXCEPTION_CODE_PS3_COPRO_STOP_INSTR = 18, 61 | MD_EXCEPTION_CODE_PS3_COPRO_HALT_INSTR = 19, 62 | MD_EXCEPTION_CODE_PS3_COPRO_HALTINST_UNKNOWN = 20, 63 | MD_EXCEPTION_CODE_PS3_COPRO_MEMORY_ACCESS = 21, 64 | MD_EXCEPTION_CODE_PS3_GRAPHIC = 22 65 | } MDExceptionCodePS3; 66 | 67 | #endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ */ 68 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/common/minidump_size.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2007, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 29 | 30 | // minidump_size.h: Provides a C++ template for programmatic access to 31 | // the sizes of various types defined in minidump_format.h. 32 | // 33 | // Author: Mark Mentovai 34 | 35 | #ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ 36 | #define GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ 37 | 38 | #include 39 | 40 | #include "google_breakpad/common/minidump_format.h" 41 | 42 | namespace google_breakpad { 43 | 44 | template 45 | class minidump_size { 46 | public: 47 | static size_t size() { return sizeof(T); } 48 | }; 49 | 50 | // Explicit specializations for variable-length types. The size returned 51 | // for these should be the size for an object without its variable-length 52 | // section. 53 | 54 | template<> 55 | class minidump_size { 56 | public: 57 | static size_t size() { return MDString_minsize; } 58 | }; 59 | 60 | template<> 61 | class minidump_size { 62 | public: 63 | static size_t size() { return MDRawThreadList_minsize; } 64 | }; 65 | 66 | template<> 67 | class minidump_size { 68 | public: 69 | static size_t size() { return MDCVInfoPDB20_minsize; } 70 | }; 71 | 72 | template<> 73 | class minidump_size { 74 | public: 75 | static size_t size() { return MDCVInfoPDB70_minsize; } 76 | }; 77 | 78 | template<> 79 | class minidump_size { 80 | public: 81 | static size_t size() { return MDCVInfoELF_minsize; } 82 | }; 83 | 84 | template<> 85 | class minidump_size { 86 | public: 87 | static size_t size() { return MDImageDebugMisc_minsize; } 88 | }; 89 | 90 | template<> 91 | class minidump_size { 92 | public: 93 | static size_t size() { return MDRawModuleList_minsize; } 94 | }; 95 | 96 | template<> 97 | class minidump_size { 98 | public: 99 | static size_t size() { return MDRawMemoryList_minsize; } 100 | }; 101 | 102 | // Explicit specialization for MDRawModule, for which sizeof may include 103 | // tail-padding on some architectures but not others. 104 | 105 | template<> 106 | class minidump_size { 107 | public: 108 | static size_t size() { return MD_MODULE_SIZE; } 109 | }; 110 | 111 | } // namespace google_breakpad 112 | 113 | #endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ 114 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/call_stack.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // call_stack.h: A call stack comprised of stack frames. 31 | // 32 | // This class manages a vector of stack frames. It is used instead of 33 | // exposing the vector directly to allow the CallStack to own StackFrame 34 | // pointers without having to publicly export the linked_ptr class. A 35 | // CallStack must be composed of pointers instead of objects to allow for 36 | // CPU-specific StackFrame subclasses. 37 | // 38 | // By convention, the stack frame at index 0 is the innermost callee frame, 39 | // and the frame at the highest index in a call stack is the outermost 40 | // caller. CallStack only allows stacks to be built by pushing frames, 41 | // beginning with the innermost callee frame. 42 | // 43 | // Author: Mark Mentovai 44 | 45 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ 46 | #define GOOGLE_BREAKPAD_PROCESSOR_CALL_STACK_H__ 47 | 48 | #include 49 | #include 50 | 51 | namespace google_breakpad { 52 | 53 | using std::vector; 54 | 55 | struct StackFrame; 56 | template class linked_ptr; 57 | 58 | class CallStack { 59 | public: 60 | CallStack() { Clear(); } 61 | ~CallStack(); 62 | 63 | // Resets the CallStack to its initial empty state 64 | void Clear(); 65 | 66 | const vector* frames() const { return &frames_; } 67 | 68 | // Set the TID associated with this call stack. 69 | void set_tid(uint32_t tid) { tid_ = tid; } 70 | 71 | uint32_t tid() const { return tid_; } 72 | 73 | private: 74 | // Stackwalker is responsible for building the frames_ vector. 75 | friend class Stackwalker; 76 | 77 | // Storage for pushed frames. 78 | vector frames_; 79 | 80 | // The TID associated with this call stack. Default to 0 if it's not 81 | // available. 82 | uint32_t tid_; 83 | }; 84 | 85 | } // namespace google_breakpad 86 | 87 | #endif // GOOGLE_BREAKPAD_PROCSSOR_CALL_STACK_H__ 88 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/dump_object.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // dump_object.h: A base class for all mini/micro dump object. 31 | 32 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__ 33 | #define GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__ 34 | 35 | namespace google_breakpad { 36 | 37 | // DumpObject is the base of various mini/micro dump's objects. 38 | class DumpObject { 39 | public: 40 | DumpObject(); 41 | 42 | bool valid() const { return valid_; } 43 | 44 | protected: 45 | // DumpObjects are not valid when created. When a subclass populates its own 46 | // fields, it can set valid_ to true. Accessors and mutators may wish to 47 | // consider or alter the valid_ state as they interact with objects. 48 | bool valid_; 49 | }; 50 | 51 | } // namespace google_breakpad 52 | 53 | #endif // GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__ 54 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/exploitability.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // exploitability_engine.h: Generic exploitability engine. 31 | // 32 | // The Exploitability class is an abstract base class providing common 33 | // generic methods that apply to exploitability engines for specific platforms. 34 | // Specific implementations will extend this class by providing run 35 | // methods to fill in the exploitability_ enumeration of the ProcessState 36 | // for a crash. 37 | // 38 | // Author: Cris Neckar 39 | 40 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_H_ 41 | #define GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_H_ 42 | 43 | #include "google_breakpad/common/breakpad_types.h" 44 | #include "google_breakpad/processor/minidump.h" 45 | #include "google_breakpad/processor/process_state.h" 46 | 47 | namespace google_breakpad { 48 | 49 | class Exploitability { 50 | public: 51 | virtual ~Exploitability() {} 52 | 53 | static Exploitability *ExploitabilityForPlatform(Minidump *dump, 54 | ProcessState *process_state); 55 | 56 | // The boolean parameter signals whether the exploitability engine is 57 | // enabled to call out to objdump for disassembly. This is disabled by 58 | // default. It is used to check the identity of the instruction that 59 | // caused the program to crash. This should not be enabled if there are 60 | // portability concerns. 61 | static Exploitability *ExploitabilityForPlatform(Minidump *dump, 62 | ProcessState *process_state, 63 | bool enable_objdump); 64 | 65 | ExploitabilityRating CheckExploitability(); 66 | bool AddressIsAscii(uint64_t); 67 | 68 | protected: 69 | Exploitability(Minidump *dump, 70 | ProcessState *process_state); 71 | 72 | Minidump *dump_; 73 | ProcessState *process_state_; 74 | SystemInfo *system_info_; 75 | 76 | private: 77 | virtual ExploitabilityRating CheckPlatformExploitability() = 0; 78 | }; 79 | 80 | } // namespace google_breakpad 81 | 82 | #endif // GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_H_ 83 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/memory_region.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // memory_region.h: Access to memory regions. 31 | // 32 | // A MemoryRegion provides virtual access to a range of memory. It is an 33 | // abstraction allowing the actual source of memory to be independent of 34 | // methods which need to access a virtual memory space. 35 | // 36 | // Author: Mark Mentovai 37 | 38 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ 39 | #define GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ 40 | 41 | 42 | #include "google_breakpad/common/breakpad_types.h" 43 | 44 | 45 | namespace google_breakpad { 46 | 47 | 48 | class MemoryRegion { 49 | public: 50 | virtual ~MemoryRegion() {} 51 | 52 | // The base address of this memory region. 53 | virtual uint64_t GetBase() const = 0; 54 | 55 | // The size of this memory region. 56 | virtual uint32_t GetSize() const = 0; 57 | 58 | // Access to data of various sizes within the memory region. address 59 | // is a pointer to read, and it must lie within the memory region as 60 | // defined by its base address and size. The location pointed to by 61 | // value is set to the value at address. Byte-swapping is performed 62 | // if necessary so that the value is appropriate for the running 63 | // program. Returns true on success. Fails and returns false if address 64 | // is out of the region's bounds (after considering the width of value), 65 | // or for other types of errors. 66 | virtual bool GetMemoryAtAddress(uint64_t address, uint8_t* value) const = 0; 67 | virtual bool GetMemoryAtAddress(uint64_t address, uint16_t* value) const = 0; 68 | virtual bool GetMemoryAtAddress(uint64_t address, uint32_t* value) const = 0; 69 | virtual bool GetMemoryAtAddress(uint64_t address, uint64_t* value) const = 0; 70 | 71 | // Print a human-readable representation of the object to stdout. 72 | virtual void Print() const = 0; 73 | }; 74 | 75 | 76 | } // namespace google_breakpad 77 | 78 | 79 | #endif // GOOGLE_BREAKPAD_PROCESSOR_MEMORY_REGION_H__ 80 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/microdump_processor.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // The processor for microdump (a reduced dump containing only the state of the 31 | // crashing thread). See crbug.com/410294 for more info and design docs. 32 | 33 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_MICRODUMP_PROCESSOR_H__ 34 | #define GOOGLE_BREAKPAD_PROCESSOR_MICRODUMP_PROCESSOR_H__ 35 | 36 | #include 37 | 38 | #include "common/using_std_string.h" 39 | #include "google_breakpad/processor/process_result.h" 40 | 41 | namespace google_breakpad { 42 | 43 | class ProcessState; 44 | class StackFrameSymbolizer; 45 | 46 | class MicrodumpProcessor { 47 | public: 48 | // Initializes the MicrodumpProcessor with a stack frame symbolizer. 49 | // Does not take ownership of frame_symbolizer, which must NOT be NULL. 50 | explicit MicrodumpProcessor(StackFrameSymbolizer* frame_symbolizer); 51 | 52 | virtual ~MicrodumpProcessor(); 53 | 54 | // Processes the microdump contents and fills process_state with the result. 55 | google_breakpad::ProcessResult Process(const string& microdump_contents, 56 | ProcessState* process_state); 57 | private: 58 | StackFrameSymbolizer* frame_symbolizer_; 59 | }; 60 | 61 | } // namespace google_breakpad 62 | 63 | #endif // GOOGLE_BREAKPAD_PROCESSOR_MICRODUMP_PROCESSOR_H__ 64 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/proc_maps_linux.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef BASE_DEBUG_PROC_MAPS_LINUX_H_ 6 | #define BASE_DEBUG_PROC_MAPS_LINUX_H_ 7 | 8 | #include 9 | #include 10 | 11 | #include "common/using_std_string.h" 12 | #include "google_breakpad/common/breakpad_types.h" 13 | 14 | namespace google_breakpad { 15 | 16 | // Describes a region of mapped memory and the path of the file mapped. 17 | struct MappedMemoryRegion { 18 | enum Permission { 19 | READ = 1 << 0, 20 | WRITE = 1 << 1, 21 | EXECUTE = 1 << 2, 22 | PRIVATE = 1 << 3, // If set, region is private, otherwise it is shared. 23 | }; 24 | 25 | // The address range [start,end) of mapped memory. 26 | uint64_t start; 27 | uint64_t end; 28 | 29 | // Byte offset into |path| of the range mapped into memory. 30 | uint64_t offset; 31 | 32 | // Bitmask of read/write/execute/private/shared permissions. 33 | uint8_t permissions; 34 | 35 | // Major and minor devices. 36 | uint8_t major_device; 37 | uint8_t minor_device; 38 | 39 | // Value of the inode. 40 | uint64_t inode; 41 | 42 | // Name of the file mapped into memory. 43 | // 44 | // NOTE: path names aren't guaranteed to point at valid files. For example, 45 | // "[heap]" and "[stack]" are used to represent the location of the process' 46 | // heap and stack, respectively. 47 | string path; 48 | 49 | // The line from /proc//maps that this struct represents. 50 | string line; 51 | }; 52 | 53 | // Parses /proc//maps input data and stores in |regions|. Returns true 54 | // and updates |regions| if and only if all of |input| was successfully parsed. 55 | bool ParseProcMaps(const string& input, 56 | std::vector* regions); 57 | 58 | } // namespace google_breakpad 59 | 60 | #endif // BASE_DEBUG_PROC_MAPS_LINUX_H_ 61 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/google_breakpad/processor/process_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_PROCESS_RESULT_H__ 31 | #define GOOGLE_BREAKPAD_PROCESSOR_PROCESS_RESULT_H__ 32 | 33 | namespace google_breakpad { 34 | 35 | // Return type for MinidumpProcessor or MicrodumpProcessor's Process() 36 | enum ProcessResult { 37 | PROCESS_OK, // The dump was processed 38 | // successfully. 39 | 40 | PROCESS_ERROR_MINIDUMP_NOT_FOUND, // The minidump file was not 41 | // found. 42 | 43 | PROCESS_ERROR_NO_MINIDUMP_HEADER, // The minidump file had no 44 | // header. 45 | 46 | PROCESS_ERROR_NO_THREAD_LIST, // The minidump file has no 47 | // thread list. 48 | 49 | PROCESS_ERROR_GETTING_THREAD, // There was an error getting one 50 | // thread's data from th dump. 51 | 52 | PROCESS_ERROR_GETTING_THREAD_ID, // There was an error getting a 53 | // thread id from the thread's 54 | // data. 55 | 56 | PROCESS_ERROR_DUPLICATE_REQUESTING_THREADS, // There was more than one 57 | // requesting thread. 58 | 59 | PROCESS_SYMBOL_SUPPLIER_INTERRUPTED // The dump processing was 60 | // interrupted by the 61 | // SymbolSupplier(not fatal). 62 | }; 63 | 64 | } // namespace google_breakpad 65 | 66 | #endif // GOOGLE_BREAKPAD_PROCESSOR_PROCESS_RESULT_H__ 67 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/address_map-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // address_map-inl.h: Address map implementation. 31 | // 32 | // See address_map.h for documentation. 33 | // 34 | // Author: Mark Mentovai 35 | 36 | #ifndef PROCESSOR_ADDRESS_MAP_INL_H__ 37 | #define PROCESSOR_ADDRESS_MAP_INL_H__ 38 | 39 | #include "processor/address_map.h" 40 | 41 | #include 42 | 43 | #include "processor/logging.h" 44 | 45 | namespace google_breakpad { 46 | 47 | template 48 | bool AddressMap::Store(const AddressType &address, 49 | const EntryType &entry) { 50 | // Ensure that the specified address doesn't conflict with something already 51 | // in the map. 52 | if (map_.find(address) != map_.end()) { 53 | BPLOG(INFO) << "Store failed, address " << HexString(address) << 54 | " is already present"; 55 | return false; 56 | } 57 | 58 | map_.insert(MapValue(address, entry)); 59 | return true; 60 | } 61 | 62 | template 63 | bool AddressMap::Retrieve( 64 | const AddressType &address, 65 | EntryType *entry, AddressType *entry_address) const { 66 | BPLOG_IF(ERROR, !entry) << "AddressMap::Retrieve requires |entry|"; 67 | assert(entry); 68 | 69 | // upper_bound gives the first element whose key is greater than address, 70 | // but we want the first element whose key is less than or equal to address. 71 | // Decrement the iterator to get there, but not if the upper_bound already 72 | // points to the beginning of the map - in that case, address is lower than 73 | // the lowest stored key, so return false. 74 | MapConstIterator iterator = map_.upper_bound(address); 75 | if (iterator == map_.begin()) 76 | return false; 77 | --iterator; 78 | 79 | *entry = iterator->second; 80 | if (entry_address) 81 | *entry_address = iterator->first; 82 | 83 | return true; 84 | } 85 | 86 | template 87 | void AddressMap::Clear() { 88 | map_.clear(); 89 | } 90 | 91 | } // namespace google_breakpad 92 | 93 | #endif // PROCESSOR_ADDRESS_MAP_INL_H__ 94 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/address_map.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // address_map.h: Address maps. 31 | // 32 | // An address map contains a set of objects keyed by address. Objects are 33 | // retrieved from the map by returning the object with the highest key less 34 | // than or equal to the lookup key. 35 | // 36 | // Author: Mark Mentovai 37 | 38 | #ifndef PROCESSOR_ADDRESS_MAP_H__ 39 | #define PROCESSOR_ADDRESS_MAP_H__ 40 | 41 | #include 42 | 43 | namespace google_breakpad { 44 | 45 | // Forward declarations (for later friend declarations). 46 | template class AddressMapSerializer; 47 | 48 | template 49 | class AddressMap { 50 | public: 51 | AddressMap() : map_() {} 52 | 53 | // Inserts an entry into the map. Returns false without storing the entry 54 | // if an entry is already stored in the map at the same address as specified 55 | // by the address argument. 56 | bool Store(const AddressType &address, const EntryType &entry); 57 | 58 | // Locates the entry stored at the highest address less than or equal to 59 | // the address argument. If there is no such range, returns false. The 60 | // entry is returned in entry, which is a required argument. If 61 | // entry_address is not NULL, it will be set to the address that the entry 62 | // was stored at. 63 | bool Retrieve(const AddressType &address, 64 | EntryType *entry, AddressType *entry_address) const; 65 | 66 | // Empties the address map, restoring it to the same state as when it was 67 | // initially created. 68 | void Clear(); 69 | 70 | private: 71 | friend class AddressMapSerializer; 72 | friend class ModuleComparer; 73 | 74 | // Convenience types. 75 | typedef std::map AddressToEntryMap; 76 | typedef typename AddressToEntryMap::const_iterator MapConstIterator; 77 | typedef typename AddressToEntryMap::value_type MapValue; 78 | 79 | // Maps the address of each entry to an EntryType. 80 | AddressToEntryMap map_; 81 | }; 82 | 83 | } // namespace google_breakpad 84 | 85 | #endif // PROCESSOR_ADDRESS_MAP_H__ 86 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/exploitability_win.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // exploitability_win.h: Windows specific exploitability engine. 31 | // 32 | // Provides a guess at the exploitability of the crash for the Windows 33 | // platform given a minidump and process_state. 34 | // 35 | // Author: Cris Neckar 36 | 37 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_WIN_H_ 38 | #define GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_WIN_H_ 39 | 40 | #include "google_breakpad/common/breakpad_types.h" 41 | #include "google_breakpad/processor/exploitability.h" 42 | 43 | namespace google_breakpad { 44 | 45 | class ExploitabilityWin : public Exploitability { 46 | public: 47 | ExploitabilityWin(Minidump *dump, 48 | ProcessState *process_state); 49 | 50 | virtual ExploitabilityRating CheckPlatformExploitability(); 51 | }; 52 | 53 | } // namespace google_breakpad 54 | 55 | #endif // GOOGLE_BREAKPAD_PROCESSOR_EXPLOITABILITY_WIN_H_ 56 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/module_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // module_factory.h: ModuleFactory a factory that provides 31 | // an interface for creating a Module and deferring instantiation to subclasses 32 | // BasicModuleFactory and FastModuleFactory. 33 | 34 | // Author: Siyang Xie (lambxsy@google.com) 35 | 36 | #ifndef PROCESSOR_MODULE_FACTORY_H__ 37 | #define PROCESSOR_MODULE_FACTORY_H__ 38 | 39 | #include "processor/basic_source_line_resolver_types.h" 40 | #include "processor/fast_source_line_resolver_types.h" 41 | #include "processor/source_line_resolver_base_types.h" 42 | 43 | namespace google_breakpad { 44 | 45 | class ModuleFactory { 46 | public: 47 | virtual ~ModuleFactory() { }; 48 | virtual SourceLineResolverBase::Module* CreateModule( 49 | const string &name) const = 0; 50 | }; 51 | 52 | class BasicModuleFactory : public ModuleFactory { 53 | public: 54 | virtual ~BasicModuleFactory() { } 55 | virtual BasicSourceLineResolver::Module* CreateModule( 56 | const string &name) const { 57 | return new BasicSourceLineResolver::Module(name); 58 | } 59 | }; 60 | 61 | class FastModuleFactory : public ModuleFactory { 62 | public: 63 | virtual ~FastModuleFactory() { } 64 | virtual FastSourceLineResolver::Module* CreateModule( 65 | const string &name) const { 66 | return new FastSourceLineResolver::Module(name); 67 | } 68 | }; 69 | 70 | } // namespace google_breakpad 71 | 72 | #endif // PROCESSOR_MODULE_FACTORY_H__ 73 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/pathname_stripper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // pathname_stripper.h: Manipulates pathnames into their component parts. 31 | // 32 | // Author: Mark Mentovai 33 | 34 | #ifndef PROCESSOR_PATHNAME_STRIPPER_H__ 35 | #define PROCESSOR_PATHNAME_STRIPPER_H__ 36 | 37 | #include 38 | 39 | #include "common/using_std_string.h" 40 | 41 | namespace google_breakpad { 42 | 43 | class PathnameStripper { 44 | public: 45 | // Given path, a pathname with components separated by slashes (/) or 46 | // backslashes (\), returns the trailing component, without any separator. 47 | // If path ends in a separator character, returns an empty string. 48 | static string File(const string &path); 49 | }; 50 | 51 | } // namespace google_breakpad 52 | 53 | #endif // PROCESSOR_PATHNAME_STRIPPER_H__ 54 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/simple_serializer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // simple_serializer.h: SimpleSerializer is a template for calculating size and 31 | // writing to specific memory location for objects of primitive types, C-style 32 | // string, string, breakpad types/structs etc. 33 | // All specializations of SimpleSerializer template are defined in the 34 | // "simple_serializer-inl.h" file. 35 | // 36 | // Author: Siyang Xie (lambxsy@google.com) 37 | 38 | #ifndef PROCESSOR_SIMPLE_SERIALIZER_H__ 39 | #define PROCESSOR_SIMPLE_SERIALIZER_H__ 40 | 41 | #include "google_breakpad/common/breakpad_types.h" 42 | 43 | namespace google_breakpad { 44 | 45 | typedef uint64_t MemAddr; 46 | 47 | // Default implementation of SimpleSerializer template. 48 | // Specializations are defined in "simple_serializer-inl.h". 49 | template class SimpleSerializer { 50 | public: 51 | // Calculate and return the size of the 'item'. 52 | static size_t SizeOf(const Type &item) { return sizeof(item); } 53 | // Write 'item' to memory location 'dest', and return to the "end" address of 54 | // data written, i.e., the address after the final byte written. 55 | static char *Write(const Type &item, char *dest) { 56 | new (dest) Type(item); 57 | return dest + SizeOf(item); 58 | } 59 | }; 60 | 61 | } // namespace google_breakpad 62 | 63 | #endif // PROCESSOR_SIMPLE_SERIALIZER_H__ 64 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalk_common.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // stackwalk_common.cc: Module shared by the {micro,mini}dump_stackwalck 31 | // executables to print the content of dumps (w/ stack traces) on the console. 32 | 33 | 34 | #ifndef PROCESSOR_STACKWALK_COMMON_H__ 35 | #define PROCESSOR_STACKWALK_COMMON_H__ 36 | 37 | namespace google_breakpad { 38 | 39 | class ProcessState; 40 | class SourceLineResolverInterface; 41 | 42 | void PrintProcessStateMachineReadable(const ProcessState& process_state); 43 | void PrintProcessState(const ProcessState& process_state, 44 | bool output_stack_contents, 45 | SourceLineResolverInterface* resolver); 46 | 47 | } // namespace google_breakpad 48 | 49 | #endif // PROCESSOR_STACKWALK_COMMON_H__ 50 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalker_address_list.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // stackwalker_address_list.h: a pseudo stackwalker. 31 | // 32 | // Doesn't actually walk a stack, rather initializes a CallStack given an 33 | // explicit list of already walked return addresses. 34 | // 35 | // Author: Chris Hamilton 36 | 37 | #ifndef PROCESSOR_STACKWALKER_ADDRESS_LIST_H_ 38 | #define PROCESSOR_STACKWALKER_ADDRESS_LIST_H_ 39 | 40 | #include "common/basictypes.h" 41 | #include "google_breakpad/common/breakpad_types.h" 42 | #include "google_breakpad/processor/stackwalker.h" 43 | 44 | namespace google_breakpad { 45 | 46 | class CodeModules; 47 | 48 | class StackwalkerAddressList : public Stackwalker { 49 | public: 50 | // Initializes this stack walker with an explicit set of frame addresses. 51 | // |modules| and |frame_symbolizer| are passed directly through to the base 52 | // Stackwalker constructor. 53 | StackwalkerAddressList(const uint64_t* frames, 54 | size_t frame_count, 55 | const CodeModules* modules, 56 | StackFrameSymbolizer* frame_symbolizer); 57 | 58 | private: 59 | // Implementation of Stackwalker. 60 | virtual StackFrame* GetContextFrame(); 61 | virtual StackFrame* GetCallerFrame(const CallStack* stack, 62 | bool stack_scan_allowed); 63 | 64 | const uint64_t* frames_; 65 | size_t frame_count_; 66 | 67 | DISALLOW_COPY_AND_ASSIGN(StackwalkerAddressList); 68 | }; 69 | 70 | } // namespace google_breakpad 71 | 72 | #endif // PROCESSOR_STACKWALKER_ADDRESS_LIST_H_ 73 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalker_mips.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // stackwalker_mips.h: MIPS-specific stackwalker. 31 | // 32 | // Provides stack frames given MIPS register context and a memory region 33 | // corresponding to a MIPSstack. 34 | // 35 | // Author: Tata Elxsi 36 | 37 | #ifndef PROCESSOR_STACKWALKER_MIPS_H__ 38 | #define PROCESSOR_STACKWALKER_MIPS_H__ 39 | 40 | #include "google_breakpad/common/breakpad_types.h" 41 | #include "google_breakpad/common/minidump_format.h" 42 | #include "google_breakpad/processor/stackwalker.h" 43 | #include "google_breakpad/processor/stack_frame_cpu.h" 44 | #include "processor/cfi_frame_info.h" 45 | 46 | namespace google_breakpad { 47 | 48 | class CodeModules; 49 | 50 | class StackwalkerMIPS : public Stackwalker { 51 | public: 52 | // Context is a MIPS context object that gives access to mips-specific 53 | // register state corresponding to the innermost called frame to be 54 | // included in the stack. The other arguments are passed directly 55 | // through to the base Stackwalker constructor. 56 | StackwalkerMIPS(const SystemInfo* system_info, 57 | const MDRawContextMIPS* context, 58 | MemoryRegion* memory, 59 | const CodeModules* modules, 60 | StackFrameSymbolizer* frame_symbolizer); 61 | 62 | private: 63 | // Implementation of Stackwalker, using mips context and stack conventions. 64 | virtual StackFrame* GetContextFrame(); 65 | virtual StackFrame* GetCallerFrame(const CallStack* stack, 66 | bool stack_scan_allowed); 67 | 68 | // Use cfi_frame_info (derived from STACK CFI records) to construct 69 | // the frame that called frames.back(). The caller takes ownership 70 | // of the returned frame. Return NULL on failure. 71 | StackFrameMIPS* GetCallerByCFIFrameInfo(const vector& frames, 72 | CFIFrameInfo* cfi_frame_info); 73 | 74 | // Scan the stack for plausible return address and frame pointer pair. 75 | // The caller takes ownership of the returned frame. Return NULL on failure. 76 | StackFrameMIPS* GetCallerByStackScan(const vector& frames); 77 | 78 | // Stores the CPU context corresponding to the innermost stack frame to 79 | // be returned by GetContextFrame. 80 | const MDRawContextMIPS* context_; 81 | }; 82 | 83 | } // namespace google_breakpad 84 | 85 | #endif // PROCESSOR_STACKWALKER_MIPS_H__ 86 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalker_ppc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // stackwalker_ppc.h: ppc-specific stackwalker. 31 | // 32 | // Provides stack frames given ppc register context and a memory region 33 | // corresponding to a ppc stack. 34 | // 35 | // Author: Mark Mentovai 36 | 37 | 38 | #ifndef PROCESSOR_STACKWALKER_PPC_H__ 39 | #define PROCESSOR_STACKWALKER_PPC_H__ 40 | 41 | 42 | #include "google_breakpad/common/breakpad_types.h" 43 | #include "google_breakpad/common/minidump_format.h" 44 | #include "google_breakpad/processor/stackwalker.h" 45 | 46 | namespace google_breakpad { 47 | 48 | class CodeModules; 49 | 50 | class StackwalkerPPC : public Stackwalker { 51 | public: 52 | // context is a ppc context object that gives access to ppc-specific 53 | // register state corresponding to the innermost called frame to be 54 | // included in the stack. The other arguments are passed directly through 55 | // to the base Stackwalker constructor. 56 | StackwalkerPPC(const SystemInfo* system_info, 57 | const MDRawContextPPC* context, 58 | MemoryRegion* memory, 59 | const CodeModules* modules, 60 | StackFrameSymbolizer* frame_symbolizer); 61 | 62 | private: 63 | // Implementation of Stackwalker, using ppc context (stack pointer in %r1, 64 | // saved program counter in %srr0) and stack conventions (saved stack 65 | // pointer at 0(%r1), return address at 8(0(%r1)). 66 | virtual StackFrame* GetContextFrame(); 67 | virtual StackFrame* GetCallerFrame(const CallStack* stack, 68 | bool stack_scan_allowed); 69 | 70 | // Stores the CPU context corresponding to the innermost stack frame to 71 | // be returned by GetContextFrame. 72 | const MDRawContextPPC* context_; 73 | }; 74 | 75 | 76 | } // namespace google_breakpad 77 | 78 | 79 | #endif // PROCESSOR_STACKWALKER_PPC_H__ 80 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalker_ppc64.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // stackwalker_ppc64.h: ppc-specific stackwalker. 31 | // 32 | // Provides stack frames given ppc64 register context and a memory region 33 | // corresponding to a ppc64 stack. 34 | 35 | 36 | #ifndef PROCESSOR_STACKWALKER_PPC64_H__ 37 | #define PROCESSOR_STACKWALKER_PPC64_H__ 38 | 39 | 40 | #include "google_breakpad/common/breakpad_types.h" 41 | #include "google_breakpad/common/minidump_format.h" 42 | #include "google_breakpad/processor/stackwalker.h" 43 | 44 | namespace google_breakpad { 45 | 46 | class CodeModules; 47 | 48 | class StackwalkerPPC64 : public Stackwalker { 49 | public: 50 | // context is a ppc64 context object that gives access to ppc64-specific 51 | // register state corresponding to the innermost called frame to be 52 | // included in the stack. The other arguments are passed directly through 53 | // to the base Stackwalker constructor. 54 | StackwalkerPPC64(const SystemInfo* system_info, 55 | const MDRawContextPPC64* context, 56 | MemoryRegion* memory, 57 | const CodeModules* modules, 58 | StackFrameSymbolizer* frame_symbolizer); 59 | 60 | private: 61 | // Implementation of Stackwalker, using ppc64 context (stack pointer in %r1, 62 | // saved program counter in %srr0) and stack conventions (saved stack 63 | // pointer at 0(%r1), return address at 8(0(%r1)). 64 | virtual StackFrame* GetContextFrame(); 65 | virtual StackFrame* GetCallerFrame(const CallStack* stack, 66 | bool stack_scan_allowed); 67 | 68 | // Stores the CPU context corresponding to the innermost stack frame to 69 | // be returned by GetContextFrame. 70 | const MDRawContextPPC64* context_; 71 | }; 72 | 73 | 74 | } // namespace google_breakpad 75 | 76 | 77 | #endif // PROCESSOR_STACKWALKER_PPC64_H__ 78 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalker_selftest_sol.s: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007, Google Inc. 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /* stackwalker_selftest_sol.s 32 | * On Solaris, the recommeded compiler is CC, so we can not use gcc inline 33 | * asm, use this method instead. 34 | * 35 | * How to compile: as -P -L -D_ASM -D_STDC -K PIC -o \ 36 | * src/processor/stackwalker_selftest_sol.o \ 37 | * src/processor/stackwalker_selftest_sol.s 38 | * 39 | * Author: Michael Shang 40 | */ 41 | 42 | #include 43 | 44 | #if defined(__i386) 45 | 46 | 47 | ENTRY(GetEBP) 48 | pushl %ebp 49 | movl %esp,%ebp 50 | subl $0x00000004,%esp 51 | movl 0x00000000(%ebp),%eax 52 | movl %eax,0xfffffffc(%ebp) 53 | movl 0xfffffffc(%ebp),%eax 54 | leave 55 | ret 56 | SET_SIZE(GetEBP) 57 | 58 | ENTRY(GetEIP) 59 | pushl %ebp 60 | movl %esp,%ebp 61 | subl $0x00000004,%esp 62 | movl 0x00000004(%ebp),%eax 63 | movl %eax,0xfffffffc(%ebp) 64 | movl 0xfffffffc(%ebp),%eax 65 | leave 66 | ret 67 | SET_SIZE(GetEIP) 68 | 69 | ENTRY(GetESP) 70 | pushl %ebp 71 | movl %esp,%ebp 72 | subl $0x00000004,%esp 73 | movl %ebp,%eax 74 | movl %eax,0xfffffffc(%ebp) 75 | movl 0xfffffffc(%ebp),%eax 76 | addl $0x00000008,%eax 77 | leave 78 | ret 79 | SET_SIZE(GetESP) 80 | 81 | 82 | #elif defined(__sparc) 83 | 84 | 85 | ENTRY(GetPC) 86 | save %sp, -120, %sp 87 | mov %i7, %i4 88 | inccc 8, %i4 89 | mov %i4, %i0 90 | ret 91 | restore 92 | SET_SIZE(GetPC) 93 | 94 | ENTRY(GetSP) 95 | save %sp, -120, %sp 96 | mov %fp, %i4 97 | mov %i4, %i0 98 | ret 99 | restore 100 | SET_SIZE(GetSP) 101 | 102 | ENTRY(GetFP) 103 | save %sp, -120, %sp 104 | ld [%fp + 56], %g1 105 | mov %g1, %i0 106 | ret 107 | restore 108 | SET_SIZE(GetFP) 109 | 110 | 111 | #endif // __i386 || __sparc 112 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/stackwalker_sparc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // stackwalker_sparc.h: sparc-specific stackwalker. 31 | // 32 | // Provides stack frames given sparc register context and a memory region 33 | // corresponding to an sparc stack. 34 | // 35 | // Author: Michael Shang 36 | 37 | 38 | #ifndef PROCESSOR_STACKWALKER_SPARC_H__ 39 | #define PROCESSOR_STACKWALKER_SPARC_H__ 40 | 41 | 42 | #include "google_breakpad/common/breakpad_types.h" 43 | #include "google_breakpad/common/minidump_format.h" 44 | #include "google_breakpad/processor/stackwalker.h" 45 | 46 | namespace google_breakpad { 47 | 48 | class CodeModules; 49 | 50 | class StackwalkerSPARC : public Stackwalker { 51 | public: 52 | // context is a sparc context object that gives access to sparc-specific 53 | // register state corresponding to the innermost called frame to be 54 | // included in the stack. The other arguments are passed directly through 55 | // to the base Stackwalker constructor. 56 | StackwalkerSPARC(const SystemInfo* system_info, 57 | const MDRawContextSPARC* context, 58 | MemoryRegion* memory, 59 | const CodeModules* modules, 60 | StackFrameSymbolizer* frame_symbolizer); 61 | 62 | private: 63 | // Implementation of Stackwalker, using sparc context (%fp, %sp, %pc) and 64 | // stack conventions 65 | virtual StackFrame* GetContextFrame(); 66 | virtual StackFrame* GetCallerFrame(const CallStack* stack, 67 | bool stack_scan_allowed); 68 | 69 | // Stores the CPU context corresponding to the innermost stack frame to 70 | // be returned by GetContextFrame. 71 | const MDRawContextSPARC* context_; 72 | }; 73 | 74 | 75 | } // namespace google_breakpad 76 | 77 | 78 | #endif // PROCESSOR_STACKWALKER_SPARC_H__ 79 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/static_address_map-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // static_address_map-inl.h: StaticAddressMap implementation. 31 | // 32 | // See static_address_map.h for documentation. 33 | // 34 | // Author: Siyang Xie (lambxsy@google.com) 35 | 36 | #ifndef PROCESSOR_STATIC_ADDRESS_MAP_INL_H__ 37 | #define PROCESSOR_STATIC_ADDRESS_MAP_INL_H__ 38 | 39 | #include "processor/static_address_map.h" 40 | 41 | #include "processor/logging.h" 42 | 43 | namespace google_breakpad { 44 | 45 | template 46 | bool StaticAddressMap::Retrieve( 47 | const AddressType &address, 48 | const EntryType *&entry, AddressType *entry_address) const { 49 | 50 | // upper_bound gives the first element whose key is greater than address, 51 | // but we want the first element whose key is less than or equal to address. 52 | // Decrement the iterator to get there, but not if the upper_bound already 53 | // points to the beginning of the map - in that case, address is lower than 54 | // the lowest stored key, so return false. 55 | 56 | MapConstIterator iterator = map_.upper_bound(address); 57 | if (iterator == map_.begin()) 58 | return false; 59 | --iterator; 60 | 61 | entry = iterator.GetValuePtr(); 62 | // Make sure AddressType is a copyable basic type 63 | if (entry_address) 64 | *entry_address = iterator.GetKey(); 65 | 66 | return true; 67 | } 68 | 69 | } // namespace google_breakpad 70 | 71 | #endif // PROCESSOR_STATIC_ADDRESS_MAP_INL_H__ 72 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/static_address_map.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // static_address_map.h: StaticAddressMap. 31 | // 32 | // StaticAddressMap is a wrapper class of StaticMap, just as AddressMap wraps 33 | // std::map. StaticAddressMap provides read-only Retrieve() operation, similar 34 | // as AddressMap. However, the difference between StaticAddressMap and 35 | // AddressMap is that StaticAddressMap does not support dynamic operation 36 | // Store() due to the static nature of the underlying StaticMap. 37 | // 38 | // See address_map.h for reference. 39 | // 40 | // Author: Siyang Xie (lambxsy@google.com) 41 | 42 | #ifndef PROCESSOR_STATIC_ADDRESS_MAP_H__ 43 | #define PROCESSOR_STATIC_ADDRESS_MAP_H__ 44 | 45 | #include "processor/static_map-inl.h" 46 | 47 | namespace google_breakpad { 48 | 49 | // AddressType MUST be a basic type, e.g.: integer types etc 50 | // EntryType could be a complex type, so we retrieve its pointer instead. 51 | template 52 | class StaticAddressMap { 53 | public: 54 | StaticAddressMap(): map_() { } 55 | explicit StaticAddressMap(const char *map_data): map_(map_data) { } 56 | 57 | // Locates the entry stored at the highest address less than or equal to 58 | // the address argument. If there is no such range, returns false. The 59 | // entry is returned in entry, which is a required argument. If 60 | // entry_address is not NULL, it will be set to the address that the entry 61 | // was stored at. 62 | bool Retrieve(const AddressType &address, 63 | const EntryType *&entry, AddressType *entry_address) const; 64 | 65 | private: 66 | friend class ModuleComparer; 67 | // Convenience types. 68 | typedef StaticAddressMap* SelfPtr; 69 | typedef StaticMap AddressToEntryMap; 70 | typedef typename AddressToEntryMap::const_iterator MapConstIterator; 71 | 72 | AddressToEntryMap map_; 73 | }; 74 | 75 | } // namespace google_breakpad 76 | 77 | #endif // PROCESSOR_STATIC_ADDRESS_MAP_H__ 78 | 79 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/static_contained_range_map-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // static_contained_range_map-inl.h: Hierarchically-organized range map, 31 | // i.e., StaticContainedRangeMap implementation. 32 | // 33 | // See static_contained_range_map.h for documentation. 34 | // 35 | // Author: Siyang Xie (lambxsy@google.com) 36 | 37 | #ifndef PROCESSOR_STATIC_CONTAINED_RANGE_MAP_INL_H__ 38 | #define PROCESSOR_STATIC_CONTAINED_RANGE_MAP_INL_H__ 39 | 40 | #include "processor/static_contained_range_map.h" 41 | #include "processor/logging.h" 42 | 43 | namespace google_breakpad { 44 | 45 | template 46 | StaticContainedRangeMap::StaticContainedRangeMap( 47 | const char *base) 48 | : base_(*(reinterpret_cast(base))), 49 | entry_size_(*(reinterpret_cast(base + sizeof(base_)))), 50 | entry_ptr_(reinterpret_cast( 51 | base + sizeof(base_) + sizeof(entry_size_))), 52 | map_(base + sizeof(base_) + sizeof(entry_size_) + entry_size_) { 53 | if (entry_size_ == 0) 54 | entry_ptr_ = NULL; 55 | } 56 | 57 | 58 | template 59 | bool StaticContainedRangeMap::RetrieveRange( 60 | const AddressType &address, const EntryType *&entry) const { 61 | 62 | // Get an iterator to the child range whose high address is equal to or 63 | // greater than the supplied address. If the supplied address is higher 64 | // than all of the high addresses in the range, then this range does not 65 | // contain a child at address, so return false. If the supplied address 66 | // is lower than the base address of the child range, then it is not within 67 | // the child range, so return false. 68 | MapConstIterator iterator = map_.lower_bound(address); 69 | 70 | if (iterator == map_.end()) 71 | return false; 72 | 73 | const char *memory_child = 74 | reinterpret_cast(iterator.GetValuePtr()); 75 | 76 | StaticContainedRangeMap child_map(memory_child); 77 | 78 | if (address < child_map.base_) 79 | return false; 80 | 81 | // The child in iterator->second contains the specified address. Find out 82 | // if it has a more-specific descendant that also contains it. If it does, 83 | // it will set |entry| appropriately. If not, set |entry| to the child. 84 | if (!child_map.RetrieveRange(address, entry)) 85 | entry = child_map.entry_ptr_; 86 | 87 | return true; 88 | } 89 | 90 | } // namespace google_breakpad 91 | 92 | #endif // PROCESSOR_STATIC_CONTAINED_RANGE_MAP_INL_H__ 93 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/symbolic_constants_win.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // ntstatus_reason_win.h: Windows NTSTATUS code to string. 31 | // 32 | // Provides a means to convert NTSTATUS codes to strings. 33 | // 34 | // Author: Ben Wagner 35 | 36 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_SYMBOLIC_CONSTANTS_WIN_H_ 37 | #define GOOGLE_BREAKPAD_PROCESSOR_SYMBOLIC_CONSTANTS_WIN_H_ 38 | 39 | #include 40 | 41 | #include "common/using_std_string.h" 42 | #include "google_breakpad/common/breakpad_types.h" 43 | 44 | namespace google_breakpad { 45 | 46 | /* Converts a NTSTATUS code to a reason string. */ 47 | string NTStatusToString(uint32_t ntstatus); 48 | 49 | } // namespace google_breakpad 50 | 51 | #endif // GOOGLE_BREAKPAD_PROCESSOR_SYMBOLIC_CONSTANTS_WIN_H_ 52 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/include/processor/tokenize.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Implements a Tokenize function for splitting up strings. 31 | 32 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_TOKENIZE_H_ 33 | #define GOOGLE_BREAKPAD_PROCESSOR_TOKENIZE_H_ 34 | 35 | #include 36 | #include 37 | 38 | #include "common/using_std_string.h" 39 | 40 | namespace google_breakpad { 41 | 42 | // Splits line into at most max_tokens tokens, separated by any of the 43 | // characters in separators and placing them in the tokens vector. 44 | // line is a 0-terminated string that optionally ends with a newline 45 | // character or combination, which will be removed. 46 | // If more tokens than max_tokens are present, the final token is placed 47 | // into the vector without splitting it up at all. This modifies line as 48 | // a side effect. Returns true if exactly max_tokens tokens are returned, 49 | // and false if fewer are returned. This is not considered a failure of 50 | // Tokenize, but may be treated as a failure if the caller expects an 51 | // exact, as opposed to maximum, number of tokens. 52 | 53 | bool Tokenize(char *line, 54 | const char *separators, 55 | int max_tokens, 56 | std::vector *tokens); 57 | // For convenience, since you need a char* to pass to Tokenize. 58 | // You can call StringToVector on a string, and use &vec[0]. 59 | void StringToVector(const string &str, std::vector &vec); 60 | 61 | } // namespace google_breakpad 62 | 63 | #endif // GOOGLE_BREAKPAD_PROCESSOR_TOKENIZE_H_ 64 | -------------------------------------------------------------------------------- /CrashDump/Source/ThirdParty/GoogleBreakpad/libbreakpad_client.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zompi2/UE4AndroidCrashDump/d5d3276d471cf807e7d26ed45fafe6ccfe482b23/CrashDump/Source/ThirdParty/GoogleBreakpad/libbreakpad_client.a -------------------------------------------------------------------------------- /Extras/jni.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zompi2/UE4AndroidCrashDump/d5d3276d471cf807e7d26ed45fafe6ccfe482b23/Extras/jni.zip -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Damian Nowakowski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UE4 Android Crash Dump Plugin 2 | ===== 3 | This is an Unreal Engine 4 plugin that captures native crashes on Android and saves their dumps on a device. 4 | 5 | ## How to use 6 | Simply put a *CrashDump* directory into an Engine Plugins directory and enable it in Your project. 7 | 8 | ## More 9 | More about this plugin and Android Crash Dump Symbolicating in my blog entry: https://zompidev.blogspot.com/2017/06/symbolicating-crash-dumps-for-android.html 10 | --------------------------------------------------------------------------------