7 | * author : devyk on 2019-09-18 01:29
8 | * blog : https://juejin.im/user/578259398ac2470061f3a3fb/posts
9 | * github : https://github.com/yangkun19921001
10 | * mailbox : yang1001yk@gmail.com
11 | * desc : This is ICrash
12 | *
13 | */
14 | public interface ICrash {
15 |
16 | void init(Context context, String logPath);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/x86_imm.h:
--------------------------------------------------------------------------------
1 | #ifndef x86_IMM_H
2 | #define x86_IMM_H
3 |
4 | #include "./qword.h"
5 | #include
6 |
7 | #ifdef WIN32
8 | #include
9 | #endif
10 |
11 | /* these are in the global x86 namespace but are not a part of the
12 | * official API */
13 | unsigned int x86_imm_sized( unsigned char *buf, size_t buf_len, void *dest,
14 | unsigned int size );
15 |
16 | unsigned int x86_imm_signsized( unsigned char *buf, size_t buf_len, void *dest,
17 | unsigned int size );
18 | #endif
19 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/android/include/asm-mips/README.md:
--------------------------------------------------------------------------------
1 | # asm-mips
2 |
3 | The files in this directory are almost direct copies from Android NDK r12, with
4 | the exception of changing the include guards to Breakpad ones. They are copied
5 | from the MIPS asm/ directory, but are meant to be used as replacements for both
6 | asm/ and machine/ includes since the files in each are largely duplicates.
7 |
8 | Some MIPS asm/ and all machine/ headers were removed in the move to unified NDK
9 | headers, so Breakpad fails to compile on newer NDK versions without these files.
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/md5.h:
--------------------------------------------------------------------------------
1 | // Copyright 2007 Google Inc. All Rights Reserved.
2 | // Author: liuli@google.com (Liu Li)
3 | #ifndef COMMON_MD5_H__
4 | #define COMMON_MD5_H__
5 |
6 | #include
7 |
8 | namespace google_breakpad {
9 |
10 | typedef uint32_t u32;
11 | typedef uint8_t u8;
12 |
13 | struct MD5Context {
14 | u32 buf[4];
15 | u32 bits[2];
16 | u8 in[64];
17 | };
18 |
19 | void MD5Init(struct MD5Context *ctx);
20 |
21 | void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len);
22 |
23 | void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
24 |
25 | } // namespace google_breakpad
26 |
27 | #endif // COMMON_MD5_H__
28 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/test/java/com/devyk/crash_module/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.devyk.crash_module;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 |
18 |
19 | @Test
20 | public void test() {
21 | // new Crash.CrashBuild(null).
22 | // nativeCrashPath("").
23 | // javaCrashPath("", null).
24 | // build();
25 | }
26 | }
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/proto/README:
--------------------------------------------------------------------------------
1 | If you wish to use these protobufs, you must generate their source files
2 | using protoc from the protobuf project (https://github.com/google/protobuf).
3 |
4 | -----
5 | Troubleshooting for Protobuf:
6 |
7 | Install:
8 | If you are getting permission errors install, make sure you are not trying to
9 | install from an NFS.
10 |
11 |
12 | Running protoc:
13 | protoc: error while loading shared libraries: libprotobuf.so.0: cannot open
14 | shared object file: No such file or directory
15 |
16 | The issue is that Ubuntu 8.04 doesn't include /usr/local/lib in
17 | library paths.
18 |
19 | To fix it for your current terminal session, just type in
20 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
21 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/java/com/devyk/crash_module/inter/NativeCrashImp.java:
--------------------------------------------------------------------------------
1 | package com.devyk.crash_module.inter;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | *
7 | * author : devyk on 2019-09-18 01:30
8 | * blog : https://juejin.im/user/578259398ac2470061f3a3fb/posts
9 | * github : https://github.com/yangkun19921001
10 | * mailbox : yang1001yk@gmail.com
11 | * desc : This is NativeCrashImp
12 | *
13 | */
14 | public class NativeCrashImp implements ICrash {
15 |
16 | static {
17 | System.loadLibrary("breakpad-core");
18 | }
19 |
20 | private static native void initBreakpadNative(String path);
21 |
22 | @Override
23 | public void init(Context context, String logPath) {
24 | initBreakpadNative(logPath);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/module2.out:
--------------------------------------------------------------------------------
1 | MODULE windows x86 222222222 module2.pdb
2 | FILE 1 file2_1.cc
3 | FILE 2 file2_2.cc
4 | FILE 3 file2_3.cc
5 | FUNC 2000 c 4 Function2_1
6 | 1000 4 54 1
7 | 1004 4 55 1
8 | 1008 4 56 1
9 | PUBLIC 2160 0 Public2_1
10 | FUNC 2170 14 4 Function2_2
11 | 2170 6 10 2
12 | 2176 4 12 2
13 | 217a 6 13 2
14 | 2180 4 21 2
15 | PUBLIC 21a0 0 Public2_2
16 | STACK WIN 4 2000 c 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =
17 | STACK WIN 4 2170 14 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =
18 | STACK CFI INIT 3df0 af .cfa: $esp 4 + .ra: .cfa 4 - ^
19 | STACK CFI 3df1 .cfa: $esp 8 +
20 | STACK CFI 3df3 .cfa: $ebp 8 + $ebp: .cfa 8 - ^
21 | STACK CFI 3e04 $ebx: .cfa 20 - ^
22 | STACK CFI 3e0a $esi: .cfa 16 - ^
23 | STACK CFI 3e34 $edi: .cfa 12 - ^
24 |
--------------------------------------------------------------------------------
/app/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | cmake_minimum_required(VERSION 3.4.1)
3 |
4 |
5 | add_library( # Sets the name of the library.
6 | crash-lib
7 |
8 | # Sets the library as a shared library.
9 | SHARED
10 |
11 | # Provides a relative path to your source file(s).
12 | src/main/cpp/crash.cpp)
13 |
14 | find_library( # Sets the name of the path variable.
15 | log-lib
16 |
17 | # Specifies the name of the NDK library that
18 | # you want CMake to locate.
19 | log )
20 |
21 |
22 | target_link_libraries( # Specifies the target library.
23 | crash-lib
24 |
25 | # Links the target library to the log library
26 | # included in the NDK.
27 | ${log-lib} )
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/crash_breakpad_build/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
16 |
17 |
18 |
23 |
24 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/androidTest/java/com/devyk/crash_module/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.devyk.crash_module;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.InstrumentationRegistry;
6 | import androidx.test.runner.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.devyk.crash_module.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.4.1)
2 | project(breakpad-core)
3 |
4 | set(ENABLE_INPROCESS ON)
5 | set(ENABLE_OUTOFPROCESS ON)
6 | set(ENABLE_LIBCORKSCREW ON)
7 | set(ENABLE_LIBUNWIND ON)
8 | set(ENABLE_LIBUNWINDSTACK ON)
9 | set(ENABLE_CXXABI ON)
10 | set(ENABLE_STACKSCAN ON)
11 |
12 | if (${ENABLE_INPROCESS})
13 | add_definitions(-DENABLE_INPROCESS)
14 | endif ()
15 | if (${ENABLE_OUTOFPROCESS})
16 | add_definitions(-DENABLE_OUTOFPROCESS)
17 | endif ()
18 |
19 |
20 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
21 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
22 |
23 | # breakpad
24 | include_directories(libbreakpad/src libbreakpad/src/common/android/include)
25 | add_subdirectory(libbreakpad)
26 | list(APPEND LINK_LIBRARIES breakpad)
27 |
28 | add_library(breakpad-core SHARED
29 | breakpad.cpp)
30 | target_link_libraries(breakpad-core ${LINK_LIBRARIES}
31 | log)
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.sym:
--------------------------------------------------------------------------------
1 | MODULE solaris x86 3DC8191474338D8587339B5FB3E2C62A0 dump_syms_regtest.o
2 | FILE 0 dump_syms_regtest.cc
3 | FUNC 0 156 0 main
4 | 12 18 57 0
5 | 1e 12 58 0
6 | 36 24 59 0
7 | 42 12 60 0
8 | 57 21 61 0
9 | 6c 21 63 0
10 | 9c 48 64 0
11 | FUNC 0 16 0 int google_breakpad::i()
12 | 6 6 51 0
13 | 10 10 52 0
14 | FUNC 0 37 0 google_breakpad::C::C()
15 | 25 37 36 0
16 | FUNC 0 3 0 google_breakpad::C::~C()
17 | 3 3 37 0
18 | FUNC 0 12 0 void google_breakpad::C::set_member(int)
19 | 3 3 39 0
20 | c 9 39 0
21 | FUNC 0 29 0 void google_breakpad::C::f()
22 | 3 3 42 0
23 | 1d 26 42 0
24 | FUNC 0 16 0 int google_breakpad::C::g()
25 | 6 6 43 0
26 | 10 10 43 0
27 | FUNC 0 16 0 char*google_breakpad::C::h(const google_breakpad::C&)
28 | 6 6 44 0
29 | 10 10 44 0
30 | FUNC 0 15 0 google_breakpad::C::~C #Nvariant 1()
31 | f 15 37 0
32 | FUNC 0 0 0 __SLIP.DELETER__A
33 | FUNC 0 0 0 void operator delete(void*)
34 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/windows/refresh_binaries.bat:
--------------------------------------------------------------------------------
1 | REM This batch file is meant to facilitate regenerating prebuilt binaries for
2 | REM the Windows tools.
3 | REM You MUST run it from a Visual Studio xxxx Command Prompt. To do this,
4 | REM navigate to:
5 | REM
6 | REM Start->Programs->Microsoft Visual Studio XXXX->Tools->
7 | REM Visual Studio Command Prompt
8 | REM
9 | REM Then run this batch file. It performs an SVN update, edits the
10 | REM README.binaries file to contain
11 | REM the revision number, and builds the tools. You must run 'svn commit' to
12 | REM commit the pending edits to the repository.
13 |
14 | pushd %~dp0
15 | if %VisualStudioVersion% == 14.0 set GYP_MSVS_VERSION=2015
16 | gyp tools_windows.gyp
17 | msbuild tools_windows.sln /p:Configuration=Release /t:Clean,Build
18 | copy Release\symupload.exe binaries\
19 | copy Release\dump_syms.exe binaries\
20 | git add binaries
21 | git commit -m "Built Windows binaries"
22 | echo Done!
23 | popd
24 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/ia32_settings.h:
--------------------------------------------------------------------------------
1 | #ifndef IA32_SETTINGS_H
2 | #define IA32_SETTINGS_H
3 |
4 | #include "libdis.h"
5 |
6 | typedef struct {
7 | /* options */
8 | unsigned char endian, /* 0 = big, 1 = little */
9 | wc_byte, /* wildcard byte */
10 | max_insn, /* max insn size */
11 | sz_addr, /* default address size */
12 | sz_oper, /* default operand size */
13 | sz_byte, /* # bits in byte */
14 | sz_word, /* # bytes in machine word */
15 | sz_dword; /* # bytes in machine dword */
16 | unsigned int id_sp_reg, /* id of stack pointer */
17 | id_fp_reg, /* id of frame pointer */
18 | id_ip_reg, /* id of instruction pointer */
19 | id_flag_reg, /* id of flags register */
20 | offset_gen_regs, /* start of general regs */
21 | offset_seg_regs, /* start of segment regs */
22 | offset_fpu_regs; /* start of floating point regs */
23 | /* user-controlled settings */
24 | enum x86_options options;
25 | } ia32_settings_t;
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/Makefile.am:
--------------------------------------------------------------------------------
1 | include_HEADERS = libdis.h
2 | lib_LTLIBRARIES = libdisasm.la
3 | libdisasm_la_SOURCES = \
4 | ia32_implicit.c \
5 | ia32_implicit.h \
6 | ia32_insn.c \
7 | ia32_insn.h \
8 | ia32_invariant.c \
9 | ia32_invariant.h \
10 | ia32_modrm.c \
11 | ia32_modrm.h \
12 | ia32_opcode_tables.c \
13 | ia32_opcode_tables.h \
14 | ia32_operand.c \
15 | ia32_operand.h \
16 | ia32_reg.c \
17 | ia32_reg.h \
18 | ia32_settings.c \
19 | ia32_settings.h \
20 | libdis.h \
21 | qword.h \
22 | x86_disasm.c \
23 | x86_format.c \
24 | x86_imm.c \
25 | x86_imm.h \
26 | x86_insn.c \
27 | x86_misc.c \
28 | x86_operand_list.c \
29 | x86_operand_list.h
30 |
31 | # Cheat to get non-autoconf swig into tarball,
32 | # even if it doesn't build by default.
33 | EXTRA_DIST = \
34 | swig/Makefile \
35 | swig/libdisasm.i \
36 | swig/libdisasm_oop.i \
37 | swig/python/Makefile-swig \
38 | swig/perl/Makefile-swig \
39 | swig/perl/Makefile.PL \
40 | swig/ruby/Makefile-swig \
41 | swig/ruby/extconf.rb \
42 | swig/tcl/Makefile-swig \
43 | swig/README
44 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/config.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | android = [
3 | compileSdkVersion: 28,
4 | buildToolsVersion: "28.0.3",
5 | minSdkVersion : 14,
6 | targetSdkVersion : 28,
7 | versionCode : 1,
8 | versionName : "1.0.2"
9 | ]
10 |
11 | version = [
12 | androidSupportSdkVersion: "28.0.0",
13 |
14 | ]
15 |
16 | dependencies = [
17 | //support
18 | "appcompat-v7" : "com.android.support:appcompat-v7:${version["androidSupportSdkVersion"]}",
19 | "design" : "com.android.support:design:${version["androidSupportSdkVersion"]}",
20 | "support-v4" : "com.android.support:support-v4:${version["androidSupportSdkVersion"]}",
21 | "cardview-v7" : "com.android.support:cardview-v7:${version["androidSupportSdkVersion"]}",
22 | "annotations" : "com.android.support:support-annotations:${version["androidSupportSdkVersion"]}",
23 | "recyclerview-v7" : "com.android.support:recyclerview-v7:${version["androidSupportSdkVersion"]}",
24 | ]
25 | }
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/musl/README:
--------------------------------------------------------------------------------
1 |
2 | musl libc
3 |
4 | musl, pronounced like the word "mussel", is an MIT-licensed
5 | implementation of the standard C library targetting the Linux syscall
6 | API, suitable for use in a wide range of deployment environments. musl
7 | offers efficient static and dynamic linking support, lightweight code
8 | and low runtime overhead, strong fail-safe guarantees under correct
9 | usage, and correctness in the sense of standards conformance and
10 | safety. musl is built on the principle that these goals are best
11 | achieved through simple code that is easy to understand and maintain.
12 |
13 | The 1.1 release series for musl features coverage for all interfaces
14 | defined in ISO C99 and POSIX 2008 base, along with a number of
15 | non-standardized interfaces for compatibility with Linux, BSD, and
16 | glibc functionality.
17 |
18 | For basic installation instructions, see the included INSTALL file.
19 | Information on full musl-targeted compiler toolchains, system
20 | bootstrapping, and Linux distributions built on musl can be found on
21 | the project website:
22 |
23 | http://www.musl-libc.org/
24 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/module1.out:
--------------------------------------------------------------------------------
1 | MODULE windows x86 111111111111111111111111111111111 module1.pdb
2 | INFO CODE_ID FFFFFFFF module1.exe
3 | FILE 1 file1_1.cc
4 | FILE 2 file1_2.cc
5 | FILE 3 file1_3.cc
6 | FUNC 1000 c 0 Function1_1
7 | 1000 4 44 1
8 | 1004 4 45 1
9 | 1008 4 46 1
10 | FUNC 1100 8 4 Function1_2
11 | 1100 4 65 2
12 | 1104 4 66 2
13 | FUNC 1200 100 8 Function1_3
14 | FUNC 1300 100 c Function1_4
15 | FUNC 2000 0 0 Test_Zero_Size_Function_Is_Ignored
16 | 2000 4 88 2
17 | PUBLIC 2800 0 PublicSymbol
18 | FUNC 3000 7000 42 LargeFunction
19 | 3000 7000 4098359 3
20 | STACK WIN 4 1000 c 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =
21 | STACK WIN 4 1100 8 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =
22 | STACK WIN 4 1100 100 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =
23 | STACK WIN 4 1300 100 1 0 0 0 0 0 1 $eip 4 + ^ = $esp $ebp 8 + = $ebp $ebp ^ =
24 | STACK CFI INIT 3d40 af .cfa: $esp 4 + .ra: .cfa 4 - ^
25 | STACK CFI 3d41 .cfa: $esp 8 +
26 | STACK CFI 3d43 .cfa: $ebp 8 + $ebp: .cfa 8 - ^
27 | STACK CFI 3d54 $ebx: .cfa 20 - ^
28 | STACK CFI 3d5a $esi: .cfa 16 - ^
29 | STACK CFI 3d84 $edi: .cfa 12 - ^
30 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/curl/COPYING:
--------------------------------------------------------------------------------
1 | COPYRIGHT AND PERMISSION NOTICE
2 |
3 | Copyright (c) 1996 - 2011, Daniel Stenberg, .
4 |
5 | All rights reserved.
6 |
7 | Permission to use, copy, modify, and distribute this software for any purpose
8 | with or without fee is hereby granted, provided that the above copyright
9 | notice and this permission notice appear in all copies.
10 |
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
14 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
17 | OR OTHER DEALINGS IN THE SOFTWARE.
18 |
19 | Except as contained in this notice, the name of a copyright holder shall not
20 | be used in advertising or otherwise to promote the sale, use or other dealings
21 | in this Software without prior written authorization of the copyright holder.
22 |
23 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/TODO:
--------------------------------------------------------------------------------
1 | x86_format.c
2 | ------------
3 | intel: jmpf -> jmp, callf -> call
4 | att: jmpf -> ljmp, callf -> lcall
5 |
6 | opcode table
7 | ------------
8 | finish typing instructions
9 | fix flag clear/set/toggle types
10 |
11 | ix64 stuff
12 | ----------
13 | document output file formats in web page
14 | features doc: register aliases, implicit operands, stack mods,
15 | ring0 flags, eflags, cpu model/isa
16 |
17 | ia32_handle_* implementation
18 |
19 | fix operand 0F C2
20 | CMPPS
21 |
22 | * sysenter, sysexit as CALL types -- preceded by MSR writes
23 | * SYSENTER/SYSEXIT stack : overwrites SS, ESP
24 | * stos, cmps, scas, movs, ins, outs, lods -> OP_PTR
25 | * OP_SIZE in implicit operands
26 | * use OP_SIZE to choose reg sizes!
27 |
28 | DONE?? :
29 | implicit operands: provide action ?
30 | e.g. add/inc for stach, write, etc
31 | replace table numbers in opcodes.dat with
32 | #defines for table names
33 |
34 | replace 0 with INSN_INVALID [or maybe FF for imnvalid and 00 for Not Applicable */
35 | no wait that is only for prefix tables -- n/p
36 |
37 | if ( prefx) only use if insn != invalid
38 |
39 | these should cover all the wacky disasm exceptions
40 |
41 | for the rep one we can chet, match only a 0x90
42 |
43 | todo: privilege | ring
44 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/symbols/microdump/crash_example/8F36148CC4647A8116CAF2A25F591F570/crash_example.sym:
--------------------------------------------------------------------------------
1 | MODULE Linux mips 8F36148CC4647A8116CAF2A25F591F570 crash_example
2 | FILE 0 /home/rtrk/chromium_mips/chromium/src/out-android-mips/Debug/../../breakpad/src/tools/linux/crash_example.cc
3 | FUNC 2ea4 b4 0 google_breakpad::MinidumpDescriptor::MinidumpDescriptor
4 | 2ea4 20 75 6
5 | 2ec4 40 78 6
6 | 2f04 18 78 6
7 | 2f1c 14 78 6
8 | 2f30 18 78 6
9 | 2f48 10 78 6
10 | FUNC 2f6c c4 0 DumpCallback
11 | 2f6c 28 13 33
12 | 2f94 28 14 33
13 | 2fbc 1c 15 33
14 | 2fd8 28 15 33
15 | 3000 1c 17 33
16 | 301c 4 18 33
17 | 3020 10 19 33
18 | FUNC 3030 28 0 Leaf
19 | 3030 4 21 33
20 | 3034 c 22 33
21 | 3040 c 23 33
22 | 304c 4 25 33
23 | 3050 8 26 33
24 | FUNC 3058 60 0 blaTest
25 | 3058 1c 28 33
26 | 3074 c 29 33
27 | 3080 28 30 33
28 | 30a8 10 31 33
29 | FUNC 30b8 48 0 Crash
30 | 30b8 18 33 33
31 | 30d0 4 34 33
32 | 30d4 1c 35 33
33 | 30f0 10 36 33
34 | FUNC 316c 120 0 main
35 | 316c 24 40 33
36 | 3190 c 40 33
37 | 319c 20 41 33
38 | 31bc 40 43 33
39 | 31fc 18 44 33
40 | 3214 4 45 33
41 | 3218 1c 43 33
42 | 3234 20 45 33
43 | 3254 38 46 33
44 | PUBLIC 316c 0 main
45 | STACK CFI INIT 30b8 48 .cfa: $sp 39792944 + .ra: $ra
46 | STACK CFI 30c8 .cfa: $sp 40 +
47 | STACK CFI 30d0 .ra: .cfa -4 + ^
48 | STACK CFI 30f8 .cfa: $sp 0 + .ra: .ra
49 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | android {
3 | compileSdkVersion rootProject.ext.android["compileSdkVersion"]
4 | buildToolsVersion rootProject.ext.android["buildToolsVersion"]
5 |
6 | defaultConfig {
7 | minSdkVersion rootProject.ext.android["minSdkVersion"]
8 | targetSdkVersion rootProject.ext.android["targetSdkVersion"]
9 | versionCode rootProject.ext.android["versionCode"]
10 | versionName rootProject.ext.android["versionName"]
11 |
12 |
13 | ndk {
14 | abiFilters "armeabi-v7a", "arm64-v8a", "x86"
15 | // abiFilters "armeabi-v7a"
16 | }
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 |
27 | // externalNativeBuild {
28 | // cmake {
29 | // path "CMakeLists.txt"
30 | // }
31 | // }
32 | }
33 |
34 | dependencies {
35 | implementation fileTree(dir: 'libs', include: ['*.jar'])
36 | implementation rootProject.ext.dependencies["recyclerview-v7"]
37 | implementation rootProject.ext.dependencies["appcompat-v7"]
38 | // implementation project(path: ':crash_breakpad_build')
39 | implementation 'com.github.yangkun19921001:YKCrash:1.0.2'
40 | }
41 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/ia32_opcode_tables.h:
--------------------------------------------------------------------------------
1 | #define idx_Main 0
2 | #define idx_66 1
3 | #define idx_F2 2
4 | #define idx_F3 3
5 | #define idx_0F 4
6 | #define idx_660F 5
7 | #define idx_F20F 6
8 | #define idx_F30F 7
9 | #define idx_0F00 8
10 | #define idx_0F01 9
11 | #define idx_0F0111 10
12 | #define idx_0F12 11
13 | #define idx_0F16 12
14 | #define idx_0F18 13
15 | #define idx_0F71 14
16 | #define idx_660F71 15
17 | #define idx_0F72 16
18 | #define idx_660F72 17
19 | #define idx_0F73 18
20 | #define idx_660F73 19
21 | #define idx_0FAE 20
22 | #define idx_0FBA 21
23 | #define idx_0FC7 22
24 | #define idx_0FB9 23
25 | #define idx_C6 24
26 | #define idx_C7 25
27 | #define idx_80 26
28 | #define idx_81 27
29 | #define idx_82 28
30 | #define idx_83 29
31 | #define idx_C0 30
32 | #define idx_C1 31
33 | #define idx_D0 32
34 | #define idx_D1 33
35 | #define idx_D2 34
36 | #define idx_D3 35
37 | #define idx_F6 36
38 | #define idx_F7 37
39 | #define idx_FE 38
40 | #define idx_FF 39
41 | #define idx_D8 40
42 | #define idx_D8C0 41
43 | #define idx_D9 42
44 | #define idx_D9C0 43
45 | #define idx_DA 44
46 | #define idx_DAC0 45
47 | #define idx_DB 46
48 | #define idx_DBC0 47
49 | #define idx_DC 48
50 | #define idx_DCC0 49
51 | #define idx_DD 50
52 | #define idx_DDC0 51
53 | #define idx_DE 52
54 | #define idx_DEC0 53
55 | #define idx_DF 54
56 | #define idx_DFC0 55
57 | #define idx_0F0F 56
58 |
--------------------------------------------------------------------------------
/crash_breakpad_build/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | apply plugin: 'com.android.library'
3 |
4 | android {
5 | compileSdkVersion rootProject.ext.android["compileSdkVersion"]
6 | buildToolsVersion rootProject.ext.android["buildToolsVersion"]
7 | useLibrary 'org.apache.http.legacy'
8 |
9 | compileOptions {
10 | targetCompatibility JavaVersion.VERSION_1_8
11 | sourceCompatibility JavaVersion.VERSION_1_8
12 | }
13 |
14 | defaultConfig {
15 | minSdkVersion rootProject.ext.android["minSdkVersion"]
16 | targetSdkVersion rootProject.ext.android["targetSdkVersion"]
17 | versionCode rootProject.ext.android["versionCode"]
18 | versionName rootProject.ext.android["versionName"]
19 |
20 | externalNativeBuild {
21 | cmake {
22 | cppFlags "-std=c++11"
23 | }
24 | }
25 |
26 | ndk {
27 | abiFilters "armeabi-v7a", "arm64-v8a", "x86"
28 | }
29 | }
30 |
31 | buildTypes {
32 | release {
33 | minifyEnabled false
34 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
35 | }
36 | }
37 |
38 | externalNativeBuild {
39 | cmake {
40 | path "src/main/cpp/CMakeLists.txt"
41 | }
42 | }
43 |
44 | }
45 |
46 | dependencies {
47 | implementation fileTree(dir: 'libs', include: ['*.jar'])
48 | testImplementation 'junit:junit:4.12'
49 |
50 |
51 | }
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/curl/stdcheaders.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDC_HEADERS_H
2 | #define __STDC_HEADERS_H
3 | /***************************************************************************
4 | * _ _ ____ _
5 | * Project ___| | | | _ \| |
6 | * / __| | | | |_) | |
7 | * | (__| |_| | _ <| |___
8 | * \___|\___/|_| \_\_____|
9 | *
10 | * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al.
11 | *
12 | * This software is licensed as described in the file COPYING, which
13 | * you should have received as part of this distribution. The terms
14 | * are also available at http://curl.haxx.se/docs/copyright.html.
15 | *
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 | * copies of the Software, and permit persons to whom the Software is
18 | * furnished to do so, under the terms of the COPYING file.
19 | *
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 | * KIND, either express or implied.
22 | *
23 | * $Id: stdcheaders.h,v 1.9 2009-05-18 12:25:45 yangtse Exp $
24 | ***************************************************************************/
25 |
26 | #include
27 |
28 | size_t fread (void *, size_t, size_t, FILE *);
29 | size_t fwrite (const void *, size_t, size_t, FILE *);
30 |
31 | int strcasecmp(const char *, const char *);
32 | int strncasecmp(const char *, const char *, size_t);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/swig/tcl/Makefile-swig:
--------------------------------------------------------------------------------
1 | ifndef BASE_NAME
2 | BASE_NAME = x86disasm
3 | endif
4 |
5 | ifndef SWIG
6 | SWIG = swig # apt-get install swig !
7 | endif
8 |
9 | ifndef GCC
10 | GCC = gcc
11 | endif
12 |
13 | ifndef CC_FLAGS
14 | CC_FLAGS = -c -fPIC
15 | endif
16 |
17 | ifndef LD_FLAGS
18 | LD_FLAGS = -shared -L../.. -ldisasm
19 | endif
20 |
21 | INTERFACE_FILE = libdisasm.i
22 |
23 | SWIG_INTERFACE = ../$(INTERFACE_FILE)
24 |
25 | # TCL rules
26 | TCL_VERSION = 8.3
27 | TCL_MOD = $(BASE_NAME)-tcl.so
28 | TCL_SHADOW = $(BASE_NAME)_wrap.c
29 | TCL_OBJ = $(BASE_NAME)_wrap.o
30 | TCL_INC = /usr/include/tcl$(TCL_VERSION)
31 | TCL_LIB = /usr/lib/tcl$(TCL_VERSION)
32 | TCL_DEST = $(TCL_LIB)/$(BASE_NAME).so
33 |
34 | #====================================================
35 | # TARGETS
36 |
37 | all: swig-tcl
38 |
39 | dummy: swig-tcl install uninstall clean
40 |
41 | swig-tcl: $(TCL_MOD)
42 |
43 | $(TCL_MOD): $(TCL_OBJ)
44 | $(GCC) $(LD_FLAGS) $(TCL_OBJ) -o $@
45 |
46 | $(TCL_OBJ): $(TCL_SHADOW)
47 | $(GCC) $(CC_FLAGS) -I$(TCL_INC) -I.. -o $@ $<
48 |
49 | $(TCL_SHADOW): $(SWIG_INTERFACE)
50 | swig -tcl -o $(TCL_SHADOW) -outdir . $<
51 |
52 | # ==================================================================
53 | install: $(TCL_MOD)
54 | sudo cp $(TCL_MOD) $(TCL_DEST)
55 |
56 | # ==================================================================
57 | uninstall:
58 |
59 | # ==================================================================
60 | clean:
61 | rm $(TCL_MOD) $(TCL_SWIG) $(TCL_OBJ)
62 | rm $(TCL_SHADOW)
63 |
64 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/mac_headers/architecture/byte_order.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1999-2008 Apple Computer, Inc. All rights reserved.
3 | *
4 | * @APPLE_LICENSE_HEADER_START@
5 | *
6 | * This file contains Original Code and/or Modifications of Original Code
7 | * as defined in and that are subject to the Apple Public Source License
8 | * Version 2.0 (the 'License'). You may not use this file except in
9 | * compliance with the License. Please obtain a copy of the License at
10 | * http://www.opensource.apple.com/apsl/ and read it before using this
11 | * file.
12 | *
13 | * The Original Code and all software distributed under the License are
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 | * Please see the License for the specific language governing rights and
19 | * limitations under the License.
20 | *
21 | * @APPLE_LICENSE_HEADER_END@
22 | */
23 | /*
24 | * Copyright (c) 1992 NeXT Computer, Inc.
25 | *
26 | * Byte ordering conversion.
27 | *
28 | */
29 | /* This file mostly left blank */
30 |
31 | #ifndef _ARCHITECTURE_BYTE_ORDER_H_
32 | #define _ARCHITECTURE_BYTE_ORDER_H_
33 |
34 | /*
35 | * Identify the byte order
36 | * of the current host.
37 | */
38 |
39 | enum NXByteOrder {
40 | NX_UnknownByteOrder,
41 | NX_LittleEndian,
42 | NX_BigEndian
43 | };
44 |
45 | #endif /* _ARCHITECTURE_BYTE_ORDER_H_ */
46 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/swig/ruby/Makefile-swig:
--------------------------------------------------------------------------------
1 | ifndef BASE_NAME
2 | BASE_NAME = x86disasm
3 | endif
4 |
5 | ifndef SWIG
6 | SWIG = swig # apt-get install swig !
7 | endif
8 |
9 | ifndef GCC
10 | GCC = gcc
11 | endif
12 |
13 | ifndef CC_FLAGS
14 | CC_FLAGS = -c -fPIC
15 | endif
16 |
17 | ifndef LD_FLAGS
18 | LD_FLAGS = -shared -L../.. -ldisasm
19 | endif
20 |
21 | LIBDISASM_DIR = ../..
22 |
23 | INTERFACE_FILE = libdisasm_oop.i
24 |
25 | SWIG_INTERFACE = ../$(INTERFACE_FILE)
26 |
27 | # RUBY rules
28 | RUBY_MAKEFILE = Makefile
29 | RUBY_MOD = $(BASE_NAME).so
30 | RUBY_SHADOW = $(BASE_NAME)_wrap.c
31 | #RUBY_SWIG = $(BASE_NAME).rb
32 | RUBY_OBJ = $(BASE_NAME)_wrap.o
33 | RUBY_INC = `ruby -e 'puts $$:.join("\n")' | tail -2 | head -1`
34 | #RUBY_LIB =
35 | #RUBY_DEST =
36 |
37 | #====================================================
38 | # TARGETS
39 |
40 | all: swig-ruby
41 |
42 | dummy: swig-ruby install uninstall clean
43 |
44 | swig-ruby: $(RUBY_MOD)
45 |
46 | $(RUBY_MOD): $(RUBY_MAKEFILE)
47 | make
48 |
49 | $(RUBY_MAKEFILE): $(RUBY_OBJ)
50 | ruby extconf.rb
51 |
52 | $(RUBY_OBJ):$(RUBY_SHADOW)
53 | $(GCC) $(CC_FLAGS) -I$(RUBY_INC) -I.. -o $@ $<
54 |
55 | $(RUBY_SHADOW): $(SWIG_INTERFACE)
56 | swig -ruby -o $(RUBY_SHADOW) -outdir . $<
57 |
58 | # ==================================================================
59 | install: $(RUBY_MOD)
60 | make install
61 |
62 | # ==================================================================
63 | uninstall:
64 |
65 | # ==================================================================
66 | clean:
67 | make clean || true
68 | rm $(RUBY_SHADOW) $(RUBY_MAKEFILE) $(RUBY_MOD) $(RUBY_OBJ)
69 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/microdump.stackwalk.machine_readable-arm.out:
--------------------------------------------------------------------------------
1 | OS|Android|OS VERSION INFO
2 | CPU|arm||2
3 | GPU|OpenGL ES 3.0 V@104.0 AU@ (GIT@Id3510ff6dc)|Qualcomm|Adreno (TM) 330
4 | Crash||0x0|0
5 | Module|breakpad_unittests||breakpad_unittests|DA7778FB66018A4E9B4110ED06E730D00|0xaaacd000|0xaab48fff|0
6 | Module|libnetd_client.so||libnetd_client.so|56B149396A4DAF176E26B4A85DA87BF30|0xf6fca000|0xf6fcdfff|0
7 | Module|libstdc++.so||libstdc++.so|DFCD7772F3A5BD1E84A50C4DBFDE6F570|0xf6fee000|0xf6ff1fff|0
8 | Module|libm.so||libm.so|AE3467401278371A956801500FC8187D0|0xf6ff2000|0xf700afff|0
9 | Module|liblog.so||liblog.so|0A492DEF82842051996A468D87F23F010|0xf700c000|0xf7012fff|0
10 | Module|libc.so||libc.so|167F187B09A27F7444EF989603AAFD3D0|0xf7014000|0xf706dfff|0
11 |
12 | 0|0|breakpad_unittests|MicrodumpWriterTest_Setup_Test::TestBody|/s/clank/src/out_arm/Release/../../testing/gtest/include/gtest/gtest.h|1481|0x1
13 | 0|1|breakpad_unittests|testing::Test::Run|/s/clank/src/out_arm/Release/../../testing/gtest/src/gtest.cc|2435|0x17
14 | 0|2|breakpad_unittests|testing::TestInfo::Run|/s/clank/src/out_arm/Release/../../testing/gtest/src/gtest.cc|2610|0x5
15 | 0|3|breakpad_unittests|testing::TestCase::Run|/s/clank/src/out_arm/Release/../../testing/gtest/src/gtest.cc|2728|0x3
16 | 0|4|breakpad_unittests|testing::internal::UnitTestImpl::RunAllTests|/s/clank/src/out_arm/Release/../../testing/gtest/src/gtest.cc|4591|0x3
17 | 0|5|breakpad_unittests|testing::UnitTest::Run|/s/clank/src/out_arm/Release/../../testing/gtest/src/gtest.cc|2418|0x5
18 | 0|6|breakpad_unittests|main|/s/clank/src/out_arm/Release/../../testing/gtest/include/gtest/gtest.h|2326|0x3
19 | 0|7|libc.so||||0x11e9d
20 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/mac_headers/i386/_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
3 | *
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 | *
6 | * This file contains Original Code and/or Modifications of Original Code
7 | * as defined in and that are subject to the Apple Public Source License
8 | * Version 2.0 (the 'License'). You may not use this file except in
9 | * compliance with the License. The rights granted to you under the License
10 | * may not be used to create, or enable the creation or redistribution of,
11 | * unlawful or unlicensed copies of an Apple operating system, or to
12 | * circumvent, violate, or enable the circumvention or violation of, any
13 | * terms of an Apple operating system software license agreement.
14 | *
15 | * Please obtain a copy of the License at
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 | *
18 | * The Original Code and all software distributed under the License are
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 | * Please see the License for the specific language governing rights and
24 | * limitations under the License.
25 | *
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 | */
28 | #ifndef _BSD_I386__TYPES_H_
29 | #define _BSD_I386__TYPES_H_
30 |
31 | typedef long __darwin_intptr_t;
32 | typedef unsigned int __darwin_natural_t;
33 |
34 | #endif /* _BSD_I386__TYPES_H_ */
35 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/swig/perl/Makefile-swig:
--------------------------------------------------------------------------------
1 | ifndef BASE_NAME
2 | BASE_NAME = x86disasm
3 | endif
4 |
5 | ifndef SWIG
6 | SWIG = swig # apt-get install swig !
7 | endif
8 |
9 | ifndef GCC
10 | GCC = gcc
11 | endif
12 |
13 | ifndef CC_FLAGS
14 | CC_FLAGS = -c -fPIC
15 | endif
16 |
17 | ifndef LD_FLAGS
18 | LD_FLAGS = -shared -L.. -ldisasm
19 | endif
20 |
21 | INTERFACE_FILE = libdisasm_oop.i
22 |
23 | SWIG_INTERFACE = ../$(INTERFACE_FILE)
24 |
25 | # PERL rules
26 | PERL_MOD = blib/arch/auto/$(BASE_NAME)/$(BASE_NAME).so
27 | PERL_SHADOW = $(BASE_NAME)_wrap.c
28 | PERL_SWIG = $(BASE_NAME).pl
29 | PERL_OBJ = $(BASE_NAME)_wrap.o
30 | PERL_INC = `perl -e 'use Config; print $$Config{archlib};'`/CORE
31 | PERL_CC_FLAGS = `perl -e 'use Config; print $$Config{ccflags};'`
32 |
33 | #====================================================
34 | # TARGETS
35 |
36 | all: swig-perl
37 |
38 | dummy: swig-perl install uninstall clean
39 |
40 | swig-perl: $(PERL_MOD)
41 |
42 | $(PERL_MOD): $(PERL_OBJ)
43 | perl Makefile.PL
44 | make
45 | #$(GCC) $(LD_FLAGS) $(PERL_OBJ) -o $@
46 |
47 | $(PERL_OBJ): $(PERL_SHADOW)
48 | $(GCC) $(CC_FLAGS) $(PERL_CC_FLAGS) -I$(PERL_INC) -o $@ $<
49 |
50 | $(PERL_SHADOW): $(SWIG_INTERFACE)
51 | swig -perl -shadow -o $(PERL_SHADOW) -outdir . $<
52 |
53 | # ==================================================================
54 | install: $(PERL_MOD)
55 | make install
56 |
57 | # ==================================================================
58 | uninstall:
59 |
60 | # ==================================================================
61 | clean:
62 | rm $(PERL_MOD) $(PERL_OBJ)
63 | rm $(PERL_SHADOW)
64 | rm -rf Makefile blib pm_to_blib
65 |
66 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/symbols/microdump/crash_example/6E72E2F1A5F59AB3D51356FDFE394D490/crash_example.sym:
--------------------------------------------------------------------------------
1 | MODULE Linux mips 6E72E2F1A5F59AB3D51356FDFE394D490 crash_example
2 | FILE 0 /s/breakpad/src/tools/linux/crash_example.cc
3 | FUNC 80a8 9c 0 google_breakpad::MinidumpDescriptor::MinidumpDescriptor
4 | 80a8 20 75 8
5 | 80c8 38 78 8
6 | 8100 10 78 8
7 | 8110 14 78 8
8 | 8124 10 78 8
9 | 8134 10 78 8
10 | FUNC 815c a0 0 DumpCallback
11 | 815c 2c 13 37
12 | 8188 1c 14 37
13 | 81a4 14 15 37
14 | 81b8 1c 15 37
15 | 81d4 14 17 37
16 | 81e8 4 18 37
17 | 81ec 10 19 37
18 | FUNC 81fc 2c 0 Leaf
19 | 81fc 10 21 37
20 | 820c 8 22 37
21 | 8214 8 23 37
22 | 821c 4 25 37
23 | 8220 8 26 37
24 | FUNC 8228 58 0 blaTest
25 | 8228 1c 28 37
26 | 8244 c 29 37
27 | 8250 20 30 37
28 | 8270 10 31 37
29 | FUNC 8280 40 0 Crash
30 | 8280 18 33 37
31 | 8298 4 34 37
32 | 829c 14 35 37
33 | 82b0 10 36 37
34 | FUNC 831c f4 0 main
35 | 831c 2c 40 37
36 | 8348 c 40 37
37 | 8354 18 41 37
38 | 836c 34 43 37
39 | 83a0 10 44 37
40 | 83b0 4 45 37
41 | 83b4 14 43 37
42 | 83c8 18 45 37
43 | 83e0 30 46 37
44 | PUBLIC 831c 0 main
45 | STACK CFI INIT 8228 58 .cfa: $sp 0 + .ra: $ra
46 | STACK CFI 822c .cfa: $sp 32 +
47 | STACK CFI 8234 $gp: .cfa -16 + ^ .ra: .cfa -8 + ^
48 | STACK CFI 827c $gp: $gp .cfa: $sp 0 + .ra: .ra
49 | STACK CFI INIT 8280 40 .cfa: $sp 0 + .ra: $ra
50 | STACK CFI 8284 .cfa: $sp 32 +
51 | STACK CFI 828c $gp: .cfa -16 + ^ .ra: .cfa -8 + ^
52 | STACK CFI 82bc $gp: $gp .cfa: $sp 0 + .ra: .ra
53 | STACK CFI INIT 831c f4 .cfa: $sp 0 + .ra: $ra
54 | STACK CFI 8320 .cfa: $sp 352 +
55 | STACK CFI 832c $gp: .cfa -16 + ^ $s0: .cfa -24 + ^ .ra: .cfa -8 + ^
56 | STACK CFI 840c $gp: $gp $s0: $s0 .cfa: $sp 0 + .ra: .ra
57 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/breakpad.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "client/linux/handler/exception_handler.h"
6 | #include "client/linux/handler/minidump_descriptor.h"
7 |
8 | #define LOG_TAG "dodoodla_crash"
9 |
10 | #define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
11 | #define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
12 | #define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
13 | #define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
14 | #define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
15 |
16 |
17 | bool DumpCallback(const google_breakpad::MinidumpDescriptor &descriptor,
18 | void *context,
19 | bool succeeded) {
20 | ALOGD("===============crrrrash================");
21 | ALOGD("Dump path: %s\n", descriptor.path());
22 | return succeeded;
23 | }
24 |
25 |
26 |
27 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
28 | JNIEnv *env;
29 | if (vm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) {
30 | return JNI_ERR;
31 | }
32 | return JNI_VERSION_1_6;
33 | }
34 |
35 | extern "C"
36 | JNIEXPORT void JNICALL
37 | Java_com_devyk_crash_1module_inter_NativeCrashImp_initBreakpadNative(JNIEnv *env, jclass type,
38 | jstring path_) {
39 | const char *path = env->GetStringUTFChars(path_, 0);
40 |
41 | // TODO
42 | google_breakpad::MinidumpDescriptor descriptor(path);
43 | static google_breakpad::ExceptionHandler eh(descriptor, NULL, DumpCallback, NULL, true, -1);
44 | env->ReleaseStringUTFChars(path_, path);
45 | }
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/BreakpadDebug.xcconfig:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include "Breakpad.xcconfig"
31 |
32 | GCC_OPTIMIZATION_LEVEL = 0
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/devyk/ykcrash/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.devyk.ykcrash;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.os.Bundle;
6 | import android.os.Environment;
7 | import android.util.Log;
8 | import android.view.View;
9 |
10 | import com.devyk.crash_module.Crash;
11 | import com.devyk.crash_module.inter.JavaCrashUtils;
12 |
13 | import java.io.File;
14 |
15 | public class MainActivity extends AppCompatActivity implements JavaCrashUtils.OnCrashListener {
16 | static {
17 | System.loadLibrary("crash-lib");
18 | }
19 |
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | setContentView(R.layout.activity_main);
24 | String nativePath = Environment.getExternalStorageDirectory() + "/CRASH/nativeCrash";
25 | File natPath = new File(nativePath);
26 | if (!natPath.exists())
27 | natPath.mkdirs();
28 |
29 | String javaPath = Environment.getExternalStorageDirectory() + "/CRASH/javaCrash";
30 | File javPath = new File(javaPath);
31 | if (!javPath.exists())
32 | javPath.mkdirs();
33 |
34 | //框架初始化
35 | new Crash.CrashBuild(getApplicationContext())
36 | .nativeCrashPath(nativePath)
37 | .javaCrashPath(javaPath, this)
38 | .build();
39 |
40 | }
41 |
42 |
43 | public native static void testCrash();
44 |
45 | public void nativeCrash(View view) {
46 | testCrash();
47 | }
48 |
49 | public void javaCrash(View view) {
50 | System.out.println(1 / 0);
51 | }
52 |
53 | @Override
54 | public void onCrash(String crashInfo, Throwable e) {
55 | Log.d("MainActivity", e.getMessage());
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/x86_imm.c:
--------------------------------------------------------------------------------
1 | #include "qword.h"
2 | #include "x86_imm.h"
3 |
4 | #include
5 |
6 | unsigned int x86_imm_signsized( unsigned char * buf, size_t buf_len,
7 | void *dest, unsigned int size ) {
8 | signed char *cp = (signed char *) dest;
9 | signed short *sp = (signed short *) dest;
10 | int32_t *lp = (int32_t *) dest;
11 | qword_t *qp = (qword_t *) dest;
12 |
13 | if ( size > buf_len ) {
14 | return 0;
15 | }
16 |
17 | /* Copy 'size' bytes from *buf to *op
18 | * return number of bytes copied */
19 | switch (size) {
20 | case 1: /* BYTE */
21 | *cp = *((signed char *) buf);
22 | break;
23 | case 2: /* WORD */
24 | *sp = *((signed short *) buf);
25 | break;
26 | case 6:
27 | case 8: /* QWORD */
28 | *qp = *((qword_t *) buf);
29 | break;
30 | case 4: /* DWORD */
31 | default:
32 | *lp = *((int32_t *) buf);
33 | break;
34 | }
35 | return (size);
36 | }
37 |
38 | unsigned int x86_imm_sized( unsigned char * buf, size_t buf_len, void *dest,
39 | unsigned int size ) {
40 | unsigned char *cp = (unsigned char *) dest;
41 | unsigned short *sp = (unsigned short *) dest;
42 | uint32_t *lp = (uint32_t *) dest;
43 | qword_t *qp = (qword_t *) dest;
44 |
45 | if ( size > buf_len ) {
46 | return 0;
47 | }
48 |
49 | /* Copy 'size' bytes from *buf to *op
50 | * return number of bytes copied */
51 | switch (size) {
52 | case 1: /* BYTE */
53 | *cp = *((unsigned char *) buf);
54 | break;
55 | case 2: /* WORD */
56 | *sp = *((unsigned short *) buf);
57 | break;
58 | case 6:
59 | case 8: /* QWORD */
60 | *qp = *((qword_t *) buf);
61 | break;
62 | case 4: /* DWORD */
63 | default:
64 | *lp = *((uint32_t *) buf);
65 | break;
66 | }
67 |
68 | return (size);
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/ia32_reg.h:
--------------------------------------------------------------------------------
1 | #ifndef IA32_REG_H
2 | #define IA32_REG_H
3 |
4 | #include /* for size_t */
5 | #include "libdis.h" /* for x86_reg_t */
6 |
7 | /* NOTE these are used in opcode tables for hard-coded registers */
8 | #define REG_DWORD_OFFSET 1 /* 0 + 1 */
9 | #define REG_ECX_INDEX 2 /* 0 + 1 + 1 */
10 | #define REG_ESP_INDEX 5 /* 0 + 4 + 1 */
11 | #define REG_EBP_INDEX 6 /* 0 + 5 + 1 */
12 | #define REG_ESI_INDEX 7 /* 0 + 6 + 1 */
13 | #define REG_EDI_INDEX 8 /* 0 + 7 + 1 */
14 | #define REG_WORD_OFFSET 9 /* 1 * 8 + 1 */
15 | #define REG_BYTE_OFFSET 17 /* 2 * 8 + 1 */
16 | #define REG_MMX_OFFSET 25 /* 3 * 8 + 1 */
17 | #define REG_SIMD_OFFSET 33 /* 4 * 8 + 1 */
18 | #define REG_DEBUG_OFFSET 41 /* 5 * 8 + 1 */
19 | #define REG_CTRL_OFFSET 49 /* 6 * 8 + 1 */
20 | #define REG_TEST_OFFSET 57 /* 7 * 8 + 1 */
21 | #define REG_SEG_OFFSET 65 /* 8 * 8 + 1 */
22 | #define REG_LDTR_INDEX 71 /* 8 * 8 + 1 + 1 */
23 | #define REG_GDTR_INDEX 72 /* 8 * 8 + 2 + 1 */
24 | #define REG_FPU_OFFSET 73 /* 9 * 8 + 1 */
25 | #define REG_FLAGS_INDEX 81 /* 10 * 8 + 1 */
26 | #define REG_FPCTRL_INDEX 82 /* 10 * 8 + 1 + 1 */
27 | #define REG_FPSTATUS_INDEX 83 /* 10 * 8 + 2 + 1 */
28 | #define REG_FPTAG_INDEX 84 /* 10 * 8 + 3 + 1 */
29 | #define REG_EIP_INDEX 85 /* 10 * 8 + 4 + 1 */
30 | #define REG_IP_INDEX 86 /* 10 * 8 + 5 + 1 */
31 | #define REG_IDTR_INDEX 87 /* 10 * 8 + 6 + 1 */
32 | #define REG_MXCSG_INDEX 88 /* 10 * 8 + 7 + 1 */
33 | #define REG_TR_INDEX 89 /* 10 * 8 + 8 + 1 */
34 | #define REG_CSMSR_INDEX 90 /* 10 * 8 + 9 + 1 */
35 | #define REG_ESPMSR_INDEX 91 /* 10 * 8 + 10 + 1 */
36 | #define REG_EIPMSR_INDEX 92 /* 10 * 8 + 11 + 1 */
37 |
38 | void ia32_handle_register( x86_reg_t *reg, size_t id );
39 | size_t ia32_true_register_id( size_t id );
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/mac_headers/mach/machine/boolean.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
3 | *
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 | *
6 | * This file contains Original Code and/or Modifications of Original Code
7 | * as defined in and that are subject to the Apple Public Source License
8 | * Version 2.0 (the 'License'). You may not use this file except in
9 | * compliance with the License. The rights granted to you under the License
10 | * may not be used to create, or enable the creation or redistribution of,
11 | * unlawful or unlicensed copies of an Apple operating system, or to
12 | * circumvent, violate, or enable the circumvention or violation of, any
13 | * terms of an Apple operating system software license agreement.
14 | *
15 | * Please obtain a copy of the License at
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 | *
18 | * The Original Code and all software distributed under the License are
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 | * Please see the License for the specific language governing rights and
24 | * limitations under the License.
25 | *
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 | */
28 |
29 | #ifndef _MACH_MACHINE_BOOLEAN_H_
30 | #define _MACH_MACHINE_BOOLEAN_H_
31 |
32 | #if defined (__i386__) || defined(__x86_64__)
33 | #include "mach/i386/boolean.h"
34 | #elif defined (__arm__)
35 | #include "mach/arm/boolean.h"
36 | #else
37 | #error architecture not supported
38 | #endif
39 |
40 | #endif /* _MACH_MACHINE_BOOLEAN_H_ */
41 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/mac_headers/mach/machine/vm_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
3 | *
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 | *
6 | * This file contains Original Code and/or Modifications of Original Code
7 | * as defined in and that are subject to the Apple Public Source License
8 | * Version 2.0 (the 'License'). You may not use this file except in
9 | * compliance with the License. The rights granted to you under the License
10 | * may not be used to create, or enable the creation or redistribution of,
11 | * unlawful or unlicensed copies of an Apple operating system, or to
12 | * circumvent, violate, or enable the circumvention or violation of, any
13 | * terms of an Apple operating system software license agreement.
14 | *
15 | * Please obtain a copy of the License at
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 | *
18 | * The Original Code and all software distributed under the License are
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 | * Please see the License for the specific language governing rights and
24 | * limitations under the License.
25 | *
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 | */
28 |
29 | #ifndef _MACH_MACHINE_VM_TYPES_H_
30 | #define _MACH_MACHINE_VM_TYPES_H_
31 |
32 | #if defined (__i386__) || defined(__x86_64__)
33 | #include "mach/i386/vm_types.h"
34 | #elif defined (__arm__)
35 | #include "mach/arm/vm_types.h"
36 | #else
37 | #error architecture not supported
38 | #endif
39 |
40 | #endif /* _MACH_MACHINE_VM_TYPES_H_ */
41 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/minidump2.stackwalk.machine_readable.out:
--------------------------------------------------------------------------------
1 | OS|Windows NT|5.1.2600 Service Pack 2
2 | CPU|x86|GenuineIntel family 6 model 13 stepping 8|1
3 | GPU|||
4 | Crash|EXCEPTION_ACCESS_VIOLATION_WRITE|0x45|0
5 | Module|test_app.exe||test_app.pdb|5A9832E5287241C1838ED98914E9B7FF1|0x00400000|0x0042cfff|1
6 | Module|dbghelp.dll|5.1.2600.2180|dbghelp.pdb|39559573E21B46F28E286923BE9E6A761|0x59a60000|0x59b00fff|0
7 | Module|imm32.dll|5.1.2600.2180|imm32.pdb|2C17A49C251B4C8EB9E2AD13D7D9EA162|0x76390000|0x763acfff|0
8 | Module|psapi.dll|5.1.2600.2180|psapi.pdb|A5C3A1F9689F43D8AD228A09293889702|0x76bf0000|0x76bfafff|0
9 | Module|ole32.dll|5.1.2600.2726|ole32.pdb|683B65B246F4418796D2EE6D4C55EB112|0x774e0000|0x7761cfff|0
10 | Module|version.dll|5.1.2600.2180|version.pdb|180A90C40384463E82DDC45B2C8AB76E2|0x77c00000|0x77c07fff|0
11 | Module|msvcrt.dll|7.0.2600.2180|msvcrt.pdb|A678F3C30DED426B839032B996987E381|0x77c10000|0x77c67fff|0
12 | Module|user32.dll|5.1.2600.2622|user32.pdb|EE2B714D83A34C9D88027621272F83262|0x77d40000|0x77dcffff|0
13 | Module|advapi32.dll|5.1.2600.2180|advapi32.pdb|455D6C5F184D45BBB5C5F30F829751142|0x77dd0000|0x77e6afff|0
14 | Module|rpcrt4.dll|5.1.2600.2180|rpcrt4.pdb|BEA45A721DA141DAA3BA86B3A20311532|0x77e70000|0x77f00fff|0
15 | Module|gdi32.dll|5.1.2600.2818|gdi32.pdb|C0EA66BE00A64BD7AEF79E443A91869C2|0x77f10000|0x77f56fff|0
16 | Module|kernel32.dll|5.1.2600.2945|kernel32.pdb|BCE8785C57B44245A669896B6A19B9542|0x7c800000|0x7c8f3fff|0
17 | Module|ntdll.dll|5.1.2600.2180|ntdll.pdb|36515FB5D04345E491F672FA2E2878C02|0x7c900000|0x7c9affff|0
18 |
19 | 0|0|test_app.exe|`anonymous namespace'::CrashFunction|c:\test_app.cc|58|0x3
20 | 0|1|test_app.exe|main|c:\test_app.cc|65|0x5
21 | 0|2|test_app.exe|__tmainCRTStartup|f:\sp\vctools\crt_bld\self_x86\crt\src\crt0.c|327|0x12
22 | 0|3|kernel32.dll|BaseProcessStart|||0x23
23 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/swig/python/Makefile-swig:
--------------------------------------------------------------------------------
1 | ifndef BASE_NAME
2 | BASE_NAME = x86disasm
3 | endif
4 |
5 | ifndef SWIG
6 | SWIG = swig # apt-get install swig !
7 | endif
8 |
9 | ifndef GCC
10 | GCC = gcc
11 | endif
12 |
13 | ifndef CC_FLAGS
14 | CC_FLAGS = -c -fPIC
15 | endif
16 |
17 | ifndef LD_FLAGS
18 | LD_FLAGS = -shared -L.. -ldisasm
19 | endif
20 |
21 | INTERFACE_FILE = libdisasm_oop.i
22 |
23 | SWIG_INTERFACE = ../$(INTERFACE_FILE)
24 |
25 | # PYTHON rules
26 | PYTHON_MOD = $(BASE_NAME)-python.so
27 | PYTHON_SHADOW = $(BASE_NAME)_wrap.c
28 | PYTHON_SWIG = $(BASE_NAME).py
29 | PYTHON_OBJ = $(BASE_NAME)_wrap.o
30 | PYTHON_INC = `/bin/echo -e 'import sys\nprint sys.prefix + "/include/python" + sys.version[:3]' | python`
31 | PYTHON_LIB = `/bin/echo -e 'import sys\nprint sys.prefix + "/lib/python" + sys.version[:3]' | python`
32 | PYTHON_DEST = $(PYTHON_LIB)/lib-dynload/_$(BASE_NAME).so
33 |
34 | #====================================================
35 | # TARGETS
36 |
37 | all: swig-python
38 |
39 | dummy: swig-python install uninstall clean
40 |
41 | swig-python: $(PYTHON_MOD)
42 |
43 | $(PYTHON_MOD): $(PYTHON_OBJ)
44 | $(GCC) $(LD_FLAGS) $(PYTHON_OBJ) -o $@
45 |
46 | $(PYTHON_OBJ): $(PYTHON_SHADOW)
47 | $(GCC) $(CC_FLAGS) -I$(PYTHON_INC) -I.. -o $@ $<
48 |
49 | $(PYTHON_SHADOW): $(SWIG_INTERFACE)
50 | swig -python -shadow -o $(PYTHON_SHADOW) -outdir . $<
51 |
52 | # ==================================================================
53 | install: $(PYTHON_MOD)
54 | sudo cp $(PYTHON_MOD) $(PYTHON_DEST)
55 | sudo cp $(PYTHON_SWIG) $(PYTHON_LIB)
56 |
57 | # ==================================================================
58 | uninstall:
59 |
60 | # ==================================================================
61 | clean:
62 | rm $(PYTHON_MOD) $(PYTHON_SWIG) $(PYTHON_OBJ)
63 | rm $(PYTHON_SHADOW)
64 |
65 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/tools.gyp:
--------------------------------------------------------------------------------
1 | # Copyright 2014 Google Inc. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | # * Redistributions in binary form must reproduce the above
10 | # copyright notice, this list of conditions and the following disclaimer
11 | # in the documentation and/or other materials provided with the
12 | # distribution.
13 | # * Neither the name of Google Inc. nor the names of its
14 | # contributors may be used to endorse or promote products derived from
15 | # this software without specific prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 | {
30 | 'conditions': [
31 | ['OS=="mac"', {
32 | 'includes': ['mac/tools_mac.gypi'],
33 | }],
34 | ['OS=="linux"', {
35 | 'includes': ['linux/tools_linux.gypi'],
36 | }],
37 | ],
38 | }
39 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/BreakpadRelease.xcconfig:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include "Breakpad.xcconfig"
31 |
32 | GCC_OPTIMIZATION_LEVEL = s
33 | GCC_WARN_UNINITIALIZED_AUTOS = YES
34 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) NDEBUG
35 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/minidump_dump_test:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2006, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | testdata_dir=$srcdir/src/processor/testdata
33 | ./src/processor/minidump_dump $testdata_dir/minidump2.dmp | \
34 | tr -d '\015' | \
35 | diff -u $testdata_dir/minidump2.dump.out -
36 | exit $?
37 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/minidump2.stackwalk.out:
--------------------------------------------------------------------------------
1 | Operating system: Windows NT
2 | 5.1.2600 Service Pack 2
3 | CPU: x86
4 | GenuineIntel family 6 model 13 stepping 8
5 | 1 CPU
6 |
7 | GPU: UNKNOWN
8 |
9 | Crash reason: EXCEPTION_ACCESS_VIOLATION_WRITE
10 | Crash address: 0x45
11 | Process uptime: 0 seconds
12 |
13 | Thread 0 (crashed)
14 | 0 test_app.exe!`anonymous namespace'::CrashFunction [test_app.cc : 58 + 0x3]
15 | eip = 0x0040429e esp = 0x0012fe84 ebp = 0x0012fe88 ebx = 0x7c80abc1
16 | esi = 0x00000002 edi = 0x00000a28 eax = 0x00000045 ecx = 0x0012fe94
17 | edx = 0x0042bc58 efl = 0x00010246
18 | Found by: given as instruction pointer in context
19 | 1 test_app.exe!main [test_app.cc : 65 + 0x5]
20 | eip = 0x00404200 esp = 0x0012fe90 ebp = 0x0012ff70
21 | Found by: call frame info
22 | 2 test_app.exe!__tmainCRTStartup [crt0.c : 327 + 0x12]
23 | eip = 0x004053ec esp = 0x0012ff78 ebp = 0x0012ffc0
24 | Found by: call frame info
25 | 3 kernel32.dll!BaseProcessStart + 0x23
26 | eip = 0x7c816fd7 esp = 0x0012ffc8 ebp = 0x0012fff0
27 | Found by: call frame info
28 |
29 | Loaded modules:
30 | 0x00400000 - 0x0042cfff test_app.exe ??? (main)
31 | 0x59a60000 - 0x59b00fff dbghelp.dll 5.1.2600.2180
32 | 0x76390000 - 0x763acfff imm32.dll 5.1.2600.2180
33 | 0x76bf0000 - 0x76bfafff psapi.dll 5.1.2600.2180
34 | 0x774e0000 - 0x7761cfff ole32.dll 5.1.2600.2726
35 | 0x77c00000 - 0x77c07fff version.dll 5.1.2600.2180
36 | 0x77c10000 - 0x77c67fff msvcrt.dll 7.0.2600.2180
37 | 0x77d40000 - 0x77dcffff user32.dll 5.1.2600.2622
38 | 0x77dd0000 - 0x77e6afff advapi32.dll 5.1.2600.2180
39 | 0x77e70000 - 0x77f00fff rpcrt4.dll 5.1.2600.2180
40 | 0x77f10000 - 0x77f56fff gdi32.dll 5.1.2600.2818
41 | 0x7c800000 - 0x7c8f3fff kernel32.dll 5.1.2600.2945
42 | 0x7c900000 - 0x7c9affff ntdll.dll 5.1.2600.2180
43 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/android/include/sys/signal.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
32 |
33 | #include
34 |
35 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
36 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/dump_object.cc:
--------------------------------------------------------------------------------
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 | // dump_object.cc: A base class for all mini/micro dump object.
31 |
32 | #include "google_breakpad/processor/dump_object.h"
33 |
34 | namespace google_breakpad {
35 |
36 | DumpObject::DumpObject() : valid_(false) {
37 | }
38 |
39 | } // namespace google_breakpad
40 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/minidump_stackwalk_test:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2006, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | testdata_dir=$srcdir/src/processor/testdata
33 | ./src/processor/minidump_stackwalk $testdata_dir/minidump2.dmp \
34 | $testdata_dir/symbols | \
35 | tr -d '\015' | \
36 | diff -u $testdata_dir/minidump2.stackwalk.out -
37 | exit $?
38 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.4.1)
2 |
3 | set(BREAKPAD_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
4 |
5 | include_directories(${BREAKPAD_ROOT}/src ${BREAKPAD_ROOT}/src/common/android/include)
6 |
7 |
8 | file(GLOB BREAKPAD_SOURCES_COMMON
9 | ${BREAKPAD_ROOT}/src/client/linux/crash_generation/crash_generation_client.cc
10 | ${BREAKPAD_ROOT}/src/client/linux/dump_writer_common/thread_info.cc
11 | ${BREAKPAD_ROOT}/src/client/linux/dump_writer_common/ucontext_reader.cc
12 | ${BREAKPAD_ROOT}/src/client/linux/handler/exception_handler.cc
13 | ${BREAKPAD_ROOT}/src/client/linux/handler/minidump_descriptor.cc
14 | ${BREAKPAD_ROOT}/src/client/linux/log/log.cc
15 | ${BREAKPAD_ROOT}/src/client/linux/microdump_writer/microdump_writer.cc
16 | ${BREAKPAD_ROOT}/src/client/linux/minidump_writer/linux_dumper.cc
17 | ${BREAKPAD_ROOT}/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
18 | ${BREAKPAD_ROOT}/src/client/linux/minidump_writer/minidump_writer.cc
19 | ${BREAKPAD_ROOT}/src/client/minidump_file_writer.cc
20 | ${BREAKPAD_ROOT}/src/common/convert_UTF.c
21 | ${BREAKPAD_ROOT}/src/common/md5.cc
22 | ${BREAKPAD_ROOT}/src/common/string_conversion.cc
23 | ${BREAKPAD_ROOT}/src/common/linux/elfutils.cc
24 | ${BREAKPAD_ROOT}/src/common/linux/file_id.cc
25 | ${BREAKPAD_ROOT}/src/common/linux/guid_creator.cc
26 | ${BREAKPAD_ROOT}/src/common/linux/linux_libc_support.cc
27 | ${BREAKPAD_ROOT}/src/common/linux/memory_mapped_file.cc
28 | ${BREAKPAD_ROOT}/src/common/linux/safe_readlink.cc
29 |
30 | )
31 |
32 | file(GLOB BREAKPAD_ASM_SOURCE ${BREAKPAD_ROOT}/src/common/android/breakpad_getcontext.S
33 | )
34 |
35 | set_source_files_properties(${BREAKPAD_ASM_SOURCE} PROPERTIES LANGUAGE C)
36 |
37 | add_library(breakpad STATIC ${BREAKPAD_SOURCES_COMMON} ${BREAKPAD_ASM_SOURCE})
38 |
39 | target_link_libraries(breakpad log)
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/symbol_data.h:
--------------------------------------------------------------------------------
1 | // -*- mode: c++ -*-
2 |
3 | // Copyright (c) 2013 Google Inc.
4 | // All rights reserved.
5 | //
6 | // Redistribution and use in source and binary forms, with or without
7 | // modification, are permitted provided that the following conditions are
8 | // met:
9 | //
10 | // * Redistributions of source code must retain the above copyright
11 | // notice, this list of conditions and the following disclaimer.
12 | // * Redistributions in binary form must reproduce the above
13 | // copyright notice, this list of conditions and the following disclaimer
14 | // in the documentation and/or other materials provided with the
15 | // distribution.
16 | // * Neither the name of Google Inc. nor the names of its
17 | // contributors may be used to endorse or promote products derived from
18 | // this software without specific prior written permission.
19 | //
20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | #ifndef COMMON_SYMBOL_DATA_H_
33 | #define COMMON_SYMBOL_DATA_H_
34 |
35 | // Control what data is used from the symbol file.
36 | enum SymbolData {
37 | ALL_SYMBOL_DATA,
38 | NO_CFI,
39 | ONLY_CFI
40 | };
41 |
42 | #endif // COMMON_SYMBOL_DATA_H_
43 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/swig/Makefile:
--------------------------------------------------------------------------------
1 | # change these values if you need to
2 | SWIG = swig # apt-get install swig !
3 | GCC = gcc
4 |
5 | CC_FLAGS = -c -fPIC
6 | LD_FLAGS = -shared -L../.. -ldisasm
7 |
8 | BASE_NAME = x86disasm
9 |
10 | export INTERFACE_FILE BASE_NAME SWIG GCC CC_FLAGS LD_FLAGS
11 |
12 | #====================================================
13 | # TARGETS
14 |
15 | all: swig
16 | dummy: swig swig-python swig-ruby swig-perl swig-tcl install uninstall clean
17 |
18 | swig: swig-python swig-perl
19 | # swig-rub swig-tcl
20 |
21 | swig-python:
22 | cd python && make -f Makefile-swig
23 |
24 | swig-ruby:
25 | cd ruby && make -f Makefile-swig
26 |
27 | swig-perl:
28 | cd perl && make -f Makefile-swig
29 |
30 | swig-tcl:
31 | cd tcl && make -f Makefile-swig
32 |
33 | # ==================================================================
34 | install: install-python install-perl
35 | # install-ruby install-tcl
36 |
37 | install-python:
38 | cd python && sudo make -f Makefile-swig install
39 |
40 | install-ruby:
41 | cd ruby && sudo make -f Makefile-swig install
42 |
43 | install-perl:
44 | cd perl && sudo make -f Makefile-swig install
45 |
46 | install-tcl:
47 | cd tcl && sudo make -f Makefile-swig install
48 |
49 | # ==================================================================
50 | uninstall: uninstall-python
51 | #uninstall-ruby uninstall-perl uninstall-tcl
52 |
53 | uninstall-python:
54 | cd python && sudo make -f Makefile-swig uninstall
55 |
56 | uninstall-ruby:
57 | cd ruby && sudo make -f Makefile-swig uninstall
58 |
59 | uninstall-perl:
60 | cd perl && sudo make -f Makefile-swig uninstall
61 |
62 | uninstall-tcl:
63 | cd tcl && sudo make -f Makefile-swig uninstall
64 |
65 | # ==================================================================
66 | clean:
67 | cd python && make -f Makefile-swig clean
68 | cd ruby && make -f Makefile-swig clean
69 | cd perl && make -f Makefile-swig clean
70 | cd tcl && make -f Makefile-swig clean
71 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/minidump_stackwalk_machine_readable_test:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2007, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | testdata_dir=$srcdir/src/processor/testdata
33 | ./src/processor/minidump_stackwalk -m $testdata_dir/minidump2.dmp \
34 | $testdata_dir/symbols | \
35 | tr -d '\015' | \
36 | diff -u $testdata_dir/minidump2.stackwalk.machine_readable.out -
37 | exit $?
38 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/google_breakpad/processor/proc_maps_linux.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | #ifndef BASE_DEBUG_PROC_MAPS_LINUX_H_
6 | #define BASE_DEBUG_PROC_MAPS_LINUX_H_
7 |
8 | #include
9 | #include
10 |
11 | #include "common/using_std_string.h"
12 | #include "google_breakpad/common/breakpad_types.h"
13 |
14 | namespace google_breakpad {
15 |
16 | // Describes a region of mapped memory and the path of the file mapped.
17 | struct MappedMemoryRegion {
18 | enum Permission {
19 | READ = 1 << 0,
20 | WRITE = 1 << 1,
21 | EXECUTE = 1 << 2,
22 | PRIVATE = 1 << 3, // If set, region is private, otherwise it is shared.
23 | };
24 |
25 | // The address range [start,end) of mapped memory.
26 | uint64_t start;
27 | uint64_t end;
28 |
29 | // Byte offset into |path| of the range mapped into memory.
30 | uint64_t offset;
31 |
32 | // Bitmask of read/write/execute/private/shared permissions.
33 | uint8_t permissions;
34 |
35 | // Major and minor devices.
36 | uint8_t major_device;
37 | uint8_t minor_device;
38 |
39 | // Value of the inode.
40 | uint64_t inode;
41 |
42 | // Name of the file mapped into memory.
43 | //
44 | // NOTE: path names aren't guaranteed to point at valid files. For example,
45 | // "[heap]" and "[stack]" are used to represent the location of the process'
46 | // heap and stack, respectively.
47 | string path;
48 |
49 | // The line from /proc//maps that this struct represents.
50 | string line;
51 | };
52 |
53 | // Parses /proc//maps input data and stores in |regions|. Returns true
54 | // and updates |regions| if and only if all of |input| was successfully parsed.
55 | bool ParseProcMaps(const string& input,
56 | std::vector* regions);
57 |
58 | } // namespace google_breakpad
59 |
60 | #endif // BASE_DEBUG_PROC_MAPS_LINUX_H_
61 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/testdata/microdump.stackwalk.machine_readable-arm64.out:
--------------------------------------------------------------------------------
1 | OS|Android|OS 64 VERSION INFO
2 | CPU|arm64||2
3 | GPU|||
4 | Crash||0x0|0
5 | Module|breakpad_unittests||breakpad_unittests|D6D1FEC9A15DE7F38A236898871A2E770|0x555f608000|0x555f6c7fff|0
6 | Module|libnetd_client.so||libnetd_client.so|7735F44BA6D7C27FD5C3636A43369B7C0|0x7f801f6000|0x7f80208fff|0
7 | Module|libstdc++.so||libstdc++.so|380C0B7CD8FA3F094BC3BA58A81CBAD00|0x7f80229000|0x7f8023cfff|0
8 | Module|libm.so||libm.so|F832D47D1E237E46D835991594DA6E890|0x7f8023d000|0x7f80279fff|0
9 | Module|liblog.so||liblog.so|C407B93F87A835BE05451FC7B0B3E65E0|0x7f8027b000|0x7f80293fff|0
10 | Module|libc.so||libc.so|479D5438753E27F019F2C9980DDBF4F30|0x7f80295000|0x7f80332fff|0
11 | Module|libsigchain.so||libsigchain.so|9DA3FF8EF9CA0FDC481292EE530DF6EC0|0x7f80341000|0x7f80353fff|0
12 | Module|linux-gate.so||linux-gate.so|672B2CD6CF8AF6C43BD70F2AB02B3D0C0|0x7f80358000|0x7f80359fff|0
13 |
14 | 0|0|breakpad_unittests|MicrodumpWriterTest_Setup_Test::TestBody|/s/clank/src/out/Release/../../breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc|77|0xc
15 | 0|1|breakpad_unittests|testing::internal::HandleExceptionsInMethodIfSupported|/s/clank/src/out/Release/../../testing/gtest/src/gtest.cc|2418|0x4
16 | 0|2|breakpad_unittests|testing::Test::Run|/s/clank/src/out/Release/../../testing/gtest/src/gtest.cc|2435|0x14
17 | 0|3|breakpad_unittests|testing::TestInfo::Run|/s/clank/src/out/Release/../../testing/gtest/src/gtest.cc|2610|0x4
18 | 0|4|breakpad_unittests|testing::TestCase::Run|/s/clank/src/out/Release/../../testing/gtest/src/gtest.cc|2728|0x0
19 | 0|5|breakpad_unittests|testing::internal::UnitTestImpl::RunAllTests|/s/clank/src/out/Release/../../testing/gtest/src/gtest.cc|4591|0x0
20 | 0|6|breakpad_unittests|testing::UnitTest::Run|/s/clank/src/out/Release/../../testing/gtest/src/gtest.cc|2418|0x4
21 | 0|7|breakpad_unittests|main|/s/clank/src/out/Release/../../testing/gtest/include/gtest/gtest.h|2326|0x0
22 | 0|8|libc.so||||0x17388
23 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/stdio_wrapper.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2016, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_STDIO_WRAPPER_H
31 | #define GOOGLE_BREAKPAD_COMMON_STDIO_WRAPPER_H
32 |
33 | #include
34 |
35 | #if defined(_MSC_VER) && MSC_VER < 1900
36 | #include
37 |
38 | #define snprintf _snprintf
39 | typedef SSIZE_T ssize_t;
40 | #endif
41 |
42 |
43 | #endif // GOOGLE_BREAKPAD_COMMON_STDIO_WRAPPER_H
44 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/windows/tools_windows.gyp:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Google Inc. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | # * Redistributions in binary form must reproduce the above
10 | # copyright notice, this list of conditions and the following disclaimer
11 | # in the documentation and/or other materials provided with the
12 | # distribution.
13 | # * Neither the name of Google Inc. nor the names of its
14 | # contributors may be used to endorse or promote products derived from
15 | # this software without specific prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 |
30 | {
31 | 'includes': [
32 | '../../build/common.gypi',
33 | ],
34 | 'targets': [
35 | {
36 | 'target_name': 'build_all',
37 | 'type': 'none',
38 | 'dependencies': [
39 | './converter/ms_symbol_server_converter.gyp:*',
40 | './dump_syms/dump_syms.gyp:*',
41 | './symupload/symupload.gyp:*',
42 | ],
43 | },
44 | ],
45 | }
46 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/path_helper.h:
--------------------------------------------------------------------------------
1 | // Copyright 2017, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_PATH_HELPER_H
31 | #define GOOGLE_BREAKPAD_COMMON_PATH_HELPER_H
32 |
33 | #include
34 |
35 | #include "common/using_std_string.h"
36 |
37 | namespace google_breakpad {
38 |
39 | string BaseName(const string& path);
40 | string DirName(const string& path);
41 |
42 | } // namespace google_breakpad
43 |
44 | #endif // GOOGLE_BREAKPAD_COMMON_PATH_HELPER_H
45 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/convert_old_arm64_context.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2018, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef PROCESSOR_CONVERT_OLD_ARM64_CONTEXT_H__
31 | #define PROCESSOR_CONVERT_OLD_ARM64_CONTEXT_H__
32 |
33 | #include "google_breakpad/common/minidump_cpu_arm64.h"
34 |
35 | namespace google_breakpad {
36 |
37 | void ConvertOldARM64Context(const MDRawContextARM64_Old& old,
38 | MDRawContextARM64* context);
39 |
40 | } // namespace google_breakpad
41 |
42 | #endif // PROCESSOR_CONVERT_OLD_ARM64_CONTEXT_H__
43 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/bootstrap_compat.cc:
--------------------------------------------------------------------------------
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 | #include "common/mac/bootstrap_compat.h"
31 |
32 | namespace breakpad {
33 |
34 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
35 | kern_return_t BootstrapRegister(mach_port_t bp,
36 | name_t service_name,
37 | mach_port_t sp) {
38 | return bootstrap_register(bp, service_name, sp);
39 | }
40 | #pragma GCC diagnostic warning "-Wdeprecated-declarations"
41 |
42 | } // namesapce breakpad
43 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/windows/converter/ms_symbol_server_converter.gyp:
--------------------------------------------------------------------------------
1 | # Copyright 2013 Google Inc. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | # * Redistributions in binary form must reproduce the above
10 | # copyright notice, this list of conditions and the following disclaimer
11 | # in the documentation and/or other materials provided with the
12 | # distribution.
13 | # * Neither the name of Google Inc. nor the names of its
14 | # contributors may be used to endorse or promote products derived from
15 | # this software without specific prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 | {
30 | 'includes': [
31 | '../../../build/common.gypi',
32 | ],
33 | 'targets': [
34 | {
35 | 'target_name': 'ms_symbol_server_converter',
36 | 'type': 'static_library',
37 | 'msvs_guid': '1463C4CD-23FC-4DE9-BFDE-283338200157',
38 | 'sources': [
39 | 'ms_symbol_server_converter.cc',
40 | ],
41 | 'dependencies': [
42 | '../../../common/windows/common_windows.gyp:common_windows_lib',
43 | ],
44 | },
45 | ],
46 | }
47 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/linux/elf_gnu_compat.h:
--------------------------------------------------------------------------------
1 | // -*- mode: C++ -*-
2 |
3 | // Copyright (c) 2013, Google Inc.
4 | // All rights reserved.
5 | //
6 | // Redistribution and use in source and binary forms, with or without
7 | // modification, are permitted provided that the following conditions are
8 | // met:
9 | //
10 | // * Redistributions of source code must retain the above copyright
11 | // notice, this list of conditions and the following disclaimer.
12 | // * Redistributions in binary form must reproduce the above
13 | // copyright notice, this list of conditions and the following disclaimer
14 | // in the documentation and/or other materials provided with the
15 | // distribution.
16 | // * Neither the name of Google Inc. nor the names of its
17 | // contributors may be used to endorse or promote products derived from
18 | // this software without specific prior written permission.
19 | //
20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | // Original author: Lei Zhang
33 |
34 | // elf_gnu_compat.h: #defines unique to glibc's elf.h.
35 |
36 | #ifndef COMMON_LINUX_ELF_GNU_COMPAT_H_
37 | #define COMMON_LINUX_ELF_GNU_COMPAT_H_
38 |
39 | #include
40 |
41 | // A note type on GNU systems corresponding to the .note.gnu.build-id section.
42 | #ifndef NT_GNU_BUILD_ID
43 | #define NT_GNU_BUILD_ID 3
44 | #endif
45 |
46 | #endif // COMMON_LINUX_ELF_GNU_COMPAT_H_
47 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/linux/ignore_ret.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_IGNORE_RET_H_
31 | #define COMMON_LINUX_IGNORE_RET_H_
32 |
33 | // Some compilers are prone to warn about unused return values. In cases where
34 | // either a) the call cannot fail, or b) there is nothing that can be done when
35 | // the call fails, IGNORE_RET() can be used to mark the return code as ignored.
36 | // This avoids spurious compiler warnings.
37 |
38 | #define IGNORE_RET(x) do { if (x) {} } while (0)
39 |
40 | #endif // COMMON_LINUX_IGNORE_RET_H_
41 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/windows/symupload/symupload.gyp:
--------------------------------------------------------------------------------
1 | # Copyright 2013 Google Inc. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | # * Redistributions in binary form must reproduce the above
10 | # copyright notice, this list of conditions and the following disclaimer
11 | # in the documentation and/or other materials provided with the
12 | # distribution.
13 | # * Neither the name of Google Inc. nor the names of its
14 | # contributors may be used to endorse or promote products derived from
15 | # this software without specific prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 | {
30 | 'includes': [
31 | '../../../build/common.gypi',
32 | ],
33 | 'targets': [
34 | {
35 | 'target_name': 'symupload',
36 | 'type': 'executable',
37 | 'sources': [
38 | 'symupload.cc',
39 | ],
40 | 'dependencies': [
41 | '../../../common/windows/common_windows.gyp:common_windows_lib',
42 | ],
43 | 'msvs_settings': {
44 | 'VCLinkerTool': {
45 | 'LargeAddressAware': '2',
46 | },
47 | },
48 | },
49 | ],
50 | }
51 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/simple_string_dictionary.cc:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2007, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include "common/simple_string_dictionary.h"
31 |
32 | namespace google_breakpad {
33 |
34 | namespace {
35 |
36 | // In C++98 (ISO 14882), section 9.5.1 says that a union cannot have a member
37 | // with a non-trivial ctor, copy ctor, dtor, or assignment operator. Use this
38 | // property to ensure that Entry remains POD.
39 | union Compile_Assert {
40 | NonAllocatingMap<1, 1, 1>::Entry Compile_Assert__entry_must_be_pod;
41 | };
42 |
43 | }
44 |
45 | } // namespace google_breakpad
46 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/launch_reporter.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 COMMON_MAC_LAUNCH_REPORTER_H__
31 | #define COMMON_MAC_LAUNCH_REPORTER_H__
32 |
33 | namespace google_breakpad {
34 |
35 | // Launch the crash dump sender app.
36 | // |reporter_executable_path| is the path to the sender executable.
37 | // |config_file_path| is the path to the config file.
38 | void LaunchReporter(const char *reporter_executable_path,
39 | const char *config_file_path);
40 |
41 | } // namespace google_breakpad
42 |
43 | #endif // COMMON_MAC_LAUNCH_REPORTER_H__
44 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/solaris/dump_symbols.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2007, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // dump_symbols.cc: Implements a Solaris stab debugging format dumper.
31 | //
32 | // Author: Alfred Peng
33 |
34 | #ifndef COMMON_SOLARIS_DUMP_SYMBOLS_H__
35 | #define COMMON_SOLARIS_DUMP_SYMBOLS_H__
36 |
37 | #include
38 |
39 | namespace google_breakpad {
40 |
41 | class DumpSymbols {
42 | public:
43 | bool WriteSymbolFile(const std::string &obj_file,
44 | int sym_fd);
45 | };
46 |
47 | } // namespace google_breakpad
48 |
49 | #endif // COMMON_SOLARIS_DUMP_SYMBOLS_H__
50 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/linux/guid_creator.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_GUID_CREATOR_H__
31 | #define COMMON_LINUX_GUID_CREATOR_H__
32 |
33 | #include "google_breakpad/common/minidump_format.h"
34 |
35 | typedef MDGUID GUID;
36 |
37 | // Format string for parsing GUID.
38 | #define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x"
39 | // Length of GUID string. Don't count the ending '\0'.
40 | #define kGUIDStringLength 36
41 |
42 | // Create a guid.
43 | bool CreateGUID(GUID *guid);
44 |
45 | // Get the string from guid.
46 | bool GUIDToString(const GUID *guid, char *buf, int buf_len);
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/solaris/dump_syms/run_regtest.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2007, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | ./dump_syms testdata/dump_syms_regtest.o > testdata/dump_syms_regtest.new
33 | status=$?
34 |
35 | if [ $status -ne 0 ] ; then
36 | echo "FAIL, dump_syms failed"
37 | exit $status
38 | fi
39 |
40 | diff -u testdata/dump_syms_regtest.new testdata/dump_syms_regtest.sym > \
41 | testdata/dump_syms_regtest.diff
42 | status=$?
43 |
44 | if [ $status -eq 0 ] ; then
45 | rm testdata/dump_syms_regtest.diff testdata/dump_syms_regtest.new
46 | echo "PASS"
47 | else
48 | echo "FAIL, see testdata/dump_syms_regtest.[new|diff]"
49 | fi
50 |
51 | exit $status
52 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/processor_tools.gypi:
--------------------------------------------------------------------------------
1 | # Copyright 2014 Google Inc. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | # * Redistributions in binary form must reproduce the above
10 | # copyright notice, this list of conditions and the following disclaimer
11 | # in the documentation and/or other materials provided with the
12 | # distribution.
13 | # * Neither the name of Google Inc. nor the names of its
14 | # contributors may be used to endorse or promote products derived from
15 | # this software without specific prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 | {
30 | 'target_defaults': {
31 | 'include_dirs': [
32 | '..',
33 | ],
34 | },
35 | 'targets': [
36 | {
37 | 'target_name': 'minidump_dump',
38 | 'type': 'executable',
39 | 'sources': [
40 | 'minidump_dump.cc',
41 | ],
42 | 'dependencies': [
43 | 'processor',
44 | ],
45 | },
46 | {
47 | 'target_name': 'minidump_stackwalk',
48 | 'type': 'executable',
49 | 'sources': [
50 | 'minidump_stackwalk.cc',
51 | ],
52 | 'dependencies': [
53 | 'processor',
54 | ],
55 | },
56 | ],
57 | }
58 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/microdump_stackwalk_test:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2014, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | . "${0%/*}/microdump_stackwalk_test_vars" || exit 1 # for MICRODUMP_SUPPORTED_ARCHS.
33 | testdata_dir=$srcdir/src/processor/testdata
34 |
35 | set -e # Bail out with an error if any of the commands below fails.
36 | for ARCH in $MICRODUMP_SUPPORTED_ARCHS; do
37 | echo "Testing microdump_stackwalk for arch $ARCH"
38 | ./src/processor/microdump_stackwalk $testdata_dir/microdump-${ARCH}.dmp \
39 | $testdata_dir/symbols/microdump | \
40 | tr -d '\015' | \
41 | diff -u $testdata_dir/microdump.stackwalk-${ARCH}.out -
42 | done
43 | exit 0
44 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/solaris/dump_syms/dump_syms.cc:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2007, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // Author: Alfred Peng
31 |
32 | #include
33 | #include
34 |
35 | #include "common/solaris/dump_symbols.h"
36 |
37 | using namespace google_breakpad;
38 |
39 | int main(int argc, char **argv) {
40 | if (argc != 2) {
41 | fprintf(stderr, "Usage: %s \n", argv[0]);
42 | return 1;
43 | }
44 |
45 | const char *binary = argv[1];
46 |
47 | DumpSymbols dumper;
48 | if (!dumper.WriteSymbolFile(binary, fileno(stdout))) {
49 | fprintf(stderr, "Failed to write symbol file.\n");
50 | return 1;
51 | }
52 |
53 | return 0;
54 | }
55 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/dwarf/types.h:
--------------------------------------------------------------------------------
1 | // Copyright 2008 Google, Inc. All Rights reserved
2 | //
3 | // Redistribution and use in source and binary forms, with or without
4 | // modification, are permitted provided that the following conditions are
5 | // met:
6 | //
7 | // * Redistributions of source code must retain the above copyright
8 | // notice, this list of conditions and the following disclaimer.
9 | // * Redistributions in binary form must reproduce the above
10 | // copyright notice, this list of conditions and the following disclaimer
11 | // in the documentation and/or other materials provided with the
12 | // distribution.
13 | // * Neither the name of Google Inc. nor the names of its
14 | // contributors may be used to endorse or promote products derived from
15 | // this software without specific prior written permission.
16 | //
17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 |
30 | // This file contains some typedefs for basic types
31 |
32 |
33 | #ifndef _COMMON_DWARF_TYPES_H__
34 | #define _COMMON_DWARF_TYPES_H__
35 |
36 | #include
37 |
38 | typedef signed char int8;
39 | typedef short int16;
40 | typedef int int32;
41 | typedef long long int64;
42 |
43 | typedef unsigned char uint8;
44 | typedef unsigned short uint16;
45 | typedef unsigned int uint32;
46 | typedef unsigned long long uint64;
47 |
48 | typedef intptr_t intptr;
49 | typedef uintptr_t uintptr;
50 |
51 | #endif // _COMMON_DWARF_TYPES_H__
52 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/windows/dump_syms/run_regtest.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2006, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | Release/dump_syms.exe testdata/dump_syms_regtest.pdb | \
33 | tr -d '\015' > \
34 | testdata/dump_syms_regtest.new
35 | status=$?
36 |
37 | if [ $status -ne 0 ] ; then
38 | echo "FAIL, dump_syms.exe failed"
39 | exit $status
40 | fi
41 |
42 | diff -u testdata/dump_syms_regtest.new testdata/dump_syms_regtest.sym > \
43 | testdata/dump_syms_regtest.diff
44 | status=$?
45 |
46 | if [ $status -eq 0 ] ; then
47 | rm testdata/dump_syms_regtest.diff testdata/dump_syms_regtest.new
48 | echo "PASS"
49 | else
50 | echo "FAIL, see testdata/dump_syms_regtest.[new|diff]"
51 | fi
52 |
53 | exit $status
54 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/microdump_stackwalk_machine_readable_test:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Copyright (c) 2014, Google Inc.
4 | # All rights reserved.
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | . "${0%/*}/microdump_stackwalk_test_vars" || exit 1 # for MICRODUMP_SUPPORTED_ARCHS.
33 | testdata_dir=$srcdir/src/processor/testdata
34 |
35 | set -e # Bail out with an error if any of the commands below fails.
36 | for ARCH in $MICRODUMP_SUPPORTED_ARCHS; do
37 | echo "Testing microdump_stackwalk -m for arch $ARCH"
38 | ./src/processor/microdump_stackwalk -m $testdata_dir/microdump-${ARCH}.dmp \
39 | $testdata_dir/symbols/microdump | \
40 | tr -d '\015' | \
41 | diff -u $testdata_dir/microdump.stackwalk.machine_readable-${ARCH}.out -
42 | done
43 | exit 0
44 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/path_helper.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2017, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include "common/path_helper.h"
31 |
32 | #include
33 | #include
34 | #include
35 | #include
36 |
37 | namespace google_breakpad {
38 |
39 | string BaseName(const string& path) {
40 | char* path_tmp = strdup(path.c_str());
41 | assert(path_tmp);
42 | string result(basename(path_tmp));
43 | free(path_tmp);
44 | return result;
45 | }
46 |
47 | string DirName(const string& path) {
48 | char* path_tmp = strdup(path.c_str());
49 | assert(path_tmp);
50 | string result(dirname(path_tmp));
51 | free(path_tmp);
52 | return result;
53 | }
54 |
55 | } // namespace google_breakpad
56 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/solaris/guid_creator.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2007, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // Author: Alfred Peng
31 |
32 | #ifndef COMMON_SOLARIS_GUID_CREATOR_H__
33 | #define COMMON_SOLARIS_GUID_CREATOR_H__
34 |
35 | #include "google_breakpad/common/minidump_format.h"
36 |
37 | typedef MDGUID GUID;
38 |
39 | // Format string for parsing GUID.
40 | #define kGUIDFormatString "%08x-%04x-%04x-%08x-%08x"
41 | // Length of GUID string. Don't count the ending '\0'.
42 | #define kGUIDStringLength 36
43 |
44 | // Create a guid.
45 | bool CreateGUID(GUID *guid);
46 |
47 | // Get the string from guid.
48 | bool GUIDToString(const GUID *guid, char *buf, int buf_len);
49 |
50 | #endif // COMMON_SOLARIS_GUID_CREATOR_H__
51 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/call_stack.cc:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // call_stack.cc: A call stack comprised of stack frames.
31 | //
32 | // See call_stack.h for documentation.
33 | //
34 | // Author: Mark Mentovai
35 |
36 | #include "google_breakpad/processor/call_stack.h"
37 | #include "google_breakpad/processor/stack_frame.h"
38 |
39 | namespace google_breakpad {
40 |
41 | CallStack::~CallStack() {
42 | Clear();
43 | }
44 |
45 | void CallStack::Clear() {
46 | for (vector::const_iterator iterator = frames_.begin();
47 | iterator != frames_.end();
48 | ++iterator) {
49 | delete *iterator;
50 | }
51 | tid_ = 0;
52 | }
53 |
54 | } // namespace google_breakpad
55 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/client/linux/crash_generation/client_info.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_
31 | #define CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_
32 |
33 | namespace google_breakpad {
34 |
35 | class CrashGenerationServer;
36 |
37 | class ClientInfo {
38 | public:
39 | ClientInfo(pid_t pid, CrashGenerationServer* crash_server)
40 | : crash_server_(crash_server),
41 | pid_(pid) {}
42 |
43 | CrashGenerationServer* crash_server() const { return crash_server_; }
44 | pid_t pid() const { return pid_; }
45 |
46 | private:
47 | CrashGenerationServer* crash_server_;
48 | pid_t pid_;
49 | };
50 |
51 | }
52 |
53 | #endif // CLIENT_LINUX_CRASH_GENERATION_CLIENT_INFO_H_
54 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/symbolic_constants_win.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // ntstatus_reason_win.h: Windows NTSTATUS code to string.
31 | //
32 | // Provides a means to convert NTSTATUS codes to strings.
33 | //
34 | // Author: Ben Wagner
35 |
36 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_SYMBOLIC_CONSTANTS_WIN_H_
37 | #define GOOGLE_BREAKPAD_PROCESSOR_SYMBOLIC_CONSTANTS_WIN_H_
38 |
39 | #include
40 |
41 | #include "common/using_std_string.h"
42 | #include "google_breakpad/common/breakpad_types.h"
43 |
44 | namespace google_breakpad {
45 |
46 | /* Converts a NTSTATUS code to a reason string. */
47 | string NTStatusToString(uint32_t ntstatus);
48 |
49 | } // namespace google_breakpad
50 |
51 | #endif // GOOGLE_BREAKPAD_PROCESSOR_SYMBOLIC_CONSTANTS_WIN_H_
52 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/arch_utilities.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 | // arch_utilities.h: Utilities for architecture introspection for Mac platform.
31 |
32 | #ifndef COMMON_MAC_ARCH_UTILITIES_H__
33 | #define COMMON_MAC_ARCH_UTILITIES_H__
34 |
35 | #include
36 |
37 | namespace google_breakpad {
38 |
39 | // Custom implementation of |NXGetArchInfoFromName| and
40 | // |NXGetArchInfoFromCpuType| that handle newer CPU on older OSes.
41 | const NXArchInfo* BreakpadGetArchInfoFromName(const char* arch_name);
42 | const NXArchInfo* BreakpadGetArchInfoFromCpuType(cpu_type_t cpu_type,
43 | cpu_subtype_t cpu_subtype);
44 |
45 | } // namespace google_breakpad
46 |
47 | #endif // COMMON_MAC_ARCH_UTILITIES_H__
48 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/android/include/ucontext.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
31 | #define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
32 |
33 | #include
34 |
35 | #ifdef __BIONIC_UCONTEXT_H
36 | #include
37 | #else
38 |
39 | #include
40 |
41 | #ifdef __cplusplus
42 | extern "C" {
43 | #endif // __cplusplus
44 |
45 | // Provided by src/android/common/breakpad_getcontext.S
46 | int breakpad_getcontext(ucontext_t* ucp);
47 |
48 | #define getcontext(x) breakpad_getcontext(x)
49 |
50 | #ifdef __cplusplus
51 | } // extern "C"
52 | #endif // __cplusplus
53 |
54 | #endif // __BIONIC_UCONTEXT_H
55 |
56 | #endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
57 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/string_utilities.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // string_utilities.h: Utilities for strings for Mac platform
31 |
32 | #ifndef COMMON_MAC_STRING_UTILITIES_H__
33 | #define COMMON_MAC_STRING_UTILITIES_H__
34 |
35 | #include
36 |
37 | #include
38 |
39 | namespace MacStringUtils {
40 |
41 | using std::string;
42 |
43 | // Convert a CoreFoundation string into a std::string
44 | string ConvertToString(CFStringRef str);
45 |
46 | // Return the idx'th decimal integer in str, separated by non-decimal-digits
47 | // E.g., str = 10.4.8, idx = 1 -> 4
48 | unsigned int IntegerValueAtIndex(string &str, unsigned int idx);
49 |
50 | } // namespace MacStringUtils
51 |
52 | #endif // COMMON_MAC_STRING_UTILITIES_H__
53 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/minidump_type_helper.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_TYPE_HELPER_H_
31 | #define GOOGLE_BREAKPAD_COMMON_MINIDUMP_TYPE_HELPER_H_
32 |
33 | #include
34 |
35 | #include "google_breakpad/common/minidump_format.h"
36 |
37 | namespace google_breakpad {
38 |
39 | template
40 | struct MDTypeHelper;
41 |
42 | template <>
43 | struct MDTypeHelper {
44 | typedef MDRawDebug32 MDRawDebug;
45 | typedef MDRawLinkMap32 MDRawLinkMap;
46 | };
47 |
48 | template <>
49 | struct MDTypeHelper {
50 | typedef MDRawDebug64 MDRawDebug;
51 | typedef MDRawLinkMap64 MDRawLinkMap;
52 | };
53 |
54 | } // namespace google_breakpad
55 |
56 | #endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_TYPE_HELPER_H_
57 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/stackwalk_common.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // stackwalk_common.cc: Module shared by the {micro,mini}dump_stackwalck
31 | // executables to print the content of dumps (w/ stack traces) on the console.
32 |
33 |
34 | #ifndef PROCESSOR_STACKWALK_COMMON_H__
35 | #define PROCESSOR_STACKWALK_COMMON_H__
36 |
37 | namespace google_breakpad {
38 |
39 | class ProcessState;
40 | class SourceLineResolverInterface;
41 |
42 | void PrintProcessStateMachineReadable(const ProcessState& process_state);
43 | void PrintProcessState(const ProcessState& process_state,
44 | bool output_stack_contents,
45 | SourceLineResolverInterface* resolver);
46 |
47 | } // namespace google_breakpad
48 |
49 | #endif // PROCESSOR_STACKWALK_COMMON_H__
50 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/client/linux/handler/microdump_extra_info.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_
31 | #define CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_
32 |
33 | namespace google_breakpad {
34 |
35 | struct MicrodumpExtraInfo {
36 | // Strings pointed to by this struct are not copied, and are
37 | // expected to remain valid for the lifetime of the process.
38 | const char* build_fingerprint;
39 | const char* product_info;
40 | const char* gpu_fingerprint;
41 | const char* process_type;
42 |
43 | MicrodumpExtraInfo()
44 | : build_fingerprint(NULL),
45 | product_info(NULL),
46 | gpu_fingerprint(NULL),
47 | process_type(NULL) {}
48 | };
49 |
50 | }
51 |
52 | #endif // CLIENT_LINUX_HANDLER_MICRODUMP_EXTRA_INFO_H_
53 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/mac/scoped_task_suspend-inl.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2010 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // Inline implementation of ScopedTaskSuspend, which suspends a Mach
31 | // task for the duration of its scope.
32 |
33 | #ifndef GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_
34 | #define GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_
35 |
36 | #include
37 |
38 | namespace google_breakpad {
39 |
40 | class ScopedTaskSuspend {
41 | public:
42 | explicit ScopedTaskSuspend(mach_port_t target) : target_(target) {
43 | task_suspend(target_);
44 | }
45 |
46 | ~ScopedTaskSuspend() {
47 | task_resume(target_);
48 | }
49 |
50 | private:
51 | mach_port_t target_;
52 | };
53 |
54 | } // namespace google_breakpad
55 |
56 | #endif // GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_
57 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/linux/symbol_upload.h:
--------------------------------------------------------------------------------
1 | // -*- mode: c++ -*-
2 |
3 | // Copyright (c) 2011 Google Inc.
4 | // All rights reserved.
5 | //
6 | // Redistribution and use in source and binary forms, with or without
7 | // modification, are permitted provided that the following conditions are
8 | // met:
9 | //
10 | // * Redistributions of source code must retain the above copyright
11 | // notice, this list of conditions and the following disclaimer.
12 | // * Redistributions in binary form must reproduce the above
13 | // copyright notice, this list of conditions and the following disclaimer
14 | // in the documentation and/or other materials provided with the
15 | // distribution.
16 | // * Neither the name of Google Inc. nor the names of its
17 | // contributors may be used to endorse or promote products derived from
18 | // this software without specific prior written permission.
19 | //
20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | // symbol_upload.h: helper functions for linux symbol upload tool.
33 |
34 | #ifndef COMMON_LINUX_SYMBOL_UPLOAD_H_
35 | #define COMMON_LINUX_SYMBOL_UPLOAD_H_
36 |
37 | #include
38 |
39 | #include "common/using_std_string.h"
40 |
41 | namespace google_breakpad {
42 | namespace sym_upload {
43 |
44 | typedef struct {
45 | string symbolsPath;
46 | string uploadURLStr;
47 | string proxy;
48 | string proxy_user_pwd;
49 | string version;
50 | bool success;
51 | } Options;
52 |
53 | // Starts upload to symbol server with options.
54 | void Start(Options* options);
55 |
56 | } // namespace sym_upload
57 | } // namespace google_breakpad
58 |
59 | #endif // COMMON_LINUX_SYMBOL_UPLOAD_H_
60 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/pathname_stripper.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // pathname_stripper.h: Manipulates pathnames into their component parts.
31 | //
32 | // Author: Mark Mentovai
33 |
34 | #ifndef PROCESSOR_PATHNAME_STRIPPER_H__
35 | #define PROCESSOR_PATHNAME_STRIPPER_H__
36 |
37 | #include
38 |
39 | #include "common/using_std_string.h"
40 |
41 | namespace google_breakpad {
42 |
43 | class PathnameStripper {
44 | public:
45 | // Given path, a pathname with components separated by slashes (/) or
46 | // backslashes (\), returns the trailing component, without any separator.
47 | // If path ends in a separator character, returns an empty string.
48 | static string File(const string &path);
49 | };
50 |
51 | } // namespace google_breakpad
52 |
53 | #endif // PROCESSOR_PATHNAME_STRIPPER_H__
54 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/common/linux/crc32.h:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #ifndef COMMON_LINUX_CRC32_H_
31 | #define COMMON_LINUX_CRC32_H_
32 |
33 | #include
34 |
35 | #include
36 |
37 | namespace google_breakpad {
38 |
39 | // Updates a CRC32 checksum with |len| bytes from |buf|. |initial| holds the
40 | // checksum result from the previous update; for the first call, it should be 0.
41 | uint32_t UpdateCrc32(uint32_t initial, const void* buf, size_t len);
42 |
43 | // Computes a CRC32 checksum using |len| bytes from |buf|.
44 | inline uint32_t ComputeCrc32(const void* buf, size_t len) {
45 | return UpdateCrc32(0, buf, len);
46 | }
47 | inline uint32_t ComputeCrc32(const std::string& str) {
48 | return ComputeCrc32(str.c_str(), str.size());
49 | }
50 |
51 | } // namespace google_breakpad
52 |
53 | #endif // COMMON_LINUX_CRC32_H_
54 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/tools/solaris/dump_syms/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2007, Google Inc.
2 | # All rights reserved.
3 | #
4 | # Redistribution and use in source and binary forms, with or without
5 | # modification, are permitted provided that the following conditions are
6 | # met:
7 | #
8 | # * Redistributions of source code must retain the above copyright
9 | # notice, this list of conditions and the following disclaimer.
10 | # * Redistributions in binary form must reproduce the above
11 | # copyright notice, this list of conditions and the following disclaimer
12 | # in the documentation and/or other materials provided with the
13 | # distribution.
14 | # * Neither the name of Google Inc. nor the names of its
15 | # contributors may be used to endorse or promote products derived from
16 | # this software without specific prior written permission.
17 | #
18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | # Author: Alfred Peng
31 |
32 | CXX=CC
33 | CC=cc
34 |
35 | CXXFLAGS=-g -xs -xdebugformat=stabs -I../../.. -I../../../common/solaris -lelf -ldemangle -D_REENTRANT
36 |
37 | .PHONY:all clean
38 |
39 | BIN=dump_syms
40 |
41 | all:$(BIN)
42 |
43 | DUMP_OBJ=dump_symbols.o guid_creator.o dump_syms.o file_id.o md5.o
44 |
45 | dump_syms:$(DUMP_OBJ)
46 | $(CXX) $(CXXFLAGS) -o $@ $^
47 |
48 | dump_symbols.o:../../../common/solaris/dump_symbols.cc
49 | $(CXX) $(CXXFLAGS) -c $^
50 |
51 | guid_creator.o:../../../common/solaris/guid_creator.cc
52 | $(CXX) $(CXXFLAGS) -c $^
53 |
54 | file_id.o:../../../common/solaris/file_id.cc
55 | $(CXX) $(CXXFLAGS) -c $^
56 |
57 | md5.o:../../../common/md5.cc
58 | $(CXX) $(CXXFLAGS) -c $^
59 |
60 | test:all
61 | ./run_regtest.sh
62 |
63 | clean:
64 | rm -f $(BIN) $(DUMP_OBJ)
65 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/google_breakpad/processor/dump_object.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // dump_object.h: A base class for all mini/micro dump object.
31 |
32 | #ifndef GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__
33 | #define GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__
34 |
35 | namespace google_breakpad {
36 |
37 | // DumpObject is the base of various mini/micro dump's objects.
38 | class DumpObject {
39 | public:
40 | DumpObject();
41 |
42 | bool valid() const { return valid_; }
43 |
44 | protected:
45 | // DumpObjects are not valid when created. When a subclass populates its own
46 | // fields, it can set valid_ to true. Accessors and mutators may wish to
47 | // consider or alter the valid_ state as they interact with objects.
48 | bool valid_;
49 | };
50 |
51 | } // namespace google_breakpad
52 |
53 | #endif // GOOGLE_BREAKPAD_PROCESSOR_DUMP_OBJECT_H__
54 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/third_party/libdisasm/libdisasm.gyp:
--------------------------------------------------------------------------------
1 | # Copyright 2014 Google Inc. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | #
7 | # * Redistributions of source code must retain the above copyright
8 | # notice, this list of conditions and the following disclaimer.
9 | # * Redistributions in binary form must reproduce the above
10 | # copyright notice, this list of conditions and the following disclaimer
11 | # in the documentation and/or other materials provided with the
12 | # distribution.
13 | # * Neither the name of Google Inc. nor the names of its
14 | # contributors may be used to endorse or promote products derived from
15 | # this software without specific prior written permission.
16 | #
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 | {
30 | 'includes': [
31 | '../../build/common.gypi',
32 | ],
33 | 'targets': [
34 | {
35 | 'target_name': 'libdisasm',
36 | 'type': 'static_library',
37 | 'sources': [
38 | 'ia32_implicit.c',
39 | 'ia32_implicit.h',
40 | 'ia32_insn.c',
41 | 'ia32_insn.h',
42 | 'ia32_invariant.c',
43 | 'ia32_invariant.h',
44 | 'ia32_modrm.c',
45 | 'ia32_modrm.h',
46 | 'ia32_opcode_tables.c',
47 | 'ia32_opcode_tables.h',
48 | 'ia32_operand.c',
49 | 'ia32_operand.h',
50 | 'ia32_reg.c',
51 | 'ia32_reg.h',
52 | 'ia32_settings.c',
53 | 'ia32_settings.h',
54 | 'libdis.h',
55 | 'qword.h',
56 | 'x86_disasm.c',
57 | 'x86_format.c',
58 | 'x86_imm.c',
59 | 'x86_imm.h',
60 | 'x86_insn.c',
61 | 'x86_misc.c',
62 | 'x86_operand_list.c',
63 | 'x86_operand_list.h',
64 | ],
65 | },
66 | ],
67 | }
68 |
--------------------------------------------------------------------------------
/crash_breakpad_build/src/main/cpp/libbreakpad/src/processor/pathname_stripper.cc:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // pathname_stripper.cc: Manipulates pathnames into their component parts.
31 | //
32 | // See pathname_stripper.h for documentation.
33 | //
34 | // Author: Mark Mentovai
35 |
36 | #include "processor/pathname_stripper.h"
37 |
38 | namespace google_breakpad {
39 |
40 | // static
41 | string PathnameStripper::File(const string &path) {
42 | string::size_type slash = path.rfind('/');
43 | string::size_type backslash = path.rfind('\\');
44 |
45 | string::size_type file_start = 0;
46 | if (slash != string::npos &&
47 | (backslash == string::npos || slash > backslash)) {
48 | file_start = slash + 1;
49 | } else if (backslash != string::npos) {
50 | file_start = backslash + 1;
51 | }
52 |
53 | return path.substr(file_start);
54 | }
55 |
56 | } // namespace google_breakpad
57 |
--------------------------------------------------------------------------------