├── .gitignore ├── AppCenter.uplugin ├── LICENSE ├── README.md ├── Resources └── Icon128.png ├── Source ├── .clang-format ├── AppCenter │ ├── AppCenter.Build.cs │ ├── AppCenter_UPL_Android.xml │ ├── AppCenter_UPL_IOS.xml │ ├── Private │ │ ├── Android │ │ │ ├── AppCenter_Android.cpp │ │ │ └── AppCenter_Android.h │ │ ├── AppCenter.cpp │ │ ├── AppCenterDefines.h │ │ ├── AppCenterLibrary.cpp │ │ ├── AppCenterProxy.cpp │ │ ├── AppCenterSettings.cpp │ │ └── IOS │ │ │ ├── AppCenter_IOS.cpp │ │ │ └── AppCenter_IOS.h │ ├── Public │ │ ├── AppCenter.h │ │ ├── AppCenterAPI.h │ │ ├── AppCenterLibrary.h │ │ ├── AppCenterProxy.h │ │ ├── AppCenterSettings.h │ │ └── AppCenterTypes.h │ └── Tools │ │ ├── Linux_AppCenter.sh │ │ └── Mac_IOS_SDK.sh └── ThirdParty │ └── Breakpad │ ├── LICENSE │ ├── lib │ ├── arm64-v8a │ │ └── libbreakpad_client.a │ └── armeabi-v7a │ │ └── libbreakpad_client.a │ └── src │ ├── breakpad_googletest_includes.h │ ├── client │ ├── linux │ │ ├── crash_generation │ │ │ ├── client_info.h │ │ │ ├── crash_generation_client.h │ │ │ └── crash_generation_server.h │ │ ├── data │ │ │ ├── linux-gate-amd.sym │ │ │ └── linux-gate-intel.sym │ │ ├── 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 │ │ ├── breakpad_getcontext.S │ │ ├── include │ │ │ ├── asm-mips │ │ │ │ ├── README.md │ │ │ │ ├── asm.h │ │ │ │ ├── fpregdef.h │ │ │ │ └── regdef.h │ │ │ ├── elf.h │ │ │ ├── link.h │ │ │ ├── stab.h │ │ │ ├── sys │ │ │ │ ├── procfs.h │ │ │ │ ├── signal.h │ │ │ │ └── user.h │ │ │ └── ucontext.h │ │ ├── testing │ │ │ ├── include │ │ │ │ └── wchar.h │ │ │ ├── mkdtemp.h │ │ │ └── pthread_fixes.h │ │ └── ucontext_constants.h │ ├── basictypes.h │ ├── byte_cursor.h │ ├── common.gyp │ ├── convert_UTF.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 │ │ └── tests │ │ │ ├── auto_testfile.h │ │ │ └── crash_generator.h │ ├── long_string_dictionary.h │ ├── md5.h │ ├── memory_allocator.h │ ├── memory_range.h │ ├── minidump_type_helper.h │ ├── module.h │ ├── path_helper.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.in │ ├── 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 │ ├── convert_old_arm64_context.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 │ ├── microdump_stackwalk_machine_readable_test │ ├── microdump_stackwalk_test │ ├── microdump_stackwalk_test_vars │ ├── minidump_dump_test │ ├── minidump_stackwalk_machine_readable_test │ ├── minidump_stackwalk_test │ ├── module_comparer.h │ ├── module_factory.h │ ├── module_serializer.h │ ├── pathname_stripper.h │ ├── postfix_evaluator-inl.h │ ├── postfix_evaluator.h │ ├── processor.gyp │ ├── processor_tools.gypi │ ├── proto │ │ ├── README │ │ └── process_state.proto │ ├── 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 │ ├── README.md │ ├── codereview.settings │ └── linux_syscall_support.h └── ThirdParty └── AppCenter-SDK-Apple ├── LICENSE └── iOS ├── AppCenter.embeddedframework.zip ├── AppCenterAnalytics.embeddedframework.zip ├── AppCenterAuth.embeddedframework.zip ├── AppCenterCrashes.embeddedframework.zip ├── AppCenterData.embeddedframework.zip ├── AppCenterDistribute.embeddedframework.zip └── AppCenterPush.embeddedframework.zip /.gitignore: -------------------------------------------------------------------------------- 1 | /Intermediate/ 2 | /Binaries/ 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /AppCenter.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "AppCenter", 6 | "Description": "App Center SDK for Unreal Engine 4 platforms", 7 | "Category": "Other", 8 | "CreatedBy": "Vladimir Alyamkin", 9 | "CreatedByURL": "https://github.com/PushkinStudio", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "CanContainContent": false, 14 | "IsBetaVersion": true, 15 | "Installed": false, 16 | "Modules": [ 17 | { 18 | "Name": "AppCenter", 19 | "Type": "Runtime", 20 | "LoadingPhase": "PreDefault" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vladimir Alyamkin 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppCenter-SDK-UE4 2 | 3 | Development repository for the App Center SDK for Unreal Engine 4 platforms 4 | 5 | ## JFYI 6 | 7 | Plugin is in active development stage and being used on prod in a few project (e.g. [Armored Warfare: Assault](http://awa.my.com/)). It's well tested and double-checked, but as its primary target is limited to our own games only selected features are implemented. 8 | 9 | * Analytics (basic integration and events traking) 10 | * Crashes 11 | * Distribute 12 | 13 | Platforms: both iOS and Android. 14 | 15 | **nb!** Force ANSI allocator for iOS build! Just add `GlobalDefinitions.Add("FORCE_ANSI_ALLOCATOR=1");` to `YourProject.Target.cs` 16 | -------------------------------------------------------------------------------- /Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/Resources/Icon128.png -------------------------------------------------------------------------------- /Source/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: LLVM 4 | IndentWidth: 4 5 | TabWidth: 4 6 | UseTab: ForContinuationAndIndentation 7 | Standard: Cpp11 8 | AccessModifierOffset: -4 9 | AlignAfterOpenBracket: DontAlign 10 | AlignEscapedNewlines: Right 11 | AlignTrailingComments: true 12 | AllowShortCaseLabelsOnASingleLine: true 13 | AllowShortFunctionsOnASingleLine: InlineOnly 14 | BreakBeforeBraces: Allman 15 | BreakConstructorInitializersBeforeComma: true 16 | ColumnLimit: 0 17 | PointerAlignment: Left 18 | SpacesInAngles: false 19 | --- 20 | Language: ObjC 21 | DisableFormat: true 22 | ... 23 | -------------------------------------------------------------------------------- /Source/AppCenter/Private/Android/AppCenter_Android.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "AppCenterProxy.h" 6 | 7 | #include "AppCenter_Android.generated.h" 8 | 9 | UCLASS() 10 | class UAppCenter_Android : public UAppCenterProxy 11 | { 12 | GENERATED_UCLASS_BODY() 13 | 14 | #if PLATFORM_ANDROID 15 | 16 | #if WITH_APPCENTER 17 | virtual void SetUserId(const FString& UserId) override; 18 | virtual void SetCustomPropertyAsString(const FString& Key, const FString& Value) override; 19 | virtual void SetCustomPropertyAsInt(const FString& Key, int32 Value) override; 20 | virtual void SetCustomPropertyAsFloat(const FString& Key, float Value) override; 21 | virtual void SetCustomPropertyAsBool(const FString& Key, bool Value) override; 22 | virtual void ClearCustomProperties(const TArray& Keys) override; 23 | virtual void ClearCustomProperty(const FString& Key) override; 24 | #endif // WITH_APPCENTER 25 | 26 | #if WITH_APPCENTER_ANALYTICS 27 | virtual void TrackEvent(const FString& EventName, const TMap& Properties, EAppCenterEventPersistence EventPersistence = EAppCenterEventPersistence::PERSISTENCE_NORMAL) override; 28 | #endif // WITH_APPCENTER_ANALYTICS 29 | 30 | #if WITH_APPCENTER_CRASHES 31 | virtual void GenerateTestCrash() override; 32 | virtual void GenerateNativeCrash() override; 33 | virtual bool HasCrashedInLastSession() override; 34 | #endif // WITH_APPCENTER_CRASHES 35 | 36 | #endif 37 | }; 38 | -------------------------------------------------------------------------------- /Source/AppCenter/Private/AppCenter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #include "AppCenter.h" 4 | 5 | #include "AppCenterDefines.h" 6 | #include "AppCenterProxy.h" 7 | #include "AppCenterSettings.h" 8 | 9 | #include "Developer/Settings/Public/ISettingsModule.h" 10 | #include "UObject/Package.h" 11 | 12 | #if PLATFORM_IOS 13 | #include "AppCenter_IOS.h" 14 | #elif PLATFORM_ANDROID 15 | #include "AppCenter_Android.h" 16 | #endif 17 | 18 | #define LOCTEXT_NAMESPACE "FAppCenterModule" 19 | 20 | void FAppCenterModule::StartupModule() 21 | { 22 | AppCenterSettings = NewObject(GetTransientPackage(), "AppCenterSettings", RF_Standalone); 23 | AppCenterSettings->AddToRoot(); 24 | 25 | // Register settings 26 | if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr("Settings")) 27 | { 28 | SettingsModule->RegisterSettings("Project", "Plugins", "AppCenter SDK", 29 | LOCTEXT("RuntimeSettingsName", "AppCenter SDK"), 30 | LOCTEXT("RuntimeSettingsDescription", "Configure AppCenter SDK"), 31 | AppCenterSettings); 32 | } 33 | 34 | // Proxy class depends on platform 35 | UClass* KitPlatformClass = UAppCenterProxy::StaticClass(); 36 | #if PLATFORM_IOS 37 | KitPlatformClass = UAppCenter_IOS::StaticClass(); 38 | #elif PLATFORM_ANDROID 39 | KitPlatformClass = UAppCenter_Android::StaticClass(); 40 | #endif 41 | 42 | // Create crashlytics kit proxy and initalize module by default 43 | AppCenterProxy = NewObject(GetTransientPackage(), KitPlatformClass); 44 | AppCenterProxy->SetFlags(RF_Standalone); 45 | AppCenterProxy->AddToRoot(); 46 | } 47 | 48 | void FAppCenterModule::ShutdownModule() 49 | { 50 | if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr("Settings")) 51 | { 52 | SettingsModule->UnregisterSettings("Project", "Plugins", "AppCenter SDK"); 53 | } 54 | 55 | if (!GExitPurge) 56 | { 57 | // If we're in exit purge, this object has already been destroyed 58 | AppCenterSettings->RemoveFromRoot(); 59 | AppCenterProxy->RemoveFromRoot(); 60 | AppCenterProxy->ClearFlags(RF_Standalone); 61 | } 62 | else 63 | { 64 | AppCenterSettings = nullptr; 65 | AppCenterProxy = nullptr; 66 | } 67 | } 68 | 69 | UAppCenterSettings* FAppCenterModule::GetSettings() const 70 | { 71 | check(AppCenterSettings); 72 | return AppCenterSettings; 73 | } 74 | 75 | UAppCenterProxy* FAppCenterModule::GetProxy() const 76 | { 77 | check(AppCenterProxy); 78 | return AppCenterProxy; 79 | } 80 | 81 | #undef LOCTEXT_NAMESPACE 82 | 83 | IMPLEMENT_MODULE(FAppCenterModule, AppCenter) 84 | 85 | DEFINE_LOG_CATEGORY(LogAppCenter); 86 | -------------------------------------------------------------------------------- /Source/AppCenter/Private/AppCenterDefines.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Logging/LogCategory.h" 7 | #include "Logging/LogMacros.h" 8 | #include "Logging/LogVerbosity.h" 9 | 10 | DECLARE_LOG_CATEGORY_EXTERN(LogAppCenter, Log, All); 11 | 12 | #define PS_FUNC (FString(__FUNCTION__)) // Current Class Name + Function Name where this is called 13 | #define PS_LINE (FString::FromInt(__LINE__)) // Current Line Number in the code where this is called 14 | #define PS_FUNC_LINE (PS_FUNC + "(" + PS_LINE + ")") // Current Class and Line Number where this is called! 15 | -------------------------------------------------------------------------------- /Source/AppCenter/Private/AppCenterLibrary.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #include "AppCenterLibrary.h" 4 | 5 | #include "AppCenter.h" 6 | #include "AppCenterProxy.h" 7 | 8 | UAppCenterLibrary::UAppCenterLibrary(const FObjectInitializer& ObjectInitializer) 9 | : Super(ObjectInitializer) 10 | { 11 | } 12 | 13 | UAppCenterProxy* UAppCenterLibrary::GetAppCenterProxy() 14 | { 15 | return FAppCenterModule::Get().GetProxy(); 16 | } 17 | -------------------------------------------------------------------------------- /Source/AppCenter/Private/AppCenterSettings.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #include "AppCenterSettings.h" 4 | 5 | UAppCenterSettings::UAppCenterSettings(const FObjectInitializer& ObjectInitializer) 6 | : Super(ObjectInitializer) 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /Source/AppCenter/Private/IOS/AppCenter_IOS.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "AppCenterProxy.h" 6 | 7 | #include "AppCenter_IOS.generated.h" 8 | 9 | #if PLATFORM_IOS 10 | @interface AppCenterObserver : NSObject 11 | @end 12 | #endif // PLATFORM_IOS 13 | 14 | // clang-format off 15 | UCLASS() 16 | class UAppCenter_IOS : public UAppCenterProxy 17 | { 18 | GENERATED_UCLASS_BODY() 19 | 20 | #if PLATFORM_IOS 21 | 22 | #if WITH_APPCENTER 23 | virtual void SetUserId(const FString& UserId) override; 24 | #endif // WITH_APPCENTER 25 | 26 | #if WITH_APPCENTER_ANALYTICS 27 | virtual void TrackEvent(const FString& EventName, const TMap& Properties, EAppCenterEventPersistence EventPersistence = EAppCenterEventPersistence::PERSISTENCE_NORMAL) override; 28 | #endif // WITH_APPCENTER_ANALYTICS 29 | 30 | #if WITH_APPCENTER_CRASHES 31 | virtual void GenerateTestCrash() override; 32 | virtual void GenerateNativeCrash() override; 33 | #endif // WITH_APPCENTER_CRASHES 34 | #endif 35 | }; 36 | // clang-format on 37 | -------------------------------------------------------------------------------- /Source/AppCenter/Public/AppCenter.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleManager.h" 7 | 8 | class UAppCenterSettings; 9 | class UAppCenterProxy; 10 | 11 | class FAppCenterModule : public IModuleInterface 12 | { 13 | public: 14 | /** IModuleInterface implementation */ 15 | virtual void StartupModule() override; 16 | virtual void ShutdownModule() override; 17 | 18 | /** 19 | * Singleton-like access to this module's interface. This is just for convenience! 20 | * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. 21 | * 22 | * @return Returns singleton instance, loading the module on demand if needed 23 | */ 24 | static inline FAppCenterModule& Get() 25 | { 26 | return FModuleManager::LoadModuleChecked("AppCenter"); 27 | } 28 | 29 | /** 30 | * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. 31 | * 32 | * @return True if the module is loaded and ready to use 33 | */ 34 | static inline bool IsAvailable() 35 | { 36 | return FModuleManager::Get().IsModuleLoaded("AppCenter"); 37 | } 38 | 39 | /** Getter for internal settings object to support runtime configuration changes */ 40 | UAppCenterSettings* GetSettings() const; 41 | 42 | /** AppCenterProxy accessor */ 43 | UAppCenterProxy* GetProxy() const; 44 | 45 | private: 46 | UAppCenterSettings* AppCenterSettings; 47 | 48 | /** Internal proxy object */ 49 | UAppCenterProxy* AppCenterProxy; 50 | }; 51 | -------------------------------------------------------------------------------- /Source/AppCenter/Public/AppCenterAPI.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "AppCenterLibrary.h" 6 | #include "AppCenterProxy.h" 7 | -------------------------------------------------------------------------------- /Source/AppCenter/Public/AppCenterLibrary.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Kismet/BlueprintFunctionLibrary.h" 6 | 7 | #include "AppCenterLibrary.generated.h" 8 | 9 | class UAppCenterProxy; 10 | 11 | UCLASS() 12 | class APPCENTER_API UAppCenterLibrary : public UBlueprintFunctionLibrary 13 | { 14 | GENERATED_UCLASS_BODY() 15 | 16 | public: 17 | /** Global AppCenterProxy accessor */ 18 | UFUNCTION(BlueprintPure, Category = AppCenter, meta = (DisplayName = "Get AppCenter Proxy")) 19 | static UAppCenterProxy* GetAppCenterProxy(); 20 | }; 21 | -------------------------------------------------------------------------------- /Source/AppCenter/Public/AppCenterSettings.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "AppCenterSettings.generated.h" 6 | 7 | UCLASS(config = Engine, defaultconfig) 8 | class UAppCenterSettings : public UObject 9 | { 10 | GENERATED_UCLASS_BODY() 11 | 12 | public: 13 | /** */ 14 | UPROPERTY(Config, EditAnywhere) 15 | bool bEnableAnalytics; 16 | 17 | /** */ 18 | UPROPERTY(Config, EditAnywhere) 19 | bool bEnableAuth; 20 | 21 | /** */ 22 | UPROPERTY(Config, EditAnywhere) 23 | bool bEnableCrashes; 24 | 25 | /** */ 26 | UPROPERTY(Config, EditAnywhere) 27 | bool bEnableData; 28 | 29 | /** */ 30 | UPROPERTY(Config, EditAnywhere) 31 | bool bEnableDistribute; 32 | 33 | /** */ 34 | UPROPERTY(Config, EditAnywhere) 35 | bool bEnablePush; 36 | 37 | /** The App Secret can be found on the Getting Started page or Settings page on the App Center portal */ 38 | UPROPERTY(Config, EditAnywhere) 39 | FString AppSecretAndroid; 40 | 41 | /** The App Secret can be found on the Getting Started page or Settings page on the App Center portal */ 42 | UPROPERTY(Config, EditAnywhere) 43 | FString AppSecretIOS; 44 | 45 | /** If you want to see the logs that get sent to the backend, set debug to true and the SDK will print logs in the console */ 46 | UPROPERTY(Config, EditAnywhere) 47 | bool bDebug; 48 | }; 49 | -------------------------------------------------------------------------------- /Source/AppCenter/Public/AppCenterTypes.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2020 Mail.Ru Group. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "AppCenterTypes.generated.h" 6 | 7 | /** 8 | * The log levels correspond to the ones defined in both 9 | * https://developer.android.com/reference/android/util/Log and 10 | * https://github.com/Microsoft/AppCenter-SDK-Apple/blob/develop/AppCenter/AppCenter/MSConstants.h 11 | */ 12 | UENUM(BlueprintType) 13 | enum class EAppCenterLogLevel : uint8 14 | { 15 | /** Default value */ 16 | INVALID = 0, 17 | /** Only critical errors will be logged */ 18 | ASSERT = 7, 19 | /** Debug information will be logged */ 20 | DEBUG = 3, 21 | /** Errors will be logged */ 22 | ERROR = 6, 23 | /** Information will be logged */ 24 | INFO = 4, 25 | /** Logging will be very chatty */ 26 | VERBOSE = 2, 27 | /** Errors and warnings will be logged */ 28 | WARN = 5, 29 | /** Logging is disabled (IOS only!) */ 30 | NONE = 99 31 | }; 32 | 33 | /** 34 | * You can track business critical events that have higher importance than other events. 35 | * 36 | * - Events with priority set as Critical will be retrieved from storage first and sent before Normal events. 37 | * - When the local storage is full and new events needs to be stored, the oldest events that have the lowest priority are deleted first to make room for the new ones. 38 | * - If the storage is full of logs with Critical priority, then tracking an event with Normal priority will fail as the SDK cannot make room in that case. 39 | * - If you also use the Crashes service, please note that crash logs are set as Critical and share the same storage as events. 40 | */ 41 | UENUM(BlueprintType) 42 | enum class EAppCenterEventPersistence : uint8 43 | { 44 | /** Default value */ 45 | INVALID = 0, 46 | /** Normal */ 47 | PERSISTENCE_NORMAL = 1, 48 | /** Critical */ 49 | PERSISTENCE_CRITICAL = 2 50 | }; 51 | 52 | /** 53 | * Details about the last crash 54 | * https://github.com/Microsoft/AppCenter-SDK-Apple/blob/develop/SasquatchMac/SasquatchMacObjC/AppCenterDelegateObjC.m 55 | * https://github.com/Microsoft/AppCenter-SDK-Android/blob/develop/sdk/appcenter-crashes/src/main/java/com/microsoft/appcenter/crashes/model/ErrorReport.java 56 | */ 57 | USTRUCT(BlueprintType) 58 | struct FAppCenterErrorReport 59 | { 60 | GENERATED_BODY() 61 | 62 | public: 63 | FAppCenterErrorReport() {} 64 | 65 | // @TODO Implement class details https://github.com/PushkinStudio/AppCenter-SDK-UE4/issues/4 66 | }; 67 | -------------------------------------------------------------------------------- /Source/AppCenter/Tools/Mac_IOS_SDK.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2015-2019 Mail.Ru Group. All Rights Reserved. 3 | set -e 4 | 5 | printUsageExit() 6 | { 7 | SCRIPT_NAME=`basename "$0"` 8 | SCRIPT_NAME="Tools/Build/$SCRIPT_NAME" 9 | echo -e "ERROR: $1\n" 2>&1 10 | echo "Usage: $SCRIPT_NAME [ validateIncludeGuards|packEmbeddedFrameworks ]" 2>&1 11 | exit 1 12 | } 13 | 14 | validateIncludeGuards() 15 | { 16 | THIRDPARTY_DIR="Plugins/AppCenter/ThirdParty" 17 | pushd $THIRDPARTY_DIR 18 | 19 | # @todo Use $2 instead 20 | SDK_ZIP="AppCenter-SDK-Apple-2.0.1.zip" 21 | SDK_DIR="AppCenter-SDK-Apple" 22 | 23 | rm -rd $SDK_DIR 24 | 25 | # extract SDK source 26 | unzip -o $SDK_ZIP 27 | 28 | SDK_IOS_DIR="AppCenter-SDK-Apple/iOS" 29 | pushd $SDK_IOS_DIR 30 | 31 | # process all headers first 32 | find . -name '*.h' | while read h_file; do 33 | echo "Processing file '$h_file'" 34 | 35 | h_name=$(basename $h_file) 36 | h_name=${h_name/./_} 37 | h_name=${h_name/+/_} # MSConstants+Flags.h 38 | h_name=${h_name^^} 39 | GUARD_LINE_FIRST="#ifndef "$h_name 40 | GUARD_LINE_SECOND="#define "$h_name 41 | GUARD_LINE_LAST="#endif // "$h_name 42 | 43 | read -r firstline < $h_file 44 | 45 | if [[ $firstline != $GUARD_LINE_FIRST ]]; then 46 | sed -i "1s/^/$GUARD_LINE_SECOND\n/" $h_file 47 | sed -i "1s/^/$GUARD_LINE_FIRST\n/" $h_file 48 | sed -i -e "\$a$GUARD_LINE_LAST" $h_file 49 | fi 50 | done 51 | 52 | # pack each library then 53 | find . -path '*.framework' -type d | while read framework_dir; do 54 | echo "Processing " $framework_dir 55 | framework_name=$(basename $framework_dir .framework) 56 | 57 | echo "Auto-packing is not implemented yet! ::" $framework_name 58 | 59 | # @TODO Pack embedded archives 60 | # 1. prepare embedded dir 61 | # 2. copy framework files 62 | # 3. check for bundle and copy it too 63 | # 4. pack into zip with right name 64 | 65 | done 66 | 67 | popd # SDK_IOS_DIR 68 | popd # THIRDPARTY_DIR 69 | } 70 | 71 | packEmbeddedFrameworks() 72 | { 73 | echo "Auto-packing is not implemented yet!" 74 | } 75 | 76 | if [[ $# -eq 0 ]]; then 77 | printUsageExit "Parameters not found" 78 | else 79 | if [ "$1" == "validateIncludeGuards" ]; then validateIncludeGuards 80 | elif [ "$1" == "packEmbeddedFrameworks" ]; then packEmbeddedFrameworks 81 | else printUsageExit "Unknown 1st parameter: $1" 82 | fi 83 | fi 84 | 85 | echo "--- END $0 $1 ---" 86 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/lib/arm64-v8a/libbreakpad_client.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/Source/ThirdParty/Breakpad/lib/arm64-v8a/libbreakpad_client.a -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/lib/armeabi-v7a/libbreakpad_client.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/Source/ThirdParty/Breakpad/lib/armeabi-v7a/libbreakpad_client.a -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/client/linux/data/linux-gate-amd.sym: -------------------------------------------------------------------------------- 1 | MODULE Linux x86 B8CFDE93002D54DA1900A40AA1BD67690 linux-gate.so 2 | PUBLIC 400 0 __kernel_vsyscall 3 | STACK WIN 4 400 100 1 1 0 0 0 0 0 1 4 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/client/linux/data/linux-gate-intel.sym: -------------------------------------------------------------------------------- 1 | MODULE Linux x86 4FBDA58B5A1DF5A379E3CF19A235EA090 linux-gate.so 2 | PUBLIC 400 0 __kernel_vsyscall 3 | STACK WIN 4 400 200 3 3 0 0 0 0 0 1 -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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_Old 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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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_allocator.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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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_allocator.h" 38 | #include "google_breakpad/common/minidump_format.h" 39 | 40 | namespace google_breakpad { 41 | 42 | // Wraps platform-dependent implementations of accessors to ucontext_t structs. 43 | struct UContextReader { 44 | static uintptr_t GetStackPointer(const ucontext_t* uc); 45 | 46 | static uintptr_t GetInstructionPointer(const ucontext_t* uc); 47 | 48 | // Juggle a arch-specific ucontext_t 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_t *uc, 53 | const struct _libc_fpstate* fp); 54 | #elif defined(__aarch64__) 55 | static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, 56 | const struct fpsimd_context* fpregs); 57 | #else 58 | static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); 59 | #endif 60 | }; 61 | 62 | } // namespace google_breakpad 63 | 64 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H 65 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/common/android/include/asm-mips/README.md: -------------------------------------------------------------------------------- 1 | # asm-mips 2 | 3 | The files in this directory are almost direct copies from Android NDK r12, with 4 | the exception of changing the include guards to Breakpad ones. They are copied 5 | from the MIPS asm/ directory, but are meant to be used as replacements for both 6 | asm/ and machine/ includes since the files in each are largely duplicates. 7 | 8 | Some MIPS asm/ and all machine/ headers were removed in the move to unified NDK 9 | headers, so Breakpad fails to compile on newer NDK versions without these files. -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | #include 38 | 39 | // TODO(rmcilroy): Remove this file once the NDK API level is updated to at 40 | // least 21 for all architectures. https://crbug.com/358831 41 | 42 | // These structures are only present in traditional headers at API level 21 and 43 | // above. Unified headers define these structures regardless of the chosen API 44 | // level. __ANDROID_API_N__ is a proxy for determining whether unified headers 45 | // are in use. It’s only defined by unified headers. 46 | #if __ANDROID_API__ < 21 && !defined(__ANDROID_API_N__) 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif // __cplusplus 51 | 52 | struct r_debug { 53 | int r_version; 54 | struct link_map* r_map; 55 | ElfW(Addr) r_brk; 56 | enum { 57 | RT_CONSISTENT, 58 | RT_ADD, 59 | RT_DELETE } r_state; 60 | ElfW(Addr) r_ldbase; 61 | }; 62 | 63 | struct link_map { 64 | ElfW(Addr) l_addr; 65 | char* l_name; 66 | ElfW(Dyn)* l_ld; 67 | struct link_map* l_next; 68 | struct link_map* l_prev; 69 | }; 70 | 71 | #ifdef __cplusplus 72 | } // extern "C" 73 | #endif // __cplusplus 74 | 75 | #endif // __ANDROID_API__ < 21 && !defined(__ANDROID_API_N__) 76 | 77 | #endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */ 78 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | 38 | // TODO(primiano): remove these changes after Chromium has stably rolled to 39 | // an NDK with the appropriate fixes. https://crbug.com/358831 40 | 41 | // With traditional headers, forgot to do this. Unified headers get 42 | // it right. 43 | #include 44 | 45 | #include_next 46 | 47 | #include 48 | 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif // __cplusplus 52 | 53 | #if defined(__i386__) 54 | #if __ANDROID_API__ < 21 && !defined(__ANDROID_API_N__) 55 | 56 | // user_fpxregs_struct was called user_fxsr_struct in traditional headers before 57 | // API level 21. Unified headers call it user_fpxregs_struct regardless of the 58 | // chosen API level. __ANDROID_API_N__ is a proxy for determining whether 59 | // unified headers are in use. It’s only defined by unified headers. 60 | typedef struct user_fxsr_struct user_fpxregs_struct; 61 | 62 | #endif // __ANDROID_API__ < 21 && !defined(__ANDROID_API_N__) 63 | #endif // defined(__i386__) 64 | 65 | #ifdef __cplusplus 66 | } // extern "C" 67 | #endif // __cplusplus 68 | 69 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H 70 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/common/android/testing/include/wchar.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 | // Android doesn't provide wcscasecmp(), so provide an alternative here. 31 | // 32 | // Note that this header is not needed when Breakpad is compiled against 33 | // a recent version of Googletest. It shall be considered for removal once 34 | // src/testing/ is updated to an appropriate revision in the future. 35 | 36 | #ifndef GOOGLEBREAKPAD_COMMON_ANDROID_INCLUDE_WCHAR_H 37 | #define GOOGLEBREAKPAD_COMMON_ANDROID_INCLUDE_WCHAR_H 38 | 39 | #include_next 40 | 41 | #if !defined(__aarch64__) && !defined(__x86_64__) && \ 42 | !(defined(__mips__) && _MIPS_SIM == _ABI64) 43 | 44 | // This needs to be in an extern "C" namespace, or Googletest will not 45 | // compile against it. 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif // __cplusplus 49 | 50 | static wchar_t inline wcstolower(wchar_t ch) { 51 | if (ch >= L'a' && ch <= L'A') 52 | ch -= L'a' - L'A'; 53 | return ch; 54 | } 55 | 56 | static int inline wcscasecmp(const wchar_t* s1, const wchar_t* s2) { 57 | for (;;) { 58 | wchar_t c1 = wcstolower(*s1); 59 | wchar_t c2 = wcstolower(*s2); 60 | if (c1 < c2) 61 | return -1; 62 | if (c1 > c2) 63 | return 1; 64 | if (c1 == L'0') 65 | return 0; 66 | s1++; 67 | s2++; 68 | } 69 | } 70 | 71 | #ifdef __cplusplus 72 | } // extern "C" 73 | #endif // __cplusplus 74 | #endif 75 | 76 | #endif // GOOGLEBREAKPAD_COMMON_ANDROID_INCLUDE_WCHAR_H 77 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | // Newer Linux systems offer this. 47 | #ifndef NT_SIGINFO 48 | #define NT_SIGINFO 0x53494749 49 | #endif 50 | 51 | #endif // COMMON_LINUX_ELF_GNU_COMPAT_H_ 52 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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_allocator.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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/common/path_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017, 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_PATH_HELPER_H 31 | #define GOOGLE_BREAKPAD_COMMON_PATH_HELPER_H 32 | 33 | #include 34 | 35 | #include "common/using_std_string.h" 36 | 37 | namespace google_breakpad { 38 | 39 | string BaseName(const string& path); 40 | string DirName(const string& path); 41 | 42 | } // namespace google_breakpad 43 | 44 | #endif // GOOGLE_BREAKPAD_COMMON_PATH_HELPER_H 45 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 __gnu_cxx::hash_map {}; 46 | template > 47 | struct unordered_set : public __gnu_cxx::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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/config.h.in: -------------------------------------------------------------------------------- 1 | /* src/config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the `arc4random' function. */ 4 | #undef HAVE_ARC4RANDOM 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_A_OUT_H 8 | 9 | /* define if the compiler supports basic C++11 syntax */ 10 | #undef HAVE_CXX11 11 | 12 | /* Define to 1 if you have the `getrandom' function. */ 13 | #undef HAVE_GETRANDOM 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_INTTYPES_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_MEMORY_H 20 | 21 | /* Define if you have POSIX threads libraries and header files. */ 22 | #undef HAVE_PTHREAD 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STDINT_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_STDLIB_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_STRINGS_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_STRING_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_SYS_RANDOM_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_SYS_STAT_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #undef HAVE_SYS_TYPES_H 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #undef HAVE_UNISTD_H 47 | 48 | /* Fallback definition for old systems */ 49 | #undef O_CLOEXEC 50 | 51 | /* Name of package */ 52 | #undef PACKAGE 53 | 54 | /* Define to the address where bug reports for this package should be sent. */ 55 | #undef PACKAGE_BUGREPORT 56 | 57 | /* Define to the full name of this package. */ 58 | #undef PACKAGE_NAME 59 | 60 | /* Define to the full name and version of this package. */ 61 | #undef PACKAGE_STRING 62 | 63 | /* Define to the one symbol short name of this package. */ 64 | #undef PACKAGE_TARNAME 65 | 66 | /* Define to the home page for this package. */ 67 | #undef PACKAGE_URL 68 | 69 | /* Define to the version of this package. */ 70 | #undef PACKAGE_VERSION 71 | 72 | /* Define to necessary symbol if this constant uses a non-standard name on 73 | your system. */ 74 | #undef PTHREAD_CREATE_JOINABLE 75 | 76 | /* Define to 1 if you have the ANSI C header files. */ 77 | #undef STDC_HEADERS 78 | 79 | /* Version number of package */ 80 | #undef VERSION 81 | 82 | /* Enable large inode numbers on Mac OS X 10.5. */ 83 | #ifndef _DARWIN_USE_64_BIT_INODE 84 | # define _DARWIN_USE_64_BIT_INODE 1 85 | #endif 86 | 87 | /* Number of bits in a file offset, on hosts where this is settable. */ 88 | #undef _FILE_OFFSET_BITS 89 | 90 | /* Define for large files, on AIX-style hosts. */ 91 | #undef _LARGE_FILES 92 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 Microdump; 44 | class ProcessState; 45 | class StackFrameSymbolizer; 46 | 47 | class MicrodumpProcessor { 48 | public: 49 | // Initializes the MicrodumpProcessor with a stack frame symbolizer. 50 | // Does not take ownership of frame_symbolizer, which must NOT be NULL. 51 | explicit MicrodumpProcessor(StackFrameSymbolizer* frame_symbolizer); 52 | 53 | virtual ~MicrodumpProcessor(); 54 | 55 | // Processes the microdump contents and fills process_state with the result. 56 | google_breakpad::ProcessResult Process(Microdump* microdump, 57 | ProcessState* process_state); 58 | private: 59 | StackFrameSymbolizer* frame_symbolizer_; 60 | }; 61 | 62 | } // namespace google_breakpad 63 | 64 | #endif // GOOGLE_BREAKPAD_PROCESSOR_MICRODUMP_PROCESSOR_H__ 65 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/convert_old_arm64_context.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, 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 PROCESSOR_CONVERT_OLD_ARM64_CONTEXT_H__ 31 | #define PROCESSOR_CONVERT_OLD_ARM64_CONTEXT_H__ 32 | 33 | #include "google_breakpad/common/minidump_cpu_arm64.h" 34 | 35 | namespace google_breakpad { 36 | 37 | void ConvertOldARM64Context(const MDRawContextARM64_Old& old, 38 | MDRawContextARM64* context); 39 | 40 | } // namespace google_breakpad 41 | 42 | #endif // PROCESSOR_CONVERT_OLD_ARM64_CONTEXT_H__ 43 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/microdump_stackwalk_machine_readable_test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2014, 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 | . "${0%/*}/microdump_stackwalk_test_vars" || exit 1 # for MICRODUMP_SUPPORTED_ARCHS. 33 | testdata_dir=$srcdir/src/processor/testdata 34 | 35 | set -e # Bail out with an error if any of the commands below fails. 36 | for ARCH in $MICRODUMP_SUPPORTED_ARCHS; do 37 | echo "Testing microdump_stackwalk -m for arch $ARCH" 38 | ./src/processor/microdump_stackwalk -m $testdata_dir/microdump-${ARCH}.dmp \ 39 | $testdata_dir/symbols/microdump | \ 40 | tr -d '\015' | \ 41 | diff -u $testdata_dir/microdump.stackwalk.machine_readable-${ARCH}.out - 42 | done 43 | exit 0 44 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/microdump_stackwalk_test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2014, 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 | . "${0%/*}/microdump_stackwalk_test_vars" || exit 1 # for MICRODUMP_SUPPORTED_ARCHS. 33 | testdata_dir=$srcdir/src/processor/testdata 34 | 35 | set -e # Bail out with an error if any of the commands below fails. 36 | for ARCH in $MICRODUMP_SUPPORTED_ARCHS; do 37 | echo "Testing microdump_stackwalk for arch $ARCH" 38 | ./src/processor/microdump_stackwalk $testdata_dir/microdump-${ARCH}.dmp \ 39 | $testdata_dir/symbols/microdump | \ 40 | tr -d '\015' | \ 41 | diff -u $testdata_dir/microdump.stackwalk-${ARCH}.out - 42 | done 43 | exit 0 44 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/microdump_stackwalk_test_vars: -------------------------------------------------------------------------------- 1 | MICRODUMP_SUPPORTED_ARCHS="arm arm64" 2 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/minidump_dump_test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2006, 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 | testdata_dir=$srcdir/src/processor/testdata 33 | ./src/processor/minidump_dump $testdata_dir/minidump2.dmp | \ 34 | tr -d '\015' | \ 35 | diff -u $testdata_dir/minidump2.dump.out - 36 | exit $? 37 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/minidump_stackwalk_machine_readable_test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2007, 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 | testdata_dir=$srcdir/src/processor/testdata 33 | ./src/processor/minidump_stackwalk -m $testdata_dir/minidump2.dmp \ 34 | $testdata_dir/symbols | \ 35 | tr -d '\015' | \ 36 | diff -u $testdata_dir/minidump2.stackwalk.machine_readable.out - 37 | exit $? 38 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/minidump_stackwalk_test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright (c) 2006, 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 | testdata_dir=$srcdir/src/processor/testdata 33 | ./src/processor/minidump_stackwalk $testdata_dir/minidump2.dmp \ 34 | $testdata_dir/symbols | \ 35 | tr -d '\015' | \ 36 | diff -u $testdata_dir/minidump2.stackwalk.out - 37 | exit $? 38 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/processor_tools.gypi: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Google Inc. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above 10 | # copyright notice, this list of conditions and the following disclaimer 11 | # in the documentation and/or other materials provided with the 12 | # distribution. 13 | # * Neither the name of Google Inc. nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | { 30 | 'target_defaults': { 31 | 'include_dirs': [ 32 | '..', 33 | ], 34 | }, 35 | 'targets': [ 36 | { 37 | 'target_name': 'minidump_dump', 38 | 'type': 'executable', 39 | 'sources': [ 40 | 'minidump_dump.cc', 41 | ], 42 | 'dependencies': [ 43 | 'processor', 44 | ], 45 | }, 46 | { 47 | 'target_name': 'minidump_stackwalk', 48 | 'type': 'executable', 49 | 'sources': [ 50 | 'minidump_stackwalk.cc', 51 | ], 52 | 'dependencies': [ 53 | 'processor', 54 | ], 55 | }, 56 | ], 57 | } 58 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/processor/proto/README: -------------------------------------------------------------------------------- 1 | If you wish to use these protobufs, you must generate their source files 2 | using protoc from the protobuf project (https://github.com/google/protobuf). 3 | 4 | ----- 5 | Troubleshooting for Protobuf: 6 | 7 | Install: 8 | If you are getting permission errors install, make sure you are not trying to 9 | install from an NFS. 10 | 11 | 12 | Running protoc: 13 | protoc: error while loading shared libraries: libprotobuf.so.0: cannot open 14 | shared object file: No such file or directory 15 | 16 | The issue is that Ubuntu 8.04 doesn't include /usr/local/lib in 17 | library paths. 18 | 19 | To fix it for your current terminal session, just type in 20 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 21 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/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 | -------------------------------------------------------------------------------- /Source/ThirdParty/Breakpad/src/third_party/lss/codereview.settings: -------------------------------------------------------------------------------- 1 | # This file is used by git cl to get repository specific information. 2 | CC_LIST: chromium-reviews@chromium.org,mseaborn@chromium.org 3 | CODE_REVIEW_SERVER: codereview.chromium.org 4 | GERRIT_HOST: True 5 | VIEW_VC: https://chromium.googlesource.com/linux-syscall-support/+/ 6 | -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/LICENSE: -------------------------------------------------------------------------------- 1 | Visual Studio App Center SDK for Apple platforms 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | All rights reserved. 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenter.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenter.embeddedframework.zip -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterAnalytics.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterAnalytics.embeddedframework.zip -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterAuth.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterAuth.embeddedframework.zip -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterCrashes.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterCrashes.embeddedframework.zip -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterData.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterData.embeddedframework.zip -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterDistribute.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterDistribute.embeddedframework.zip -------------------------------------------------------------------------------- /ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterPush.embeddedframework.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PushkinStudio/AppCenter-SDK-UE4/721fb66d2674ab066c5fab8e596ce93e7a344922/ThirdParty/AppCenter-SDK-Apple/iOS/AppCenterPush.embeddedframework.zip --------------------------------------------------------------------------------