├── CrashDump
├── CrashDump.uplugin
├── Resources
│ └── Icon128.png
└── Source
│ ├── CrashDump
│ ├── CrashDump.Build.cs
│ ├── CrashDump_UPL_Android.xml
│ ├── Private
│ │ └── CrashDump.cpp
│ └── Public
│ │ └── CrashDump.h
│ └── ThirdParty
│ └── GoogleBreakpad
│ ├── LICENSE
│ ├── include
│ ├── breakpad_googletest_includes.h
│ ├── client
│ │ ├── linux
│ │ │ ├── crash_generation
│ │ │ │ ├── client_info.h
│ │ │ │ ├── crash_generation_client.h
│ │ │ │ └── crash_generation_server.h
│ │ │ ├── dump_writer_common
│ │ │ │ ├── mapping_info.h
│ │ │ │ ├── raw_context_cpu.h
│ │ │ │ ├── thread_info.h
│ │ │ │ └── ucontext_reader.h
│ │ │ ├── handler
│ │ │ │ ├── exception_handler.h
│ │ │ │ ├── microdump_extra_info.h
│ │ │ │ └── minidump_descriptor.h
│ │ │ ├── log
│ │ │ │ └── log.h
│ │ │ ├── microdump_writer
│ │ │ │ └── microdump_writer.h
│ │ │ └── minidump_writer
│ │ │ │ ├── cpu_set.h
│ │ │ │ ├── directory_reader.h
│ │ │ │ ├── line_reader.h
│ │ │ │ ├── linux_core_dumper.h
│ │ │ │ ├── linux_dumper.h
│ │ │ │ ├── linux_ptrace_dumper.h
│ │ │ │ ├── minidump_writer.h
│ │ │ │ ├── minidump_writer_unittest_utils.h
│ │ │ │ └── proc_cpuinfo_reader.h
│ │ ├── minidump_file_writer-inl.h
│ │ └── minidump_file_writer.h
│ ├── common
│ │ ├── android
│ │ │ ├── include
│ │ │ │ ├── elf.h
│ │ │ │ ├── link.h
│ │ │ │ ├── sgidefs.h
│ │ │ │ ├── stab.h
│ │ │ │ ├── sys
│ │ │ │ │ ├── procfs.h
│ │ │ │ │ ├── signal.h
│ │ │ │ │ └── user.h
│ │ │ │ └── ucontext.h
│ │ │ └── ucontext_constants.h
│ │ ├── basictypes.h
│ │ ├── byte_cursor.h
│ │ ├── convert_UTF.h
│ │ ├── dwarf_cfi_to_module.h
│ │ ├── dwarf_cu_to_module.h
│ │ ├── dwarf_line_to_module.h
│ │ ├── language.h
│ │ ├── linux
│ │ │ ├── crc32.h
│ │ │ ├── dump_symbols.h
│ │ │ ├── eintr_wrapper.h
│ │ │ ├── elf_core_dump.h
│ │ │ ├── elf_gnu_compat.h
│ │ │ ├── elf_symbols_to_module.h
│ │ │ ├── elfutils-inl.h
│ │ │ ├── elfutils.h
│ │ │ ├── file_id.h
│ │ │ ├── google_crashdump_uploader.h
│ │ │ ├── guid_creator.h
│ │ │ ├── http_upload.h
│ │ │ ├── ignore_ret.h
│ │ │ ├── libcurl_wrapper.h
│ │ │ ├── linux_libc_support.h
│ │ │ ├── memory_mapped_file.h
│ │ │ ├── safe_readlink.h
│ │ │ ├── symbol_upload.h
│ │ │ └── synth_elf.h
│ │ ├── md5.h
│ │ ├── memory.h
│ │ ├── memory_range.h
│ │ ├── minidump_type_helper.h
│ │ ├── module.h
│ │ ├── scoped_ptr.h
│ │ ├── simple_string_dictionary.h
│ │ ├── stabs_reader.h
│ │ ├── stabs_to_module.h
│ │ ├── stdio_wrapper.h
│ │ ├── string_conversion.h
│ │ ├── symbol_data.h
│ │ ├── test_assembler.h
│ │ ├── unordered.h
│ │ └── using_std_string.h
│ ├── config.h
│ ├── google_breakpad
│ │ ├── common
│ │ │ ├── breakpad_types.h
│ │ │ ├── minidump_cpu_amd64.h
│ │ │ ├── minidump_cpu_arm.h
│ │ │ ├── minidump_cpu_arm64.h
│ │ │ ├── minidump_cpu_mips.h
│ │ │ ├── minidump_cpu_ppc.h
│ │ │ ├── minidump_cpu_ppc64.h
│ │ │ ├── minidump_cpu_sparc.h
│ │ │ ├── minidump_cpu_x86.h
│ │ │ ├── minidump_exception_linux.h
│ │ │ ├── minidump_exception_mac.h
│ │ │ ├── minidump_exception_ps3.h
│ │ │ ├── minidump_exception_solaris.h
│ │ │ ├── minidump_exception_win32.h
│ │ │ ├── minidump_format.h
│ │ │ └── minidump_size.h
│ │ └── processor
│ │ │ ├── basic_source_line_resolver.h
│ │ │ ├── call_stack.h
│ │ │ ├── code_module.h
│ │ │ ├── code_modules.h
│ │ │ ├── dump_context.h
│ │ │ ├── dump_object.h
│ │ │ ├── exploitability.h
│ │ │ ├── fast_source_line_resolver.h
│ │ │ ├── memory_region.h
│ │ │ ├── microdump.h
│ │ │ ├── microdump_processor.h
│ │ │ ├── minidump.h
│ │ │ ├── minidump_processor.h
│ │ │ ├── proc_maps_linux.h
│ │ │ ├── process_result.h
│ │ │ ├── process_state.h
│ │ │ ├── source_line_resolver_base.h
│ │ │ ├── source_line_resolver_interface.h
│ │ │ ├── stack_frame.h
│ │ │ ├── stack_frame_cpu.h
│ │ │ ├── stack_frame_symbolizer.h
│ │ │ ├── stackwalker.h
│ │ │ ├── symbol_supplier.h
│ │ │ └── system_info.h
│ ├── processor
│ │ ├── address_map-inl.h
│ │ ├── address_map.h
│ │ ├── basic_code_module.h
│ │ ├── basic_code_modules.h
│ │ ├── basic_source_line_resolver_types.h
│ │ ├── cfi_frame_info-inl.h
│ │ ├── cfi_frame_info.h
│ │ ├── contained_range_map-inl.h
│ │ ├── contained_range_map.h
│ │ ├── disassembler_x86.h
│ │ ├── exploitability_linux.h
│ │ ├── exploitability_win.h
│ │ ├── fast_source_line_resolver_types.h
│ │ ├── linked_ptr.h
│ │ ├── logging.h
│ │ ├── map_serializers-inl.h
│ │ ├── map_serializers.h
│ │ ├── module_comparer.h
│ │ ├── module_factory.h
│ │ ├── module_serializer.h
│ │ ├── pathname_stripper.h
│ │ ├── postfix_evaluator-inl.h
│ │ ├── postfix_evaluator.h
│ │ ├── range_map-inl.h
│ │ ├── range_map.h
│ │ ├── simple_serializer-inl.h
│ │ ├── simple_serializer.h
│ │ ├── simple_symbol_supplier.h
│ │ ├── source_line_resolver_base_types.h
│ │ ├── stackwalk_common.h
│ │ ├── stackwalker_address_list.h
│ │ ├── stackwalker_amd64.h
│ │ ├── stackwalker_arm.h
│ │ ├── stackwalker_arm64.h
│ │ ├── stackwalker_mips.h
│ │ ├── stackwalker_ppc.h
│ │ ├── stackwalker_ppc64.h
│ │ ├── stackwalker_selftest_sol.s
│ │ ├── stackwalker_sparc.h
│ │ ├── stackwalker_unittest_utils.h
│ │ ├── stackwalker_x86.h
│ │ ├── static_address_map-inl.h
│ │ ├── static_address_map.h
│ │ ├── static_contained_range_map-inl.h
│ │ ├── static_contained_range_map.h
│ │ ├── static_map-inl.h
│ │ ├── static_map.h
│ │ ├── static_map_iterator-inl.h
│ │ ├── static_map_iterator.h
│ │ ├── static_range_map-inl.h
│ │ ├── static_range_map.h
│ │ ├── symbolic_constants_win.h
│ │ ├── synth_minidump.h
│ │ ├── synth_minidump_unittest_data.h
│ │ ├── tokenize.h
│ │ └── windows_frame_info.h
│ └── third_party
│ │ └── lss
│ │ └── linux_syscall_support.h
│ └── libbreakpad_client.a
├── Extras
└── jni.zip
├── LICENSE.txt
└── README.md
/CrashDump/CrashDump.uplugin:
--------------------------------------------------------------------------------
1 | {
2 | "FileVersion": 3,
3 | "Version": 1,
4 | "VersionName": "1.0",
5 | "FriendlyName": "CrashDump",
6 | "Description": "A component which dumps NDK crashes on Android",
7 | "Category": "Other",
8 | "CreatedBy": "Damian Nowakowski",
9 | "CreatedByURL": "https://damnow.blogspot.com",
10 | "DocsURL": "",
11 | "MarketplaceURL": "",
12 | "SupportURL": "",
13 | "CanContainContent": true,
14 | "IsBetaVersion": true,
15 | "Installed": false,
16 | "Modules": [
17 | {
18 | "Name": "CrashDump",
19 | "Type": "Developer",
20 | "LoadingPhase": "Default"
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/CrashDump/Resources/Icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zompi2/UE4AndroidCrashDump/d5d3276d471cf807e7d26ed45fafe6ccfe482b23/CrashDump/Resources/Icon128.png
--------------------------------------------------------------------------------
/CrashDump/Source/CrashDump/CrashDump.Build.cs:
--------------------------------------------------------------------------------
1 | // (c) 2017 Damian Nowakowski
2 |
3 | using System;
4 | using System.IO;
5 | using UnrealBuildTool;
6 |
7 | public class CrashDump : ModuleRules
8 | {
9 | public CrashDump(ReadOnlyTargetRules Target) : base(Target)
10 | {
11 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
12 |
13 | PublicIncludePaths.AddRange(new string[] {"CrashDump/Public"});
14 | PrivateIncludePaths.AddRange(new string[] {"CrashDump/Private"});
15 | PublicDependencyModuleNames.AddRange(new string[]{"Core", "CoreUObject","Engine"});
16 |
17 | if (Target.Platform == UnrealTargetPlatform.Android &&
18 | Target.Configuration != UnrealTargetConfiguration.Shipping &&
19 | Target.Configuration != UnrealTargetConfiguration.Test)
20 | {
21 | Definitions.Add("WITH_CRASH_DUMP=1");
22 | PrivateDependencyModuleNames.AddRange(new string[] { "Launch" });
23 |
24 | string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
25 | AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "CrashDump_UPL_Android.xml")));
26 |
27 | string ThirdPartyPath = Path.Combine(ModuleDirectory, "..", "ThirdParty");
28 | PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "GoogleBreakpad", "include"));
29 | PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "GoogleBreakpad", "libbreakpad_client.a"));
30 | }
31 | else
32 | {
33 | Definitions.Add("WITH_CRASH_DUMP=0");
34 | }
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CrashDump/Source/CrashDump/CrashDump_UPL_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | import android.os.Environment;
7 |
8 |
9 |
10 |
11 | private native void setUpBreakpad(String filepath);
12 |
13 |
14 |
15 |
16 | try {
17 | String crashDumpDirectoryPath = Environment.getExternalStorageDirectory().getPath() + "/UE4CrashDumps/" + getPackageName() + "/";
18 | File crashDumpDir = new File(crashDumpDirectoryPath);
19 | if (crashDumpDir.exists() == false) {
20 | crashDumpDir.mkdirs();
21 | }
22 | setUpBreakpad(crashDumpDirectoryPath);
23 | } catch (Exception e) {
24 | Log.debug("Can't create a dir for crash dump logs. Exception: " + e);
25 | }
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/CrashDump/Source/CrashDump/Private/CrashDump.cpp:
--------------------------------------------------------------------------------
1 | // (c) 2017 Damian Nowakowski
2 |
3 | #include "CrashDump.h"
4 |
5 | #if PLATFORM_ANDROID
6 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
7 |
8 | #include "Android/AndroidJNI.h"
9 | #include "Android/AndroidApplication.h"
10 | #include
11 |
12 | #include "client/linux/handler/exception_handler.h"
13 | #include "client/linux/handler/minidump_descriptor.h"
14 |
15 | #endif
16 | #endif
17 |
18 | #define LOCTEXT_NAMESPACE "FCrashDumpModule"
19 |
20 | #if PLATFORM_ANDROID
21 | #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
22 |
23 | static google_breakpad::ExceptionHandler* exceptionHandler;
24 | bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded)
25 | {
26 | FPlatformMisc::LowLevelOutputDebugStringf(TEXT("Dumping Callstack (%i): %s"), succeeded, descriptor.path());
27 | return succeeded;
28 | }
29 |
30 | extern "C" void Java_com_epicgames_ue4_GameActivity_setUpBreakpad(JNIEnv* env, jobject obj, jstring filepath)
31 | {
32 | const char *path = env->GetStringUTFChars(filepath, 0);
33 | FPlatformMisc::LowLevelOutputDebugStringf(TEXT("Running Java_com_epicgames_ue4_GameActivity_setUpBreakpad: %s"), path);
34 | google_breakpad::MinidumpDescriptor descriptor(path);
35 | exceptionHandler = new google_breakpad::ExceptionHandler(descriptor, NULL, DumpCallback, NULL, true, -1);
36 | }
37 |
38 | #endif
39 | #endif
40 |
41 | void FCrashDumpModule::StartupModule()
42 | {
43 | }
44 |
45 | void FCrashDumpModule::ShutdownModule()
46 | {
47 | }
48 | #undef LOCTEXT_NAMESPACE
49 |
50 | IMPLEMENT_MODULE(FCrashDumpModule, CrashDump)
--------------------------------------------------------------------------------
/CrashDump/Source/CrashDump/Public/CrashDump.h:
--------------------------------------------------------------------------------
1 | // (c) 2017 Damian Nowakowski
2 |
3 | #pragma once
4 |
5 | #include "CoreMinimal.h"
6 | #include "ModuleManager.h"
7 |
8 | class FCrashDumpModule : public IModuleInterface
9 | {
10 | public:
11 |
12 | /** IModuleInterface implementation */
13 | virtual void StartupModule() override;
14 | virtual void ShutdownModule() override;
15 | };
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006, Google Inc.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | --------------------------------------------------------------------
31 |
32 | Copyright 2001-2004 Unicode, Inc.
33 |
34 | Disclaimer
35 |
36 | This source code is provided as is by Unicode, Inc. No claims are
37 | made as to fitness for any particular purpose. No warranties of any
38 | kind are expressed or implied. The recipient agrees to determine
39 | applicability of information provided. If this file has been
40 | purchased on magnetic or optical media from Unicode, Inc., the
41 | sole remedy for any claim will be exchange of defective media
42 | within 90 days of receipt.
43 |
44 | Limitations on Rights to Redistribute This Code
45 |
46 | Unicode, Inc. hereby grants the right to freely use the information
47 | supplied in this file in the creation of products supporting the
48 | Unicode Standard, and to make copies of this file in any form
49 | for internal or external distribution as long as this notice
50 | remains attached.
51 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/breakpad_googletest_includes.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef BREAKPAD_GOOGLETEST_INCLUDES_H__
31 | #define BREAKPAD_GOOGLETEST_INCLUDES_H__
32 |
33 | #include "gtest/gtest.h"
34 | #include "gmock/gmock.h"
35 |
36 | // If AddressSanitizer is used, NULL pointer dereferences generate SIGILL
37 | // (illegal instruction) instead of SIGSEGV (segmentation fault). Also,
38 | // the number of memory regions differs, so there is no point in running
39 | // this test if AddressSanitizer is used.
40 | //
41 | // Ideally we'd use this attribute to disable ASAN on a per-func basis,
42 | // but this doesn't seem to actually work, and it's changed names over
43 | // time. So just stick with disabling the actual tests.
44 | // http://crbug.com/304575
45 | //#define NO_ASAN __attribute__((no_sanitize_address))
46 | #if defined(__clang__) && defined(__has_feature)
47 | // Have to keep this check sep from above as newer gcc will barf on it.
48 | # if __has_feature(address_sanitizer)
49 | # define ADDRESS_SANITIZER
50 | # endif
51 | #elif defined(__GNUC__) && defined(__SANITIZE_ADDRESS__)
52 | # define ADDRESS_SANITIZER
53 | #else
54 | # undef ADDRESS_SANITIZER
55 | #endif
56 |
57 | #endif // BREAKPAD_GOOGLETEST_INCLUDES_H__
58 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/crash_generation/client_info.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_
31 | #define CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_
32 |
33 | namespace google_breakpad {
34 |
35 | class CrashGenerationServer;
36 |
37 | class ClientInfo {
38 | public:
39 | ClientInfo(pid_t pid, CrashGenerationServer* crash_server)
40 | : crash_server_(crash_server),
41 | pid_(pid) {}
42 |
43 | CrashGenerationServer* crash_server() const { return crash_server_; }
44 | pid_t pid() const { return pid_; }
45 |
46 | private:
47 | CrashGenerationServer* crash_server_;
48 | pid_t pid_;
49 | };
50 |
51 | }
52 |
53 | #endif // CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_
54 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/crash_generation/crash_generation_client.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_
31 | #define CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_
32 |
33 | #include "common/basictypes.h"
34 |
35 | #include
36 |
37 | namespace google_breakpad {
38 |
39 | // CrashGenerationClient is an interface for implementing out-of-process crash
40 | // dumping. The default implementation, accessed via the TryCreate() factory,
41 | // works in conjunction with the CrashGenerationServer to generate a minidump
42 | // via a remote process.
43 | class CrashGenerationClient {
44 | public:
45 | CrashGenerationClient() {}
46 | virtual ~CrashGenerationClient() {}
47 |
48 | // Request the crash server to generate a dump. |blob| is an opaque
49 | // CrashContext pointer from exception_handler.h.
50 | // Returns true if the dump was successful; false otherwise.
51 | virtual bool RequestDump(const void* blob, size_t blob_size) = 0;
52 |
53 | // Returns a new CrashGenerationClient if |server_fd| is valid and
54 | // connects to a CrashGenerationServer. Otherwise, return NULL.
55 | // The returned CrashGenerationClient* is owned by the caller of
56 | // this function.
57 | static CrashGenerationClient* TryCreate(int server_fd);
58 |
59 | private:
60 | DISALLOW_COPY_AND_ASSIGN(CrashGenerationClient);
61 | };
62 |
63 | } // namespace google_breakpad
64 |
65 | #endif // CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_
66 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/mapping_info.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_MAPPING_INFO_H_
31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_MAPPING_INFO_H_
32 |
33 | #include
34 | #include
35 | #include
36 |
37 | #include "google_breakpad/common/minidump_format.h"
38 |
39 | namespace google_breakpad {
40 |
41 | // One of these is produced for each mapping in the process (i.e. line in
42 | // /proc/$x/maps).
43 | struct MappingInfo {
44 | // On Android, relocation packing can mean that the reported start
45 | // address of the mapping must be adjusted by a bias in order to
46 | // compensate for the compression of the relocation section. The
47 | // following two members hold (after LateInit) the adjusted mapping
48 | // range. See crbug.com/606972 for more information.
49 | uintptr_t start_addr;
50 | size_t size;
51 | // When Android relocation packing causes |start_addr| and |size| to
52 | // be modified with a load bias, we need to remember the unbiased
53 | // address range. The following structure holds the original mapping
54 | // address range as reported by the operating system.
55 | struct {
56 | uintptr_t start_addr;
57 | uintptr_t end_addr;
58 | } system_mapping_info;
59 | size_t offset; // offset into the backed file.
60 | bool exec; // true if the mapping has the execute bit set.
61 | char name[NAME_MAX];
62 | };
63 |
64 | struct MappingEntry {
65 | MappingInfo first;
66 | uint8_t second[sizeof(MDGUID)];
67 | };
68 |
69 | // A list of
70 | typedef std::list MappingList;
71 |
72 | } // namespace google_breakpad
73 |
74 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_MAPPING_INFO_H_
75 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/raw_context_cpu.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_RAW_CONTEXT_CPU_H
31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_RAW_CONTEXT_CPU_H
32 |
33 | #include "google_breakpad/common/minidump_format.h"
34 |
35 | namespace google_breakpad {
36 |
37 | #if defined(__i386__)
38 | typedef MDRawContextX86 RawContextCPU;
39 | #elif defined(__x86_64)
40 | typedef MDRawContextAMD64 RawContextCPU;
41 | #elif defined(__ARM_EABI__)
42 | typedef MDRawContextARM RawContextCPU;
43 | #elif defined(__aarch64__)
44 | typedef MDRawContextARM64 RawContextCPU;
45 | #elif defined(__mips__)
46 | typedef MDRawContextMIPS RawContextCPU;
47 | #else
48 | #error "This code has not been ported to your platform yet."
49 | #endif
50 |
51 | } // namespace google_breakpad
52 |
53 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_RAW_CONTEXT_CPU_H
54 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/thread_info.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_
31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_
32 |
33 | #include
34 | #include
35 |
36 | #include "client/linux/dump_writer_common/raw_context_cpu.h"
37 | #include "common/memory.h"
38 | #include "google_breakpad/common/minidump_format.h"
39 |
40 | namespace google_breakpad {
41 |
42 | #if defined(__i386) || defined(__x86_64)
43 | typedef __typeof__(((struct user*) 0)->u_debugreg[0]) debugreg_t;
44 | #endif
45 |
46 | // We produce one of these structures for each thread in the crashed process.
47 | struct ThreadInfo {
48 | pid_t tgid; // thread group id
49 | pid_t ppid; // parent process
50 |
51 | uintptr_t stack_pointer; // thread stack pointer
52 |
53 |
54 | #if defined(__i386) || defined(__x86_64)
55 | user_regs_struct regs;
56 | user_fpregs_struct fpregs;
57 | static const unsigned kNumDebugRegisters = 8;
58 | debugreg_t dregs[8];
59 | #if defined(__i386)
60 | user_fpxregs_struct fpxregs;
61 | #endif // defined(__i386)
62 |
63 | #elif defined(__ARM_EABI__)
64 | // Mimicking how strace does this(see syscall.c, search for GETREGS)
65 | struct user_regs regs;
66 | struct user_fpregs fpregs;
67 | #elif defined(__aarch64__)
68 | // Use the structures defined in
69 | struct user_regs_struct regs;
70 | struct user_fpsimd_struct fpregs;
71 | #elif defined(__mips__)
72 | // Use the structure defined in .
73 | mcontext_t mcontext;
74 | #endif
75 |
76 | // Returns the instruction pointer (platform-dependent impl.).
77 | uintptr_t GetInstructionPointer() const;
78 |
79 | // Fills a RawContextCPU using the context in the ThreadInfo object.
80 | void FillCPUContext(RawContextCPU* out) const;
81 |
82 | // Returns the pointer and size of general purpose register area.
83 | void GetGeneralPurposeRegisters(void** gp_regs, size_t* size);
84 |
85 | // Returns the pointer and size of float point register area.
86 | void GetFloatingPointRegisters(void** fp_regs, size_t* size);
87 | };
88 |
89 | } // namespace google_breakpad
90 |
91 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_
92 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/dump_writer_common/ucontext_reader.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H
31 | #define CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H
32 |
33 | #include
34 | #include
35 |
36 | #include "client/linux/dump_writer_common/raw_context_cpu.h"
37 | #include "common/memory.h"
38 | #include "google_breakpad/common/minidump_format.h"
39 |
40 | namespace google_breakpad {
41 |
42 | // Wraps platform-dependent implementations of accessors to ucontext structs.
43 | struct UContextReader {
44 | static uintptr_t GetStackPointer(const struct ucontext* uc);
45 |
46 | static uintptr_t GetInstructionPointer(const struct ucontext* uc);
47 |
48 | // Juggle a arch-specific ucontext into a minidump format
49 | // out: the minidump structure
50 | // info: the collection of register structures.
51 | #if defined(__i386__) || defined(__x86_64)
52 | static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
53 | const struct _libc_fpstate* fp);
54 | #elif defined(__aarch64__)
55 | static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
56 | const struct fpsimd_context* fpregs);
57 | #else
58 | static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
59 | #endif
60 | };
61 |
62 | } // namespace google_breakpad
63 |
64 | #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_UCONTEXT_READER_H
65 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/handler/microdump_extra_info.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_
31 | #define CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_
32 |
33 | namespace google_breakpad {
34 |
35 | struct MicrodumpExtraInfo {
36 | // Strings pointed to by this struct are not copied, and are
37 | // expected to remain valid for the lifetime of the process.
38 | const char* build_fingerprint;
39 | const char* product_info;
40 | const char* gpu_fingerprint;
41 | const char* process_type;
42 |
43 | MicrodumpExtraInfo()
44 | : build_fingerprint(NULL),
45 | product_info(NULL),
46 | gpu_fingerprint(NULL),
47 | process_type(NULL) {}
48 | };
49 |
50 | }
51 |
52 | #endif // CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_
53 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/log/log.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_LOG_LOG_H_
31 | #define CLIENT_LINUX_LOG_LOG_H_
32 |
33 | #include
34 |
35 | namespace logger {
36 |
37 | int write(const char* buf, size_t nbytes);
38 |
39 | // In the case of Android the log can be written to the default system log
40 | // (default behavior of write() above, or to the crash log (see
41 | // writeToCrashLog() below).
42 | #if defined(__ANDROID__)
43 |
44 | // The logger must be initialized in a non-compromised context.
45 | void initializeCrashLogWriter();
46 |
47 | // Once initialized, writeToCrashLog is safe to use in a compromised context,
48 | // even if the initialization failed, in which case this will silently fall
49 | // back on write().
50 | int writeToCrashLog(const char* buf);
51 | #endif
52 |
53 | } // namespace logger
54 |
55 | #endif // CLIENT_LINUX_LOG_LOG_H_
56 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/microdump_writer/microdump_writer.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_MINIDUMP_WRITER_MICRODUMP_WRITER_H_
31 | #define CLIENT_LINUX_MINIDUMP_WRITER_MICRODUMP_WRITER_H_
32 |
33 | #include
34 | #include
35 |
36 | #include "client/linux/dump_writer_common/mapping_info.h"
37 |
38 | namespace google_breakpad {
39 |
40 | struct MicrodumpExtraInfo;
41 |
42 | // Writes a microdump (a reduced dump containing only the state of the crashing
43 | // thread) on the console (logcat on Android). These functions do not malloc nor
44 | // use libc functions which may. Thus, it can be used in contexts where the
45 | // state of the heap may be corrupt.
46 | // Args:
47 | // crashing_process: the pid of the crashing process. This must be trusted.
48 | // blob: a blob of data from the crashing process. See exception_handler.h
49 | // blob_size: the length of |blob| in bytes.
50 | // mappings: a list of additional mappings provided by the application.
51 | // build_fingerprint: a (optional) C string which determines the OS
52 | // build fingerprint (e.g., aosp/occam/mako:5.1.1/LMY47W/1234:eng/dev-keys).
53 | // product_info: a (optional) C string which determines the product name and
54 | // version (e.g., WebView:42.0.2311.136).
55 | //
56 | // Returns true iff successful.
57 | bool WriteMicrodump(pid_t crashing_process,
58 | const void* blob,
59 | size_t blob_size,
60 | const MappingList& mappings,
61 | bool skip_dump_if_main_module_not_referenced,
62 | uintptr_t address_within_main_module,
63 | bool sanitize_stack,
64 | const MicrodumpExtraInfo& microdump_extra_info);
65 |
66 | } // namespace google_breakpad
67 |
68 | #endif // CLIENT_LINUX_MINIDUMP_WRITER_MICRODUMP_WRITER_H_
69 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/minidump_writer/directory_reader.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_
31 | #define CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 |
40 | #include "common/linux/linux_libc_support.h"
41 | #include "third_party/lss/linux_syscall_support.h"
42 |
43 | namespace google_breakpad {
44 |
45 | // A class for enumerating a directory without using diropen/readdir or other
46 | // functions which may allocate memory.
47 | class DirectoryReader {
48 | public:
49 | DirectoryReader(int fd)
50 | : fd_(fd),
51 | buf_used_(0) {
52 | }
53 |
54 | // Return the next entry from the directory
55 | // name: (output) the NUL terminated entry name
56 | //
57 | // Returns true iff successful (false on EOF).
58 | //
59 | // After calling this, one must call |PopEntry| otherwise you'll get the same
60 | // entry over and over.
61 | bool GetNextEntry(const char** name) {
62 | struct kernel_dirent* const dent =
63 | reinterpret_cast(buf_);
64 |
65 | if (buf_used_ == 0) {
66 | // need to read more entries.
67 | const int n = sys_getdents(fd_, dent, sizeof(buf_));
68 | if (n < 0) {
69 | return false;
70 | } else if (n == 0) {
71 | hit_eof_ = true;
72 | } else {
73 | buf_used_ += n;
74 | }
75 | }
76 |
77 | if (buf_used_ == 0 && hit_eof_)
78 | return false;
79 |
80 | assert(buf_used_ > 0);
81 |
82 | *name = dent->d_name;
83 | return true;
84 | }
85 |
86 | void PopEntry() {
87 | if (!buf_used_)
88 | return;
89 |
90 | const struct kernel_dirent* const dent =
91 | reinterpret_cast(buf_);
92 |
93 | buf_used_ -= dent->d_reclen;
94 | my_memmove(buf_, buf_ + dent->d_reclen, buf_used_);
95 | }
96 |
97 | private:
98 | const int fd_;
99 | bool hit_eof_;
100 | unsigned buf_used_;
101 | uint8_t buf_[sizeof(struct kernel_dirent) + NAME_MAX + 1];
102 | };
103 |
104 | } // namespace google_breakpad
105 |
106 | #endif // CLIENT_LINUX_MINIDUMP_WRITER_DIRECTORY_READER_H_
107 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/linux/minidump_writer/minidump_writer_unittest_utils.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // minidump_writer_unittest_utils.h:
31 | // Shared routines used by unittests under client/linux/minidump_writer.
32 |
33 | #ifndef CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_UNITTEST_UTILS_H_
34 | #define CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_UNITTEST_UTILS_H_
35 |
36 | #include
37 |
38 | #include "common/using_std_string.h"
39 |
40 | namespace google_breakpad {
41 |
42 | // Returns the full path to linux_dumper_unittest_helper. The full path is
43 | // discovered either by using the environment variable "bindir" or by using
44 | // the location of the main module of the currently running process.
45 | string GetHelperBinary();
46 |
47 | } // namespace google_breakpad
48 |
49 | #endif // CLIENT_LINUX_MINIDUMP_WRITER_MINIDUMP_WRITER_UNITTEST_UTILS_H_
50 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/client/minidump_file_writer-inl.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // minidump_file_writer-inl.h: Minidump file writer implementation.
31 | //
32 | // See minidump_file_writer.h for documentation.
33 |
34 | #ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__
35 | #define CLIENT_MINIDUMP_FILE_WRITER_INL_H__
36 |
37 | #include
38 |
39 | #include "client/minidump_file_writer.h"
40 | #include "google_breakpad/common/minidump_size.h"
41 |
42 | namespace google_breakpad {
43 |
44 | template
45 | inline bool TypedMDRVA::Allocate() {
46 | allocation_state_ = SINGLE_OBJECT;
47 | return UntypedMDRVA::Allocate(minidump_size::size());
48 | }
49 |
50 | template
51 | inline bool TypedMDRVA::Allocate(size_t additional) {
52 | allocation_state_ = SINGLE_OBJECT;
53 | return UntypedMDRVA::Allocate(minidump_size::size() + additional);
54 | }
55 |
56 | template
57 | inline bool TypedMDRVA::AllocateArray(size_t count) {
58 | assert(count);
59 | allocation_state_ = ARRAY;
60 | return UntypedMDRVA::Allocate(minidump_size::size() * count);
61 | }
62 |
63 | template
64 | inline bool TypedMDRVA::AllocateObjectAndArray(size_t count,
65 | size_t length) {
66 | assert(count && length);
67 | allocation_state_ = SINGLE_OBJECT_WITH_ARRAY;
68 | return UntypedMDRVA::Allocate(minidump_size::size() + count * length);
69 | }
70 |
71 | template
72 | inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) {
73 | assert(allocation_state_ == ARRAY);
74 | return writer_->Copy(
75 | static_cast(position_ + index * minidump_size::size()),
76 | item, minidump_size::size());
77 | }
78 |
79 | template
80 | inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index,
81 | const void *src,
82 | size_t length) {
83 | assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY);
84 | return writer_->Copy(
85 | static_cast(position_ + minidump_size::size()
86 | + index * length),
87 | src, length);
88 | }
89 |
90 | template
91 | inline bool TypedMDRVA::Flush() {
92 | return writer_->Copy(position_, &data_, minidump_size::size());
93 | }
94 |
95 | } // namespace google_breakpad
96 |
97 | #endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__
98 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/link.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H
31 | #define GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H
32 |
33 | /* Android doesn't provide all the data-structures required in its .
34 | Provide custom version here. */
35 | #include_next
36 |
37 | // TODO(rmcilroy): Remove this file once the ndk is updated for other
38 | // architectures - crbug.com/358831
39 | #if !defined(__aarch64__) && !defined(__x86_64__) && \
40 | !(defined(__mips__) && _MIPS_SIM == _ABI64)
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif // __cplusplus
45 |
46 | struct r_debug {
47 | int r_version;
48 | struct link_map* r_map;
49 | ElfW(Addr) r_brk;
50 | enum {
51 | RT_CONSISTENT,
52 | RT_ADD,
53 | RT_DELETE } r_state;
54 | ElfW(Addr) r_ldbase;
55 | };
56 |
57 | struct link_map {
58 | ElfW(Addr) l_addr;
59 | char* l_name;
60 | ElfW(Dyn)* l_ld;
61 | struct link_map* l_next;
62 | struct link_map* l_prev;
63 | };
64 |
65 | #ifdef __cplusplus
66 | } // extern "C"
67 | #endif // __cplusplus
68 |
69 | #endif // !defined(__aarch64__) && !defined(__x86_64__)
70 |
71 | #endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */
72 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/sgidefs.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H
31 | #define GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H
32 |
33 | #ifdef __mips__
34 |
35 | // Android doesn't contain sgidefs.h, but does have which
36 | // contains what we need.
37 | #include
38 |
39 | #endif // __mips__
40 |
41 | #endif // GOOGLE_BREAKPAD_ANDROID_INCLUDE_SGIDEFS_H
42 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/stab.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
32 |
33 | #include
34 |
35 | #ifdef __BIONIC_HAVE_STAB_H
36 | #include
37 | #else
38 |
39 | #ifdef __cplusplus
40 | extern "C" {
41 | #endif // __cplusplus
42 |
43 | #define _STAB_CODE_LIST \
44 | _STAB_CODE_DEF(UNDF,0x00) \
45 | _STAB_CODE_DEF(GSYM,0x20) \
46 | _STAB_CODE_DEF(FNAME,0x22) \
47 | _STAB_CODE_DEF(FUN,0x24) \
48 | _STAB_CODE_DEF(STSYM,0x26) \
49 | _STAB_CODE_DEF(LCSYM,0x28) \
50 | _STAB_CODE_DEF(MAIN,0x2a) \
51 | _STAB_CODE_DEF(PC,0x30) \
52 | _STAB_CODE_DEF(NSYMS,0x32) \
53 | _STAB_CODE_DEF(NOMAP,0x34) \
54 | _STAB_CODE_DEF(OBJ,0x38) \
55 | _STAB_CODE_DEF(OPT,0x3c) \
56 | _STAB_CODE_DEF(RSYM,0x40) \
57 | _STAB_CODE_DEF(M2C,0x42) \
58 | _STAB_CODE_DEF(SLINE,0x44) \
59 | _STAB_CODE_DEF(DSLINE,0x46) \
60 | _STAB_CODE_DEF(BSLINE,0x48) \
61 | _STAB_CODE_DEF(BROWS,0x48) \
62 | _STAB_CODE_DEF(DEFD,0x4a) \
63 | _STAB_CODE_DEF(EHDECL,0x50) \
64 | _STAB_CODE_DEF(MOD2,0x50) \
65 | _STAB_CODE_DEF(CATCH,0x54) \
66 | _STAB_CODE_DEF(SSYM,0x60) \
67 | _STAB_CODE_DEF(SO,0x64) \
68 | _STAB_CODE_DEF(LSYM,0x80) \
69 | _STAB_CODE_DEF(BINCL,0x82) \
70 | _STAB_CODE_DEF(SOL,0x84) \
71 | _STAB_CODE_DEF(PSYM,0xa0) \
72 | _STAB_CODE_DEF(EINCL,0xa2) \
73 | _STAB_CODE_DEF(ENTRY,0xa4) \
74 | _STAB_CODE_DEF(LBRAC,0xc0) \
75 | _STAB_CODE_DEF(EXCL,0xc2) \
76 | _STAB_CODE_DEF(SCOPE,0xc4) \
77 | _STAB_CODE_DEF(RBRAC,0xe0) \
78 | _STAB_CODE_DEF(BCOMM,0xe2) \
79 | _STAB_CODE_DEF(ECOMM,0xe4) \
80 | _STAB_CODE_DEF(ECOML,0xe8) \
81 | _STAB_CODE_DEF(NBTEXT,0xf0) \
82 | _STAB_CODE_DEF(NBDATA,0xf2) \
83 | _STAB_CODE_DEF(NBBSS,0xf4) \
84 | _STAB_CODE_DEF(NBSTS,0xf6) \
85 | _STAB_CODE_DEF(NBLCS,0xf8) \
86 | _STAB_CODE_DEF(LENG,0xfe)
87 |
88 | enum __stab_debug_code {
89 | #define _STAB_CODE_DEF(x,y) N_##x = y,
90 | _STAB_CODE_LIST
91 | #undef _STAB_CODE_DEF
92 | };
93 |
94 | #ifdef __cplusplus
95 | } // extern "C"
96 | #endif // __cplusplus
97 |
98 | #endif // __BIONIC_HAVE_STAB_H
99 |
100 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
101 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/sys/signal.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
32 |
33 | #include
34 |
35 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
36 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/sys/user.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H
31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H
32 |
33 | // The purpose of this file is to glue the mismatching headers (Android NDK vs
34 | // glibc) and therefore avoid doing otherwise awkward #ifdefs in the code.
35 | // The following quirks are currently handled by this file:
36 | // - i386: Use the Android NDK but alias user_fxsr_struct > user_fpxregs_struct.
37 | // - aarch64:
38 | // - NDK r10: Add missing user_regs_struct and user_fpsimd_struct structs.
39 | // - NDK r11+: Add missing include
40 | // - Other platforms: Just use the Android NDK unchanged.
41 |
42 | // TODO(primiano): remove these changes after Chromium has stably rolled to
43 | // an NDK with the appropriate fixes.
44 |
45 | #if defined(ANDROID_NDK_MAJOR_VERSION) && ANDROID_NDK_MAJOR_VERSION > 10
46 | #ifdef __aarch64__
47 | #include
48 | #endif // __aarch64__
49 | #endif // defined(ANDROID_NDK_MAJOR_VERSION) && ANDROID_NDK_MAJOR_VERSION > 10
50 |
51 | #include_next
52 |
53 | #ifdef __i386__
54 | #ifdef __cplusplus
55 | extern "C" {
56 | #endif // __cplusplus
57 | typedef struct user_fxsr_struct user_fpxregs_struct;
58 | #ifdef __cplusplus
59 | } // extern "C"
60 | #endif // __cplusplus
61 | #endif // __i386__
62 |
63 | #if !defined(ANDROID_NDK_MAJOR_VERSION) || ANDROID_NDK_MAJOR_VERSION == 10
64 | #ifdef __aarch64__
65 | #ifdef __cplusplus
66 | extern "C" {
67 | #endif // __cplusplus
68 | struct user_regs_struct {
69 | __u64 regs[31];
70 | __u64 sp;
71 | __u64 pc;
72 | __u64 pstate;
73 | };
74 | struct user_fpsimd_struct {
75 | __uint128_t vregs[32];
76 | __u32 fpsr;
77 | __u32 fpcr;
78 | };
79 | #ifdef __cplusplus
80 | } // extern "C"
81 | #endif // __cplusplus
82 | #endif // __aarch64__
83 | #endif // defined(ANDROID_NDK_VERSION) && ANDROID_NDK_MAJOR_VERSION == 10
84 |
85 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H
86 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/android/include/ucontext.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
32 |
33 | #include
34 |
35 | #ifdef __BIONIC_UCONTEXT_H
36 | #include
37 | #else
38 |
39 | #include
40 |
41 | #ifdef __cplusplus
42 | extern "C" {
43 | #endif // __cplusplus
44 |
45 | // Provided by src/android/common/breakpad_getcontext.S
46 | int breakpad_getcontext(ucontext_t* ucp);
47 |
48 | #define getcontext(x) breakpad_getcontext(x)
49 |
50 | #ifdef __cplusplus
51 | } // extern "C"
52 | #endif // __cplusplus
53 |
54 | #endif // __BIONIC_UCONTEXT_H
55 |
56 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
57 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/basictypes.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2011 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_BASICTYPES_H_
31 | #define COMMON_BASICTYPES_H_
32 |
33 | // A macro to disallow the copy constructor and operator= functions
34 | // This should be used in the private: declarations for a class
35 | #ifndef DISALLOW_COPY_AND_ASSIGN
36 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
37 | TypeName(const TypeName&); \
38 | void operator=(const TypeName&)
39 | #endif // DISALLOW_COPY_AND_ASSIGN
40 |
41 | namespace google_breakpad {
42 |
43 | // Used to explicitly mark the return value of a function as unused. If you are
44 | // really sure you don't want to do anything with the return value of a function
45 | // that has been marked with __attribute__((warn_unused_result)), wrap it with
46 | // this. Example:
47 | //
48 | // scoped_ptr my_var = ...;
49 | // if (TakeOwnership(my_var.get()) == SUCCESS)
50 | // ignore_result(my_var.release());
51 | //
52 | template
53 | inline void ignore_result(const T&) {
54 | }
55 |
56 | } // namespace google_breakpad
57 |
58 | #endif // COMMON_BASICTYPES_H_
59 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/crc32.h:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_CRC32_H_
31 | #define COMMON_LINUX_CRC32_H_
32 |
33 | #include
34 |
35 | #include
36 |
37 | namespace google_breakpad {
38 |
39 | // Updates a CRC32 checksum with |len| bytes from |buf|. |initial| holds the
40 | // checksum result from the previous update; for the first call, it should be 0.
41 | uint32_t UpdateCrc32(uint32_t initial, const void* buf, size_t len);
42 |
43 | // Computes a CRC32 checksum using |len| bytes from |buf|.
44 | inline uint32_t ComputeCrc32(const void* buf, size_t len) {
45 | return UpdateCrc32(0, buf, len);
46 | }
47 | inline uint32_t ComputeCrc32(const std::string& str) {
48 | return ComputeCrc32(str.c_str(), str.size());
49 | }
50 |
51 | } // namespace google_breakpad
52 |
53 | #endif // COMMON_LINUX_CRC32_H_
54 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/dump_symbols.h:
--------------------------------------------------------------------------------
1 | // -*- mode: c++ -*-
2 |
3 | // Copyright (c) 2011, Google Inc.
4 | // All rights reserved.
5 | //
6 | // Redistribution and use in source and binary forms, with or without
7 | // modification, are permitted provided that the following conditions are
8 | // met:
9 | //
10 | // * Redistributions of source code must retain the above copyright
11 | // notice, this list of conditions and the following disclaimer.
12 | // * Redistributions in binary form must reproduce the above
13 | // copyright notice, this list of conditions and the following disclaimer
14 | // in the documentation and/or other materials provided with the
15 | // distribution.
16 | // * Neither the name of Google Inc. nor the names of its
17 | // contributors may be used to endorse or promote products derived from
18 | // this software without specific prior written permission.
19 | //
20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | // dump_symbols.h: Read debugging information from an ELF file, and write
33 | // it out as a Breakpad symbol file.
34 |
35 | #ifndef COMMON_LINUX_DUMP_SYMBOLS_H__
36 | #define COMMON_LINUX_DUMP_SYMBOLS_H__
37 |
38 | #include
39 | #include
40 | #include
41 |
42 | #include "common/symbol_data.h"
43 | #include "common/using_std_string.h"
44 |
45 | namespace google_breakpad {
46 |
47 | class Module;
48 |
49 | struct DumpOptions {
50 | DumpOptions(SymbolData symbol_data, bool handle_inter_cu_refs)
51 | : symbol_data(symbol_data),
52 | handle_inter_cu_refs(handle_inter_cu_refs) {
53 | }
54 |
55 | SymbolData symbol_data;
56 | bool handle_inter_cu_refs;
57 | };
58 |
59 | // Find all the debugging information in OBJ_FILE, an ELF executable
60 | // or shared library, and write it to SYM_STREAM in the Breakpad symbol
61 | // file format.
62 | // If OBJ_FILE has been stripped but contains a .gnu_debuglink section,
63 | // then look for the debug file in DEBUG_DIRS.
64 | // SYMBOL_DATA allows limiting the type of symbol data written.
65 | bool WriteSymbolFile(const string &obj_file,
66 | const std::vector& debug_dirs,
67 | const DumpOptions& options,
68 | std::ostream &sym_stream);
69 |
70 | // Read the selected object file's debugging information, and write out the
71 | // header only to |stream|. Return true on success; if an error occurs, report
72 | // it and return false.
73 | bool WriteSymbolFileHeader(const string& obj_file,
74 | std::ostream &sym_stream);
75 |
76 | // As above, but simply return the debugging information in MODULE
77 | // instead of writing it to a stream. The caller owns the resulting
78 | // Module object and must delete it when finished.
79 | bool ReadSymbolData(const string& obj_file,
80 | const std::vector& debug_dirs,
81 | const DumpOptions& options,
82 | Module** module);
83 |
84 | } // namespace google_breakpad
85 |
86 | #endif // COMMON_LINUX_DUMP_SYMBOLS_H__
87 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/eintr_wrapper.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_EINTR_WRAPPER_H_
31 | #define COMMON_LINUX_EINTR_WRAPPER_H_
32 |
33 | #include
34 |
35 | // This provides a wrapper around system calls which may be interrupted by a
36 | // signal and return EINTR. See man 7 signal.
37 | //
38 |
39 | #define HANDLE_EINTR(x) ({ \
40 | __typeof__(x) eintr_wrapper_result; \
41 | do { \
42 | eintr_wrapper_result = (x); \
43 | } while (eintr_wrapper_result == -1 && errno == EINTR); \
44 | eintr_wrapper_result; \
45 | })
46 |
47 | #define IGNORE_EINTR(x) ({ \
48 | __typeof__(x) eintr_wrapper_result; \
49 | do { \
50 | eintr_wrapper_result = (x); \
51 | if (eintr_wrapper_result == -1 && errno == EINTR) { \
52 | eintr_wrapper_result = 0; \
53 | } \
54 | } while (0); \
55 | eintr_wrapper_result; \
56 | })
57 |
58 | #endif // COMMON_LINUX_EINTR_WRAPPER_H_
59 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/elf_gnu_compat.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++ -*-
2 |
3 | // Copyright (c) 2013, Google Inc.
4 | // All rights reserved.
5 | //
6 | // Redistribution and use in source and binary forms, with or without
7 | // modification, are permitted provided that the following conditions are
8 | // met:
9 | //
10 | // * Redistributions of source code must retain the above copyright
11 | // notice, this list of conditions and the following disclaimer.
12 | // * Redistributions in binary form must reproduce the above
13 | // copyright notice, this list of conditions and the following disclaimer
14 | // in the documentation and/or other materials provided with the
15 | // distribution.
16 | // * Neither the name of Google Inc. nor the names of its
17 | // contributors may be used to endorse or promote products derived from
18 | // this software without specific prior written permission.
19 | //
20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | // Original author: Lei Zhang
33 |
34 | // elf_gnu_compat.h: #defines unique to glibc's elf.h.
35 |
36 | #ifndef COMMON_LINUX_ELF_GNU_COMPAT_H_
37 | #define COMMON_LINUX_ELF_GNU_COMPAT_H_
38 |
39 | #include
40 |
41 | // A note type on GNU systems corresponding to the .note.gnu.build-id section.
42 | #ifndef NT_GNU_BUILD_ID
43 | #define NT_GNU_BUILD_ID 3
44 | #endif
45 |
46 | #endif // COMMON_LINUX_ELF_GNU_COMPAT_H_
47 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/elf_symbols_to_module.h:
--------------------------------------------------------------------------------
1 | // -*- mode: c++ -*-
2 |
3 | // Copyright (c) 2011 Google Inc. All Rights Reserved.
4 | //
5 | // Redistribution and use in source and binary forms, with or without
6 | // modification, are permitted provided that the following conditions are
7 | // met:
8 | //
9 | // * Redistributions of source code must retain the above copyright
10 | // notice, this list of conditions and the following disclaimer.
11 | // * Redistributions in binary form must reproduce the above
12 | // copyright notice, this list of conditions and the following disclaimer
13 | // in the documentation and/or other materials provided with the
14 | // distribution.
15 | // * Neither the name of Google Inc. nor the names of its
16 | // contributors may be used to endorse or promote products derived from
17 | // this software without specific prior written permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | // Original author: Ted Mielczarek
32 |
33 | // elf_symbols_to_module.h: Exposes ELFSymbolsToModule, a function
34 | // for reading ELF symbol tables and inserting exported symbol names
35 | // into a google_breakpad::Module as Extern definitions.
36 |
37 | #ifndef BREAKPAD_COMMON_LINUX_ELF_SYMBOLS_TO_MODULE_H_
38 | #define BREAKPAD_COMMON_LINUX_ELF_SYMBOLS_TO_MODULE_H_
39 |
40 | #include
41 | #include
42 |
43 | namespace google_breakpad {
44 |
45 | class Module;
46 |
47 | bool ELFSymbolsToModule(const uint8_t *symtab_section,
48 | size_t symtab_size,
49 | const uint8_t *string_section,
50 | size_t string_size,
51 | const bool big_endian,
52 | size_t value_size,
53 | Module *module);
54 |
55 | } // namespace google_breakpad
56 |
57 |
58 | #endif // BREAKPAD_COMMON_LINUX_ELF_SYMBOLS_TO_MODULE_H_
59 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/elfutils-inl.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_ELFUTILS_INL_H__
31 | #define COMMON_LINUX_ELFUTILS_INL_H__
32 |
33 | #include "common/linux/linux_libc_support.h"
34 | #include "elfutils.h"
35 |
36 | namespace google_breakpad {
37 |
38 | template
39 | const T* GetOffset(const typename ElfClass::Ehdr* elf_header,
40 | typename ElfClass::Off offset) {
41 | return reinterpret_cast(reinterpret_cast(elf_header) +
42 | offset);
43 | }
44 |
45 | template
46 | const typename ElfClass::Shdr* FindElfSectionByName(
47 | const char* name,
48 | typename ElfClass::Word section_type,
49 | const typename ElfClass::Shdr* sections,
50 | const char* section_names,
51 | const char* names_end,
52 | int nsection) {
53 | assert(name != NULL);
54 | assert(sections != NULL);
55 | assert(nsection > 0);
56 |
57 | int name_len = my_strlen(name);
58 | if (name_len == 0)
59 | return NULL;
60 |
61 | for (int i = 0; i < nsection; ++i) {
62 | const char* section_name = section_names + sections[i].sh_name;
63 | if (sections[i].sh_type == section_type &&
64 | names_end - section_name >= name_len + 1 &&
65 | my_strcmp(name, section_name) == 0) {
66 | return sections + i;
67 | }
68 | }
69 | return NULL;
70 | }
71 |
72 | } // namespace google_breakpad
73 |
74 | #endif // COMMON_LINUX_ELFUTILS_INL_H__
75 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/file_id.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // file_id.h: Return a unique identifier for a file
31 | //
32 |
33 | #ifndef COMMON_LINUX_FILE_ID_H__
34 | #define COMMON_LINUX_FILE_ID_H__
35 |
36 | #include
37 | #include
38 |
39 | #include "common/linux/guid_creator.h"
40 | #include "common/memory.h"
41 | #include "common/using_std_string.h"
42 |
43 | namespace google_breakpad {
44 |
45 | // GNU binutils' ld defaults to 'sha1', which is 160 bits == 20 bytes,
46 | // so this is enough to fit that, which most binaries will use.
47 | // This is just a sensible default for auto_wasteful_vector so most
48 | // callers can get away with stack allocation.
49 | static const size_t kDefaultBuildIdSize = 20;
50 |
51 | class FileID {
52 | public:
53 | explicit FileID(const char* path);
54 | ~FileID() {}
55 |
56 | // Load the identifier for the elf file path specified in the constructor into
57 | // |identifier|.
58 | //
59 | // The current implementation will look for a .note.gnu.build-id
60 | // section and use that as the file id, otherwise it falls back to
61 | // XORing the first 4096 bytes of the .text section to generate an identifier.
62 | bool ElfFileIdentifier(wasteful_vector& identifier);
63 |
64 | // Load the identifier for the elf file mapped into memory at |base| into
65 | // |identifier|. Return false if the identifier could not be created for this
66 | // file.
67 | static bool ElfFileIdentifierFromMappedFile(
68 | const void* base,
69 | wasteful_vector& identifier);
70 |
71 | // Convert the |identifier| data to a string. The string will
72 | // be formatted as a UUID in all uppercase without dashes.
73 | // (e.g., 22F065BBFC9C49F780FE26A7CEBD7BCE).
74 | static string ConvertIdentifierToUUIDString(
75 | const wasteful_vector& identifier);
76 |
77 | // Convert the entire |identifier| data to a hex string.
78 | static string ConvertIdentifierToString(
79 | const wasteful_vector& identifier);
80 |
81 | private:
82 | // Storage for the path specified
83 | string path_;
84 | };
85 |
86 | } // namespace google_breakpad
87 |
88 | #endif // COMMON_LINUX_FILE_ID_H__
89 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/guid_creator.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_GUID_CREATOR_H__
31 | #define COMMON_LINUX_GUID_CREATOR_H__
32 |
33 | #include "google_breakpad/common/minidump_format.h"
34 |
35 | typedef MDGUID GUID;
36 |
37 | // Format string for parsing GUID.
38 | #define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x"
39 | // Length of GUID string. Don't count the ending '\0'.
40 | #define kGUIDStringLength 36
41 |
42 | // Create a guid.
43 | bool CreateGUID(GUID *guid);
44 |
45 | // Get the string from guid.
46 | bool GUIDToString(const GUID *guid, char *buf, int buf_len);
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/ignore_ret.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_IGNORE_RET_H_
31 | #define COMMON_LINUX_IGNORE_RET_H_
32 |
33 | // Some compilers are prone to warn about unused return values. In cases where
34 | // either a) the call cannot fail, or b) there is nothing that can be done when
35 | // the call fails, IGNORE_RET() can be used to mark the return code as ignored.
36 | // This avoids spurious compiler warnings.
37 |
38 | #define IGNORE_RET(x) do { if (x) {} } while (0)
39 |
40 | #endif // COMMON_LINUX_IGNORE_RET_H_
41 |
--------------------------------------------------------------------------------
/CrashDump/Source/ThirdParty/GoogleBreakpad/include/common/linux/libcurl_wrapper.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A wrapper for libcurl to do HTTP Uploads, to support easy mocking
31 | // and unit testing of the HTTPUpload class.
32 |
33 | #ifndef COMMON_LINUX_LIBCURL_WRAPPER_H_
34 | #define COMMON_LINUX_LIBCURL_WRAPPER_H_
35 |
36 | #include
37 | #include