mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 31c98f5e107b (bug 1069556)
This commit is contained in:
parent
4da159aed8
commit
fa82dc1b72
@ -21,6 +21,7 @@ if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'Darwin':
|
||||
USE_LIBS += [
|
||||
'breakpad_common_s',
|
||||
'breakpad_logging',
|
||||
]
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
|
15
toolkit/crashreporter/Makefile.in
Normal file
15
toolkit/crashreporter/Makefile.in
Normal file
@ -0,0 +1,15 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifeq ($(OS_TARGET),Android)
|
||||
# NDK5 workarounds
|
||||
TARGET_LOCAL_INCLUDES = \
|
||||
-I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/ \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
check::
|
||||
$(PYTHON) $(srcdir)/tools/unit-symbolstore.py
|
16
toolkit/crashreporter/breakpad-logging/BreakpadLogging.cpp
Normal file
16
toolkit/crashreporter/breakpad-logging/BreakpadLogging.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "BreakpadLogging.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
// An output stream that acts like /dev/null and drops all output directed to it
|
||||
// Passing 0 here causes the ostream to enter an error state, and so it silently
|
||||
// drops all output directed to it.
|
||||
std::ostream gNullStream(0);
|
||||
|
||||
} // namespace mozilla
|
20
toolkit/crashreporter/breakpad-logging/BreakpadLogging.h
Normal file
20
toolkit/crashreporter/breakpad-logging/BreakpadLogging.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef BreakpadLogging_h
|
||||
#define BreakpadLogging_h
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
// An output stream that acts like /dev/null and drops all output directed to it
|
||||
extern std::ostream gNullStream;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
// Override the breakpad info stream to disable INFO logs
|
||||
#define BPLOG_INFO_STREAM mozilla::gNullStream
|
||||
|
||||
#endif // BreakpadLogging_h
|
16
toolkit/crashreporter/breakpad-logging/moz.build
Normal file
16
toolkit/crashreporter/breakpad-logging/moz.build
Normal file
@ -0,0 +1,16 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'BreakpadLogging.cpp',
|
||||
]
|
||||
|
||||
Library('breakpad_logging')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Toolkit', 'Breakpad Integration')
|
@ -11,6 +11,10 @@ if CONFIG['OS_TARGET'] != 'Android':
|
||||
'crashreporter.cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../google-breakpad/src',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
UNIFIED_SOURCES += [
|
||||
'crashreporter_win.cpp',
|
||||
@ -38,6 +42,7 @@ elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
OS_LIBS += ['-framework Cocoa']
|
||||
USE_LIBS += [
|
||||
'breakpad_common_s',
|
||||
'breakpad_logging',
|
||||
'breakpad_mac_common_s',
|
||||
]
|
||||
elif CONFIG['OS_ARCH'] == 'SunOS':
|
||||
|
@ -4,10 +4,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
]
|
||||
|
||||
# Suppress warnings in third-party code.
|
||||
if CONFIG['_MSC_VER']:
|
||||
CXXFLAGS += [
|
||||
@ -19,8 +15,3 @@ elif CONFIG['GNU_CXX']:
|
||||
]
|
||||
if CONFIG['CLANG_CXX']:
|
||||
CXXFLAGS += ['-Wno-implicit-fallthrough']
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
DEFINES['ELFSIZE'] = 32
|
||||
|
||||
DEFINES['NO_STABS_SUPPORT'] = True
|
||||
|
@ -1,159 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_ELF_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_ELF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
// The Android <elf.h> provides BSD-based definitions for the ElfXX_Nhdr
|
||||
// types
|
||||
// always source-compatible with the GLibc/kernel ones. To overcome this
|
||||
// issue without modifying a lot of code in Breakpad, use an ugly macro
|
||||
// renaming trick with #include_next
|
||||
|
||||
// Avoid conflict with BSD-based definition of ElfXX_Nhdr.
|
||||
// Unfortunately, their field member names do not use a 'n_' prefix.
|
||||
#define Elf32_Nhdr __bsd_Elf32_Nhdr
|
||||
#define Elf64_Nhdr __bsd_Elf64_Nhdr
|
||||
|
||||
// In case they are defined by the NDK version
|
||||
#define Elf32_auxv_t __bionic_Elf32_auxv_t
|
||||
#define Elf64_auxv_t __bionic_Elf64_auxv_t
|
||||
|
||||
#define Elf32_Dyn __bionic_Elf32_Dyn
|
||||
#define Elf64_Dyn __bionic_Elf64_Dyn
|
||||
|
||||
#include_next <elf.h>
|
||||
|
||||
#undef Elf32_Nhdr
|
||||
#undef Elf64_Nhdr
|
||||
|
||||
typedef struct {
|
||||
Elf32_Word n_namesz;
|
||||
Elf32_Word n_descsz;
|
||||
Elf32_Word n_type;
|
||||
} Elf32_Nhdr;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Word n_namesz;
|
||||
Elf64_Word n_descsz;
|
||||
Elf64_Word n_type;
|
||||
} Elf64_Nhdr;
|
||||
|
||||
#undef Elf32_auxv_t
|
||||
#undef Elf64_auxv_t
|
||||
|
||||
typedef struct {
|
||||
uint32_t a_type;
|
||||
union {
|
||||
uint32_t a_val;
|
||||
} a_un;
|
||||
} Elf32_auxv_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t a_type;
|
||||
union {
|
||||
uint64_t a_val;
|
||||
} a_un;
|
||||
} Elf64_auxv_t;
|
||||
|
||||
#undef Elf32_Dyn
|
||||
#undef Elf64_Dyn
|
||||
|
||||
typedef struct {
|
||||
Elf32_Sword d_tag;
|
||||
union {
|
||||
Elf32_Word d_val;
|
||||
Elf32_Addr d_ptr;
|
||||
} d_un;
|
||||
} Elf32_Dyn;
|
||||
|
||||
typedef struct {
|
||||
Elf64_Sxword d_tag;
|
||||
union {
|
||||
Elf64_Xword d_val;
|
||||
Elf64_Addr d_ptr;
|
||||
} d_un;
|
||||
} Elf64_Dyn;
|
||||
|
||||
|
||||
// __WORDSIZE is GLibc-specific and used by Google Breakpad on Linux.
|
||||
// All Android platforms are 32-bit for now.
|
||||
#ifndef __WORDSIZE
|
||||
#define __WORDSIZE 32
|
||||
#endif
|
||||
|
||||
// The Android headers don't always define this constant.
|
||||
#ifndef EM_X86_64
|
||||
#define EM_X86_64 62
|
||||
#endif
|
||||
|
||||
#ifndef EM_PPC64
|
||||
#define EM_PPC64 21
|
||||
#endif
|
||||
|
||||
#ifndef EM_S390
|
||||
#define EM_S390 22
|
||||
#endif
|
||||
|
||||
#if !defined(AT_SYSINFO_EHDR)
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
#endif
|
||||
|
||||
#if !defined(NT_PRSTATUS)
|
||||
#define NT_PRSTATUS 1
|
||||
#endif
|
||||
|
||||
#if !defined(NT_PRPSINFO)
|
||||
#define NT_PRPSINFO 3
|
||||
#endif
|
||||
|
||||
#if !defined(NT_AUXV)
|
||||
#define NT_AUXV 6
|
||||
#endif
|
||||
|
||||
#if !defined(NT_PRXFPREG)
|
||||
#define NT_PRXFPREG 0x46e62b7f
|
||||
#endif
|
||||
|
||||
#if !defined(NT_FPREGSET)
|
||||
#define NT_FPREGSET 2
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_ELF_H
|
@ -1,67 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H
|
||||
#define GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H
|
||||
|
||||
/* Android doesn't provide <link.h>. Provide custom version here */
|
||||
#include <elf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#define ElfW(type) _ElfW (Elf, ELFSIZE, type)
|
||||
#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
|
||||
#define _ElfW_1(e,w,t) e##w##t
|
||||
|
||||
struct r_debug {
|
||||
int r_version;
|
||||
struct link_map* r_map;
|
||||
ElfW(Addr) r_brk;
|
||||
enum {
|
||||
RT_CONSISTENT,
|
||||
RT_ADD,
|
||||
RT_DELETE } r_state;
|
||||
ElfW(Addr) r_ldbase;
|
||||
};
|
||||
|
||||
struct link_map {
|
||||
ElfW(Addr) l_addr;
|
||||
char* l_name;
|
||||
ElfW(Dyn)* l_ld;
|
||||
struct link_map* l_next;
|
||||
struct link_map* l_prev;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif /* GOOGLE_BREAKPAD_ANDROID_INCLUDE_LINK_H */
|
@ -1,100 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __BIONIC_HAVE_STAB_H
|
||||
#include <stab.h>
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#define _STAB_CODE_LIST \
|
||||
_STAB_CODE_DEF(UNDF,0x00) \
|
||||
_STAB_CODE_DEF(GSYM,0x20) \
|
||||
_STAB_CODE_DEF(FNAME,0x22) \
|
||||
_STAB_CODE_DEF(FUN,0x24) \
|
||||
_STAB_CODE_DEF(STSYM,0x26) \
|
||||
_STAB_CODE_DEF(LCSYM,0x28) \
|
||||
_STAB_CODE_DEF(MAIN,0x2a) \
|
||||
_STAB_CODE_DEF(PC,0x30) \
|
||||
_STAB_CODE_DEF(NSYMS,0x32) \
|
||||
_STAB_CODE_DEF(NOMAP,0x34) \
|
||||
_STAB_CODE_DEF(OBJ,0x38) \
|
||||
_STAB_CODE_DEF(OPT,0x3c) \
|
||||
_STAB_CODE_DEF(RSYM,0x40) \
|
||||
_STAB_CODE_DEF(M2C,0x42) \
|
||||
_STAB_CODE_DEF(SLINE,0x44) \
|
||||
_STAB_CODE_DEF(DSLINE,0x46) \
|
||||
_STAB_CODE_DEF(BSLINE,0x48) \
|
||||
_STAB_CODE_DEF(BROWS,0x48) \
|
||||
_STAB_CODE_DEF(DEFD,0x4a) \
|
||||
_STAB_CODE_DEF(EHDECL,0x50) \
|
||||
_STAB_CODE_DEF(MOD2,0x50) \
|
||||
_STAB_CODE_DEF(CATCH,0x54) \
|
||||
_STAB_CODE_DEF(SSYM,0x60) \
|
||||
_STAB_CODE_DEF(SO,0x64) \
|
||||
_STAB_CODE_DEF(LSYM,0x80) \
|
||||
_STAB_CODE_DEF(BINCL,0x82) \
|
||||
_STAB_CODE_DEF(SOL,0x84) \
|
||||
_STAB_CODE_DEF(PSYM,0xa0) \
|
||||
_STAB_CODE_DEF(EINCL,0xa2) \
|
||||
_STAB_CODE_DEF(ENTRY,0xa4) \
|
||||
_STAB_CODE_DEF(LBRAC,0xc0) \
|
||||
_STAB_CODE_DEF(EXCL,0xc2) \
|
||||
_STAB_CODE_DEF(SCOPE,0xc4) \
|
||||
_STAB_CODE_DEF(RBRAC,0xe0) \
|
||||
_STAB_CODE_DEF(BCOMM,0xe2) \
|
||||
_STAB_CODE_DEF(ECOMM,0xe4) \
|
||||
_STAB_CODE_DEF(ECOML,0xe8) \
|
||||
_STAB_CODE_DEF(NBTEXT,0xf0) \
|
||||
_STAB_CODE_DEF(NBDATA,0xf2) \
|
||||
_STAB_CODE_DEF(NBBSS,0xf4) \
|
||||
_STAB_CODE_DEF(NBSTS,0xf6) \
|
||||
_STAB_CODE_DEF(NBLCS,0xf8) \
|
||||
_STAB_CODE_DEF(LENG,0xfe)
|
||||
|
||||
enum __stab_debug_code {
|
||||
#define _STAB_CODE_DEF(x,y) N_##x = y,
|
||||
_STAB_CODE_LIST
|
||||
#undef _STAB_CODE_DEF
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __BIONIC_HAVE_STAB_H
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_STAB_H
|
@ -1,113 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_SYS_PROCFS_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_SYS_PROCFS_H
|
||||
|
||||
#ifdef __BIONIC_HAVE_SYS_PROCFS_H
|
||||
|
||||
#include_next <sys/procfs.h>
|
||||
|
||||
#else
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/user.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#ifdef __x86_64__
|
||||
typedef unsigned long long elf_greg_t;
|
||||
#else
|
||||
typedef unsigned long elf_greg_t;
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
#define ELF_NGREG (sizeof(struct user_regs) / sizeof(elf_greg_t))
|
||||
#else
|
||||
#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
|
||||
#endif
|
||||
|
||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
struct elf_siginfo {
|
||||
int si_signo;
|
||||
int si_code;
|
||||
int si_errno;
|
||||
};
|
||||
|
||||
struct elf_prstatus {
|
||||
struct elf_siginfo pr_info;
|
||||
short pr_cursig;
|
||||
unsigned long pr_sigpend;
|
||||
unsigned long pr_sighold;
|
||||
pid_t pr_pid;
|
||||
pid_t pr_ppid;
|
||||
pid_t pr_pgrp;
|
||||
pid_t pd_sid;
|
||||
struct timeval pr_utime;
|
||||
struct timeval pr_stime;
|
||||
struct timeval pr_cutime;
|
||||
struct timeval pr_cstime;
|
||||
elf_gregset_t pr_reg;
|
||||
int pr_fpvalid;
|
||||
};
|
||||
|
||||
#define ELF_PRARGSZ 80
|
||||
|
||||
struct elf_prpsinfo {
|
||||
char pr_state;
|
||||
char pr_sname;
|
||||
char pr_zomb;
|
||||
char pr_nice;
|
||||
unsigned long pr_flags;
|
||||
#ifdef __x86_64__
|
||||
unsigned int pr_uid;
|
||||
unsigned int pr_gid;
|
||||
#else
|
||||
unsigned short pr_uid;
|
||||
unsigned short pr_gid;
|
||||
#endif
|
||||
int pr_pid;
|
||||
int pr_ppid;
|
||||
int pr_pgrp;
|
||||
int pr_sid;
|
||||
char pr_fname[16];
|
||||
char pr_psargs[ELF_PRARGSZ];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __BIONIC_HAVE_SYS_PROCFS_H
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_SYS_PROCFS_H
|
@ -1,35 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_SIGNAL_H
|
@ -1,39 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_STAT_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_STAT_H
|
||||
|
||||
#include_next <sys/stat.h>
|
||||
|
||||
#ifndef S_IRWXU
|
||||
#define S_IRWXU 00700
|
||||
#endif
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_STAT_H
|
@ -1,175 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_UCONTEXT_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_UCONTEXT_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#ifndef __BIONIC_HAVE_UCONTEXT_T
|
||||
|
||||
// Ensure that 'stack_t' is defined.
|
||||
#include <asm/signal.h>
|
||||
|
||||
// This version of the Android C library headers do not provide ucontext_t.
|
||||
// Provide custom definitions for Google Breakpad.
|
||||
#if defined(__arm__)
|
||||
|
||||
// Ensure that 'struct sigcontext' is defined.
|
||||
#include <asm/sigcontext.h>
|
||||
typedef struct sigcontext mcontext_t;
|
||||
|
||||
// The ARM kernel uses a 64-bit signal mask.
|
||||
typedef uint32_t kernel_sigmask_t[2];
|
||||
|
||||
typedef struct ucontext {
|
||||
uint32_t uc_flags;
|
||||
struct ucontext* uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
kernel_sigmask_t uc_sigmask;
|
||||
// Other fields are not used by Google Breakpad. Don't define them.
|
||||
} ucontext_t;
|
||||
|
||||
#elif defined(__i386__)
|
||||
|
||||
/* 80-bit floating-point register */
|
||||
struct _libc_fpreg {
|
||||
unsigned short significand[4];
|
||||
unsigned short exponent;
|
||||
};
|
||||
|
||||
/* Simple floating-point state, see FNSTENV instruction */
|
||||
struct _libc_fpstate {
|
||||
unsigned long cw;
|
||||
unsigned long sw;
|
||||
unsigned long tag;
|
||||
unsigned long ipoff;
|
||||
unsigned long cssel;
|
||||
unsigned long dataoff;
|
||||
unsigned long datasel;
|
||||
struct _libc_fpreg _st[8];
|
||||
unsigned long status;
|
||||
};
|
||||
|
||||
typedef uint32_t greg_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t gregs[19];
|
||||
struct _libc_fpstate* fpregs;
|
||||
uint32_t oldmask;
|
||||
uint32_t cr2;
|
||||
} mcontext_t;
|
||||
|
||||
enum {
|
||||
REG_GS = 0,
|
||||
REG_FS,
|
||||
REG_ES,
|
||||
REG_DS,
|
||||
REG_EDI,
|
||||
REG_ESI,
|
||||
REG_EBP,
|
||||
REG_ESP,
|
||||
REG_EBX,
|
||||
REG_EDX,
|
||||
REG_ECX,
|
||||
REG_EAX,
|
||||
REG_TRAPNO,
|
||||
REG_ERR,
|
||||
REG_EIP,
|
||||
REG_CS,
|
||||
REG_EFL,
|
||||
REG_UESP,
|
||||
REG_SS,
|
||||
};
|
||||
|
||||
// The i386 kernel uses a 64-bit signal mask.
|
||||
typedef uint32_t kernel_sigmask_t[2];
|
||||
|
||||
typedef struct ucontext {
|
||||
uint32_t uc_flags;
|
||||
struct ucontext* uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
kernel_sigmask_t uc_sigmask;
|
||||
struct _libc_fpstate __fpregs_mem;
|
||||
} ucontext_t;
|
||||
|
||||
#elif defined(__mips__)
|
||||
|
||||
// Not supported by Google Breakpad at this point, but just in case.
|
||||
typedef struct {
|
||||
uint32_t regmask;
|
||||
uint32_t status;
|
||||
uint64_t pc;
|
||||
uint64_t gregs[32];
|
||||
uint64_t fpregs[32];
|
||||
uint32_t acx;
|
||||
uint32_t fpc_csr;
|
||||
uint32_t fpc_eir;
|
||||
uint32_t used_math;
|
||||
uint32_t dsp;
|
||||
uint64_t mdhi;
|
||||
uint64_t mdlo;
|
||||
uint32_t hi1;
|
||||
uint32_t lo1;
|
||||
uint32_t hi2;
|
||||
uint32_t lo2;
|
||||
uint32_t hi3;
|
||||
uint32_t lo3;
|
||||
} mcontext_t;
|
||||
|
||||
// The MIPS kernel uses a 128-bit signal mask.
|
||||
typedef uint32_t kernel_sigmask_t[4];
|
||||
|
||||
typedef struct ucontext {
|
||||
uint32_t uc_flags;
|
||||
struct ucontext* uc_link;
|
||||
stack_t uc_stack;
|
||||
mcontext_t uc_mcontext;
|
||||
kernel_sigmask_t uc_sigmask;
|
||||
// Other fields are not used by Google Breakpad. Don't define them.
|
||||
} ucontext_t;
|
||||
|
||||
#else
|
||||
# error "Unsupported Android CPU ABI!"
|
||||
#endif
|
||||
|
||||
#endif // __BIONIC_HAVE_UCONTEXT_T
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_UCONTEXT_H
|
@ -1,134 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
// These types are used with ptrace(), more specifically with
|
||||
// PTRACE_GETREGS, PTRACE_GETFPREGS and PTRACE_GETVFPREGS respectively.
|
||||
//
|
||||
// They are also defined, sometimes with different names, in <asm/user.h>
|
||||
//
|
||||
|
||||
#if defined(__arm__)
|
||||
|
||||
#define _ARM_USER_H 1 // Prevent <asm/user.h> conflicts
|
||||
|
||||
// Note: on ARM, GLibc uses user_regs instead of user_regs_struct.
|
||||
struct user_regs {
|
||||
// Note: Entries 0-15 match r0..r15
|
||||
// Entry 16 is used to store the CPSR register.
|
||||
// Entry 17 is used to store the "orig_r0" value.
|
||||
unsigned long int uregs[18];
|
||||
};
|
||||
|
||||
// Same here: user_fpregs instead of user_fpregs_struct.
|
||||
struct user_fpregs {
|
||||
struct fp_reg {
|
||||
unsigned int sign1:1;
|
||||
unsigned int unused:15;
|
||||
unsigned int sign2:1;
|
||||
unsigned int exponent:14;
|
||||
unsigned int j:1;
|
||||
unsigned int mantissa1:31;
|
||||
unsigned int mantissa0:32;
|
||||
} fpregs[8];
|
||||
unsigned int fpsr:32;
|
||||
unsigned int fpcr:32;
|
||||
unsigned char ftype[8];
|
||||
unsigned int init_flag;
|
||||
};
|
||||
|
||||
// GLibc doesn't define this one in <sys/user.h> though.
|
||||
struct user_vfpregs {
|
||||
unsigned long long fpregs[32];
|
||||
unsigned long fpscr;
|
||||
};
|
||||
|
||||
#elif defined(__i386__)
|
||||
|
||||
#define _I386_USER_H 1 // Prevent <asm/user.h> conflicts
|
||||
|
||||
// GLibc-compatible definitions
|
||||
struct user_regs_struct {
|
||||
long ebx, ecx, edx, esi, edi, ebp, eax;
|
||||
long xds, xes, xfs, xgs, orig_eax;
|
||||
long eip, xcs, eflags, esp, xss;
|
||||
};
|
||||
|
||||
struct user_fpregs_struct {
|
||||
long cwd, swd, twd, fip, fcs, foo, fos;
|
||||
long st_space[20];
|
||||
};
|
||||
|
||||
struct user_fpxregs_struct {
|
||||
unsigned short cwd, swd, twd, fop;
|
||||
long fip, fcs, foo, fos, mxcsr, reserved;
|
||||
long st_space[32];
|
||||
long xmm_space[32];
|
||||
long padding[56];
|
||||
};
|
||||
|
||||
struct user {
|
||||
struct user_regs_struct regs;
|
||||
int u_fpvalid;
|
||||
struct user_fpregs_struct i387;
|
||||
unsigned long u_tsize;
|
||||
unsigned long u_dsize;
|
||||
unsigned long u_ssize;
|
||||
unsigned long start_code;
|
||||
unsigned long start_stack;
|
||||
long signal;
|
||||
int reserved;
|
||||
struct user_regs_struct* u_ar0;
|
||||
struct user_fpregs_struct* u_fpstate;
|
||||
unsigned long magic;
|
||||
char u_comm [32];
|
||||
int u_debugreg [8];
|
||||
};
|
||||
|
||||
|
||||
#elif defined(__mips__)
|
||||
|
||||
// TODO: Provide some useful definitions here, once the rest of Breakpad
|
||||
// requires them.
|
||||
|
||||
#else
|
||||
# error "Unsupported Android CPU ABI"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H
|
@ -1,55 +0,0 @@
|
||||
// Copyright (c) 2012, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
|
||||
#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef __BIONIC_HAVE_UCONTEXT_H
|
||||
# include_next <ucontext.h>
|
||||
#else
|
||||
# include <sys/ucontext.h>
|
||||
#endif // __BIONIC_UCONTEXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
// Provided by src/android/common/breakpad_getcontext.S
|
||||
int breakpad_getcontext(ucontext_t* ucp);
|
||||
|
||||
#define getcontext(x) breakpad_getcontext(x)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
|
@ -0,0 +1,26 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'crash_generation_client.cc',
|
||||
'crash_generation_server.cc',
|
||||
]
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
@ -2,14 +2,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifeq (Android,$(OS_TARGET))
|
||||
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/gonk-include/
|
||||
else
|
||||
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_THUMB2 #{
|
||||
# The syscall number is passed through r7 in the linux ARM ABI, but r7
|
||||
# is also the THUMB frame pointer. (Unfortunate, but ah well.) gcc
|
@ -0,0 +1,30 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'../log/log.cc',
|
||||
'exception_handler.cc',
|
||||
'minidump_descriptor.cc',
|
||||
]
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# NDK5 workarounds
|
||||
DEFINES['_STLP_CONST_CONSTRUCTOR_BUG'] = True
|
||||
DEFINES['_STLP_NO_MEMBER_TEMPLATES'] = True
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
@ -0,0 +1,27 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'linux_dumper.cc',
|
||||
'linux_ptrace_dumper.cc',
|
||||
'minidump_writer.cc',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
DEFINES['ELFSIZE'] = 32
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
@ -1,33 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'crash_generation/crash_generation_client.cc',
|
||||
'crash_generation/crash_generation_server.cc',
|
||||
'dump_writer_common/thread_info.cc',
|
||||
'dump_writer_common/ucontext_reader.cc',
|
||||
'handler/exception_handler.cc',
|
||||
'handler/minidump_descriptor.cc',
|
||||
'log/log.cc',
|
||||
'microdump_writer/microdump_writer.cc',
|
||||
'minidump_writer/linux_dumper.cc',
|
||||
'minidump_writer/linux_ptrace_dumper.cc',
|
||||
'minidump_writer/minidump_writer.cc',
|
||||
]
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CPU_ARCH'] == 'x86':
|
||||
# The NDK's user.h defines this struct with a different name.
|
||||
DEFINES['user_fpxregs_struct'] = 'user_fxsr_struct'
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
DEFINES['getcontext'] = 'breakpad_getcontext'
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
@ -2,16 +2,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifeq (Android,$(OS_TARGET))
|
||||
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/gonk-include/
|
||||
else
|
||||
ifeq ($(OS_TARGET),Android)
|
||||
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# memory.h in this dir breaks things if -I$(srcdir) gets added, since memory.h
|
||||
# is also a system header and the copy here winds up getting included instead.
|
||||
INCLUDES := $(LOCAL_INCLUDES) -I$(DIST)/include
|
||||
|
@ -4,17 +4,21 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
HostLibrary('host_breakpad_dwarf_s')
|
||||
HOST_SOURCES += [
|
||||
'bytereader.cc',
|
||||
'dwarf2diehandler.cc',
|
||||
'dwarf2reader.cc',
|
||||
'functioninfo.cc',
|
||||
]
|
||||
HOST_CXXFLAGS += [
|
||||
'-O2',
|
||||
'-g',
|
||||
]
|
||||
if CONFIG['MOZ_CRASHREPORTER']:
|
||||
HostLibrary('host_breakpad_dwarf_s')
|
||||
HOST_SOURCES += [
|
||||
'bytereader.cc',
|
||||
'dwarf2diehandler.cc',
|
||||
'dwarf2reader.cc',
|
||||
'functioninfo.cc',
|
||||
]
|
||||
HOST_CXXFLAGS += [
|
||||
'-O2',
|
||||
'-g',
|
||||
]
|
||||
LOCAL_INCLUDES += [
|
||||
'../..',
|
||||
]
|
||||
|
||||
# need static lib
|
||||
FORCE_STATIC_LIB = True
|
||||
@ -26,4 +30,3 @@ HOST_CXXFLAGS += [
|
||||
'-funsigned-char',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
@ -2,13 +2,10 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifeq (Android,$(OS_TARGET))
|
||||
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/gonk-include/
|
||||
ifneq (Android,$(OS_TARGET))
|
||||
else
|
||||
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -22,27 +22,32 @@ if CONFIG['OS_TARGET'] != 'Android':
|
||||
'http_upload.cc',
|
||||
]
|
||||
|
||||
HostLibrary('host_breakpad_linux_common_s')
|
||||
HOST_SOURCES += [
|
||||
'crc32.cc',
|
||||
'dump_symbols.cc',
|
||||
'elf_symbols_to_module.cc',
|
||||
'elfutils.cc',
|
||||
'file_id.cc',
|
||||
'guid_creator.cc',
|
||||
'linux_libc_support.cc',
|
||||
'memory_mapped_file.cc',
|
||||
]
|
||||
|
||||
HOST_CXXFLAGS += [
|
||||
'-O2',
|
||||
'-g',
|
||||
]
|
||||
if CONFIG['MOZ_CRASHREPORTER']:
|
||||
HostLibrary('host_breakpad_linux_common_s')
|
||||
HOST_SOURCES += [
|
||||
'dump_symbols.cc',
|
||||
'elf_symbols_to_module.cc',
|
||||
'elfutils.cc',
|
||||
'file_id.cc',
|
||||
'guid_creator.cc',
|
||||
'linux_libc_support.cc',
|
||||
'memory_mapped_file.cc',
|
||||
]
|
||||
HOST_CXXFLAGS += [
|
||||
'-O2',
|
||||
'-g',
|
||||
]
|
||||
|
||||
Library('breakpad_linux_common_s')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
HOST_DEFINES['NO_STABS_SUPPORT'] = True
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
DEFINES['ELFSIZE'] = 32
|
||||
|
||||
DEFINES['NO_STABS_SUPPORT'] = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
@ -46,6 +46,8 @@ ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
CMFLAGS += ['-std=c99']
|
||||
LOCAL_INCLUDES += [
|
||||
'../..',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
CMFLAGS += ['-std=c99']
|
||||
|
@ -9,28 +9,47 @@ if CONFIG['OS_ARCH'] in ('Darwin', 'Linux'):
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'convert_UTF.c',
|
||||
'logging.cc',
|
||||
'module.cc',
|
||||
'pathname_stripper.cc',
|
||||
'string_conversion.cc',
|
||||
'unique_string.cc',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] != 'WINNT':
|
||||
UNIFIED_SOURCES += [
|
||||
'arm_ex_reader.cc',
|
||||
'arm_ex_to_module.cc',
|
||||
'dwarf/bytereader.cc',
|
||||
'dwarf/dwarf2diehandler.cc',
|
||||
'dwarf/dwarf2reader.cc',
|
||||
'dwarf_cfi_to_module.cc',
|
||||
'dwarf_cu_to_module.cc',
|
||||
'dwarf_line_to_module.cc',
|
||||
'language.cc',
|
||||
'md5.cc',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Linux':
|
||||
UNIFIED_SOURCES += [
|
||||
'linux/dump_symbols.cc',
|
||||
'linux/elf_symbols_to_module.cc',
|
||||
]
|
||||
HOST_DEFINES['HAVE_A_OUT_H'] = True
|
||||
elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
HOST_DEFINES['HAVE_MACH_O_NLIST_H'] = True
|
||||
HOST_SOURCES += [
|
||||
DEFINES['HAVE_A_OUT_H'] = True
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Darwin' and CONFIG['HOST_OS_ARCH'] != 'Darwin':
|
||||
HOST_CXXFLAGS += [
|
||||
'-I%s/toolkit/crashreporter/google-breakpad/src/third_party/mac_headers/' % TOPSRCDIR,
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] != 'Android' and CONFIG['OS_ARCH'] != 'WINNT':
|
||||
UNIFIED_SOURCES += [
|
||||
'stabs_reader.cc',
|
||||
'stabs_to_module.cc',
|
||||
]
|
||||
if CONFIG['HOST_OS_ARCH'] != 'Darwin':
|
||||
HOST_CXXFLAGS += [
|
||||
'-I%s/toolkit/crashreporter/google-breakpad/src/third_party/mac_headers/' % TOPSRCDIR,
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] != 'WINNT':
|
||||
if CONFIG['OS_ARCH'] != 'WINNT' and CONFIG['MOZ_CRASHREPORTER']:
|
||||
HOST_SOURCES += [
|
||||
'arm_ex_reader.cc',
|
||||
'arm_ex_to_module.cc',
|
||||
@ -39,9 +58,14 @@ if CONFIG['OS_ARCH'] != 'WINNT':
|
||||
'dwarf_cu_to_module.cc',
|
||||
'dwarf_line_to_module.cc',
|
||||
'language.cc',
|
||||
'logging.cc',
|
||||
'md5.cc',
|
||||
'module.cc',
|
||||
'pathname_stripper.cc',
|
||||
'stabs_reader.cc',
|
||||
'stabs_to_module.cc',
|
||||
'string_conversion.cc',
|
||||
'unique_string.cc',
|
||||
]
|
||||
HOST_CXXFLAGS += [
|
||||
'-O2',
|
||||
@ -49,6 +73,13 @@ if CONFIG['OS_ARCH'] != 'WINNT':
|
||||
]
|
||||
HostLibrary('host_breakpad_common_s')
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
UNIFIED_SOURCES += [
|
||||
'mac/dump_syms.cc',
|
||||
]
|
||||
HOST_DEFINES['HAVE_MACH_O_NLIST_H'] = True
|
||||
DEFINES['HAVE_MACH_O_NLIST_H'] = True
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# We don't support unifying assembly files.
|
||||
SOURCES += [
|
||||
@ -62,4 +93,17 @@ ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
DEFINES['ELFSIZE'] = 32
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
DEFINES['NO_STABS_SUPPORT'] = True
|
||||
|
||||
DEFINES['BP_LOGGING_INCLUDE'] = '"BreakpadLogging.h"'
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
'../../../breakpad-logging',
|
||||
]
|
||||
|
@ -29,6 +29,8 @@ FINAL_LIBRARY = 'xul'
|
||||
DEFINES['BP_LOGGING_INCLUDE'] = '"BreakpadLogging.h"'
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
'../..',
|
||||
'../../../breakpad-logging',
|
||||
]
|
||||
|
||||
|
@ -27,7 +27,7 @@ HOST_USE_LIBS += [
|
||||
HostProgram('dump_syms')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../../..',
|
||||
'../../../common/linux',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
@ -27,6 +27,7 @@ HOST_USE_LIBS += [
|
||||
HostProgram('dump_syms')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../../..',
|
||||
'../../../common/mac',
|
||||
]
|
||||
|
||||
@ -34,5 +35,3 @@ if CONFIG['HOST_OS_ARCH'] != 'Darwin':
|
||||
HOST_CXXFLAGS += [
|
||||
'-I%s/toolkit/crashreporter/google-breakpad/src/third_party/mac_headers/' % TOPSRCDIR,
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
@ -23,7 +23,7 @@ HOST_USE_LIBS += [
|
||||
HostProgram('dump_syms')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../../..',
|
||||
'../../../common/solaris',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
@ -9,6 +9,7 @@ SPHINX_TREES['crashreporter'] = 'docs'
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DIRS += [
|
||||
'google-breakpad/src/common',
|
||||
'google-breakpad/src/processor',
|
||||
'breakpad-windows-libxul'
|
||||
]
|
||||
|
||||
@ -22,6 +23,7 @@ elif CONFIG['OS_ARCH'] == 'Darwin':
|
||||
'google-breakpad/src/client',
|
||||
'google-breakpad/src/client/mac/crash_generation',
|
||||
'google-breakpad/src/client/mac/handler',
|
||||
'google-breakpad/src/processor',
|
||||
'google-breakpad/src/tools/mac/dump_syms',
|
||||
]
|
||||
|
||||
@ -30,7 +32,10 @@ elif CONFIG['OS_ARCH'] == 'Linux':
|
||||
'google-breakpad/src/common',
|
||||
'google-breakpad/src/common/linux',
|
||||
'google-breakpad/src/client',
|
||||
'google-breakpad/src/client/linux/',
|
||||
'google-breakpad/src/client/linux/crash_generation',
|
||||
'google-breakpad/src/client/linux/handler',
|
||||
'google-breakpad/src/client/linux/minidump_writer',
|
||||
'google-breakpad/src/processor',
|
||||
'google-breakpad/src/tools/linux/dump_syms',
|
||||
]
|
||||
|
||||
@ -44,6 +49,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS':
|
||||
]
|
||||
|
||||
DIRS += [
|
||||
'breakpad-logging',
|
||||
'client',
|
||||
]
|
||||
|
||||
@ -84,14 +90,6 @@ if CONFIG['OS_TARGET'] == 'Android':
|
||||
# NDK5 workarounds
|
||||
DEFINES['_STLP_CONST_CONSTRUCTOR_BUG'] = True
|
||||
DEFINES['_STLP_NO_MEMBER_TEMPLATES'] = True
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/gonk-include',
|
||||
]
|
||||
else:
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'SunOS':
|
||||
# there's no define for this normally
|
||||
@ -106,10 +104,6 @@ LOCAL_INCLUDES += [
|
||||
'google-breakpad/src',
|
||||
]
|
||||
|
||||
PYTHON_UNIT_TESTS += [
|
||||
'tools/unit-symbolstore.py',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
||||
with Files('**'):
|
||||
|
@ -9,13 +9,10 @@ XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_ipc/xpcshell.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'../google-breakpad/src/common/logging.cc',
|
||||
'../google-breakpad/src/common/pathname_stripper.cc',
|
||||
'../google-breakpad/src/processor/basic_code_modules.cc',
|
||||
'../google-breakpad/src/processor/dump_context.cc',
|
||||
'../google-breakpad/src/processor/dump_object.cc',
|
||||
'../google-breakpad/src/processor/logging.cc',
|
||||
'../google-breakpad/src/processor/minidump.cc',
|
||||
'../google-breakpad/src/processor/pathname_stripper.cc',
|
||||
'../google-breakpad/src/processor/proc_maps_linux.cc',
|
||||
'dumputils.cpp',
|
||||
'nsTestCrasher.cpp',
|
||||
]
|
||||
@ -28,6 +25,10 @@ DEFINES['SHARED_LIBRARY'] = '%s%s%s' % (
|
||||
CONFIG['DLL_SUFFIX']
|
||||
)
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../google-breakpad/src/',
|
||||
]
|
||||
|
||||
include('/toolkit/crashreporter/crashreporter.mozbuild')
|
||||
|
||||
NO_PGO = True
|
||||
|
@ -619,13 +619,6 @@ class Dumper:
|
||||
self.files_record[files] = 0 # record that we submitted jobs for this tuple of files
|
||||
self.SubmitJob(files[-1], 'ProcessFilesWork', args=(files, arch_num, arch, vcs_root, after, after_arg), callback=self.ProcessFilesFinished)
|
||||
|
||||
def dump_syms_cmdline(self, file, arch, files):
|
||||
'''
|
||||
Get the commandline used to invoke dump_syms.
|
||||
'''
|
||||
# The Mac dumper overrides this.
|
||||
return [self.dump_syms, file]
|
||||
|
||||
def ProcessFilesWork(self, files, arch_num, arch, vcs_root, after, after_arg):
|
||||
t_start = time.time()
|
||||
self.output_pid(sys.stderr, "Worker processing files: %s" % (files,))
|
||||
@ -638,7 +631,7 @@ class Dumper:
|
||||
for file in files:
|
||||
# files is a tuple of files, containing fallbacks in case the first file doesn't process successfully
|
||||
try:
|
||||
cmd = self.dump_syms_cmdline(file, arch, files)
|
||||
cmd = [self.dump_syms] + arch.split() + [file]
|
||||
self.output_pid(sys.stderr, ' '.join(cmd))
|
||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||
stderr=open(os.devnull, 'wb'))
|
||||
@ -915,17 +908,6 @@ class Dumper_Mac(Dumper):
|
||||
# kick off new jobs per-arch with our new list of files
|
||||
Dumper.ProcessFiles(self, result['files'], after=AfterMac, after_arg=result['files'][0])
|
||||
|
||||
def dump_syms_cmdline(self, file, arch, files):
|
||||
'''
|
||||
Get the commandline used to invoke dump_syms.
|
||||
'''
|
||||
# dump_syms wants the path to the original binary and the .dSYM
|
||||
# in order to dump all the symbols.
|
||||
if len(files) == 2 and file == files[0] and file.endswith('.dSYM'):
|
||||
# This is the .dSYM bundle.
|
||||
return [self.dump_syms] + arch.split() + ['-g', file, files[1]]
|
||||
return Dumper.dump_syms_cmdline(self, file, arch, files)
|
||||
|
||||
def ProcessFilesWorkMac(self, file):
|
||||
"""dump_syms on Mac needs to be run on a dSYM bundle produced
|
||||
by dsymutil(1), so run dsymutil here and pass the bundle name
|
||||
|
@ -51,6 +51,18 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
|
||||
if CONFIG['MOZ_CRASHREPORTER']:
|
||||
DIRS += ['crashreporter']
|
||||
elif CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||
# Profiler requires some crashreporter code,
|
||||
# so build it even if crashreporter is disabled.
|
||||
DIRS += [
|
||||
'crashreporter/breakpad-logging',
|
||||
'crashreporter/google-breakpad/src/common',
|
||||
'crashreporter/google-breakpad/src/processor',
|
||||
]
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
DIRS += ['crashreporter/google-breakpad/src/common/mac']
|
||||
elif CONFIG['OS_ARCH'] == 'Linux':
|
||||
DIRS += ['crashreporter/google-breakpad/src/common/linux']
|
||||
|
||||
with Files('mozapps/installer/windows/*'):
|
||||
BUG_COMPONENT = ('Toolkit', 'NSIS Installer')
|
||||
|
12
tools/profiler/core/shim_mac_dump_syms.h
Normal file
12
tools/profiler/core/shim_mac_dump_syms.h
Normal file
@ -0,0 +1,12 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Read debug info from |obj_file| and park it in a Module, returned
|
||||
// via |module|. Caller owns the Module and is responsible for
|
||||
// deallocating it. Note that |debug_dirs| is ignored.
|
||||
bool ReadSymbolData_DARWIN(const string& obj_file,
|
||||
const std::vector<string> &debug_dirs,
|
||||
SymbolData symbol_data,
|
||||
google_breakpad::Module** module);
|
20
tools/profiler/core/shim_mac_dump_syms.mm
Normal file
20
tools/profiler/core/shim_mac_dump_syms.mm
Normal file
@ -0,0 +1,20 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "common/mac/dump_syms.h"
|
||||
#include "shim_mac_dump_syms.h"
|
||||
|
||||
bool ReadSymbolData_DARWIN(const string& obj_file,
|
||||
const std::vector<string> &debug_dirs,
|
||||
SymbolData symbol_data,
|
||||
google_breakpad::Module** module)
|
||||
{
|
||||
google_breakpad::DumpSymbols ds(symbol_data);
|
||||
|
||||
if (!ds.Read(obj_file))
|
||||
return false;
|
||||
|
||||
return ds.ReadSymbolData(module);
|
||||
}
|
307
tools/profiler/gecko/local_debug_info_symbolizer.cc
Normal file
307
tools/profiler/gecko/local_debug_info_symbolizer.cc
Normal file
@ -0,0 +1,307 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "PlatformMacros.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#if !defined(SPS_OS_windows)
|
||||
# include "common/module.h"
|
||||
# include "processor/cfi_frame_info.h"
|
||||
#endif
|
||||
#include "google_breakpad/processor/code_module.h"
|
||||
#include "google_breakpad/processor/code_modules.h"
|
||||
#include "google_breakpad/processor/stack_frame.h"
|
||||
#include "common/logging.h"
|
||||
|
||||
#if defined(SPS_PLAT_amd64_linux) || defined(SPS_PLAT_arm_android) \
|
||||
|| defined(SPS_PLAT_x86_linux) || defined(SPS_PLAT_x86_android)
|
||||
# include "common/linux/dump_symbols.h"
|
||||
#elif defined(SPS_PLAT_amd64_darwin) || defined(SPS_PLAT_x86_darwin)
|
||||
# include "shim_mac_dump_syms.h"
|
||||
#elif defined(SPS_OS_windows)
|
||||
/* This is all stubbed out anyway, so don't do anything. */
|
||||
#else
|
||||
# error "Unknown platform"
|
||||
#endif
|
||||
|
||||
#if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
# include "mozilla/Types.h"
|
||||
# include "ElfLoader.h"
|
||||
# include <dlfcn.h>
|
||||
# include <sys/mman.h>
|
||||
# include "nsString.h"
|
||||
# include "nsDirectoryServiceUtils.h"
|
||||
# include "nsDirectoryServiceDefs.h"
|
||||
# include <sys/stat.h>
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "local_debug_info_symbolizer.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
LocalDebugInfoSymbolizer::~LocalDebugInfoSymbolizer() {
|
||||
# if !defined(SPS_OS_windows)
|
||||
for (SymbolMap::iterator it = symbols_.begin();
|
||||
it != symbols_.end();
|
||||
++it) {
|
||||
delete it->second;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
#if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
|
||||
// Find out where the installation's lib directory is, since we'll
|
||||
// have to look in there to get hold of libmozglue.so. Returned
|
||||
// C string is heap allocated and the caller must deallocate it.
|
||||
static char* get_installation_lib_dir ( void )
|
||||
{
|
||||
nsCOMPtr<nsIProperties>
|
||||
directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID));
|
||||
if (!directoryService) return NULL;
|
||||
nsCOMPtr<nsIFile> greDir;
|
||||
nsresult rv = directoryService->Get(NS_GRE_DIR, NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(greDir));
|
||||
if (NS_FAILED(rv)) return NULL;
|
||||
nsCString path;
|
||||
rv = greDir->GetNativePath(path);
|
||||
if (NS_FAILED(rv)) return NULL;
|
||||
return strdup(path.get());
|
||||
}
|
||||
|
||||
// Read symbol data from a file on Android. OBJ_FILENAME has
|
||||
// three possible cases:
|
||||
//
|
||||
// (1) /foo/bar/xyzzy/blah.apk!/libwurble.so
|
||||
// We hand it as-is to faulty.lib and let it fish the relevant
|
||||
// bits out of the APK.
|
||||
//
|
||||
// (2) libmozglue.so
|
||||
// This is part of the Fennec installation, but is not in the
|
||||
// APK. Instead we have to figure out the installation path
|
||||
// and look for it there. Because of faulty.lib limitations,
|
||||
// we have to use regular open/mmap instead of faulty.lib.
|
||||
//
|
||||
// (3) libanythingelse.so
|
||||
// faulty.lib assumes this is a system library, and prepends
|
||||
// "/system/lib/" to the path. So as in (1), we can give it
|
||||
// as-is to faulty.lib.
|
||||
//
|
||||
// Hence only (2) requires special-casing here.
|
||||
//
|
||||
static bool ReadSymbolData_ANDROID(const string& obj_filename,
|
||||
const std::vector<string>& debug_dirs,
|
||||
SymbolData symbol_data,
|
||||
Module** module)
|
||||
{
|
||||
string obj_file_to_use = obj_filename;
|
||||
|
||||
// Do (2) in the comment above.
|
||||
if (obj_file_to_use == "libmozglue.so") {
|
||||
char* libdir = get_installation_lib_dir();
|
||||
if (libdir) {
|
||||
obj_file_to_use = string(libdir) + "/lib/" + obj_file_to_use;
|
||||
free(libdir);
|
||||
}
|
||||
|
||||
// Use regular open/mmap here because of faulty.lib limitations
|
||||
int fd = open(obj_file_to_use.c_str(), O_RDONLY);
|
||||
if (fd == -1) {
|
||||
BPLOG(INFO) << "ReadSymbolData_APK: Failed to open \'"
|
||||
<< obj_file_to_use << "\'";
|
||||
return false;
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
if (fstat(fd, &st) != 0) {
|
||||
close(fd);
|
||||
BPLOG(INFO) << "ReadSymbolData_APK: Failed to fstat \'"
|
||||
<< obj_file_to_use << "\'";
|
||||
return false;
|
||||
}
|
||||
|
||||
void* image = mmap(nullptr, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
if (image == MAP_FAILED) {
|
||||
close(fd);
|
||||
BPLOG(INFO) << "ReadSymbolData_APK: Failed to mmap \'"
|
||||
<< obj_file_to_use << "\'";
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ok = ReadSymbolDataInternal((const uint8_t*)image,
|
||||
obj_file_to_use, debug_dirs,
|
||||
symbol_data, module);
|
||||
munmap(image, st.st_size);
|
||||
close(fd);
|
||||
return ok;
|
||||
}
|
||||
|
||||
// Regardless of whether the file is inside an APK or not, we ask
|
||||
// faulty.lib to map it, then call ReadSymbolDataInternal, then
|
||||
// unmap and dlclose it.
|
||||
void* hdl = dlopen(obj_file_to_use.c_str(), RTLD_GLOBAL | RTLD_LAZY);
|
||||
if (!hdl) {
|
||||
BPLOG(INFO) << "ReadSymbolData_APK: Failed to get handle for ELF file \'"
|
||||
<< obj_file_to_use << "\'";
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t sz = __dl_get_mappable_length(hdl);
|
||||
if (sz == 0) {
|
||||
dlclose(hdl);
|
||||
BPLOG(INFO) << "ReadSymbolData_APK: Unable to get size for ELF file \'"
|
||||
<< obj_file_to_use << "\'";
|
||||
return false;
|
||||
}
|
||||
|
||||
void* image = __dl_mmap(hdl, NULL, sz, 0);
|
||||
if (image == MAP_FAILED) {
|
||||
dlclose(hdl);
|
||||
BPLOG(INFO) << "ReadSymbolData_APK: Failed to mmap ELF file \'"
|
||||
<< obj_file_to_use << "\'";
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ok = ReadSymbolDataInternal((const uint8_t*)image,
|
||||
obj_file_to_use, debug_dirs,
|
||||
symbol_data, module);
|
||||
__dl_munmap(hdl, image, sz);
|
||||
dlclose(hdl);
|
||||
|
||||
return ok;
|
||||
}
|
||||
#endif /* defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK) */
|
||||
|
||||
|
||||
StackFrameSymbolizer::SymbolizerResult
|
||||
LocalDebugInfoSymbolizer::FillSourceLineInfo(const CodeModules* modules,
|
||||
const SystemInfo* system_info,
|
||||
StackFrame* frame) {
|
||||
if (!modules) {
|
||||
return kError;
|
||||
}
|
||||
const CodeModule* module = modules->GetModuleForAddress(frame->instruction);
|
||||
if (!module) {
|
||||
return kError;
|
||||
}
|
||||
frame->module = module;
|
||||
|
||||
# if !defined(SPS_OS_windows)
|
||||
Module* debug_info_module = NULL;
|
||||
SymbolMap::const_iterator it = symbols_.find(module->code_file());
|
||||
if (it == symbols_.end()) {
|
||||
if (no_symbol_modules_.find(module->code_file()) !=
|
||||
no_symbol_modules_.end()) {
|
||||
return kNoError;
|
||||
}
|
||||
|
||||
bool ok = false;
|
||||
# if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
|
||||
ok = ReadSymbolData_ANDROID(module->code_file(), debug_dirs_,
|
||||
ONLY_CFI, &debug_info_module);
|
||||
# elif defined(SPS_PLAT_amd64_darwin) || defined(SPS_PLAT_x86_darwin)
|
||||
ok = ReadSymbolData_DARWIN(module->code_file(), debug_dirs_,
|
||||
ONLY_CFI, &debug_info_module);
|
||||
# else
|
||||
ok = ReadSymbolData(module->code_file(), debug_dirs_,
|
||||
ONLY_CFI, &debug_info_module);
|
||||
# endif
|
||||
|
||||
if (!ok) {
|
||||
if (debug_info_module)
|
||||
delete debug_info_module;
|
||||
no_symbol_modules_.insert(module->code_file());
|
||||
return kNoError;
|
||||
}
|
||||
|
||||
symbols_[module->code_file()] = debug_info_module;
|
||||
} else {
|
||||
debug_info_module = it->second;
|
||||
}
|
||||
|
||||
uint64_t address = frame->instruction - frame->module->base_address();
|
||||
Module::Function* function =
|
||||
debug_info_module->FindFunctionByAddress(address);
|
||||
if (function) {
|
||||
frame->function_name = function->name;
|
||||
//TODO: line info: function->lines
|
||||
} else {
|
||||
Module::Extern* ex = debug_info_module->FindExternByAddress(address);
|
||||
if (ex) {
|
||||
frame->function_name = ex->name;
|
||||
}
|
||||
}
|
||||
# endif /* !defined(SPS_OS_windows) */
|
||||
return kNoError;
|
||||
}
|
||||
|
||||
|
||||
WindowsFrameInfo* LocalDebugInfoSymbolizer::FindWindowsFrameInfo(
|
||||
const StackFrame* frame) {
|
||||
// Not currently implemented, would require PDBSourceLineWriter to
|
||||
// implement an API to return symbol data.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(SPS_OS_windows)
|
||||
// Taken wholesale from source_line_resolver_base.cc
|
||||
bool ParseCFIRuleSet(const string& rule_set, CFIFrameInfo* frame_info) {
|
||||
CFIFrameInfoParseHandler handler(frame_info);
|
||||
CFIRuleParser parser(&handler);
|
||||
return parser.Parse(rule_set);
|
||||
}
|
||||
|
||||
static void ConvertCFI(const UniqueString* name, const Module::Expr& rule,
|
||||
CFIFrameInfo* frame_info) {
|
||||
if (name == ustr__ZDcfa()) frame_info->SetCFARule(rule);
|
||||
else if (name == ustr__ZDra()) frame_info->SetRARule(rule);
|
||||
else frame_info->SetRegisterRule(name, rule);
|
||||
}
|
||||
|
||||
|
||||
static void ConvertCFI(const Module::RuleMap& rule_map,
|
||||
CFIFrameInfo* frame_info) {
|
||||
for (Module::RuleMap::const_iterator it = rule_map.begin();
|
||||
it != rule_map.end(); ++it) {
|
||||
ConvertCFI(it->first, it->second, frame_info);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
CFIFrameInfo* LocalDebugInfoSymbolizer::FindCFIFrameInfo(
|
||||
const StackFrame* frame) {
|
||||
#if defined(SPS_OS_windows)
|
||||
return NULL;
|
||||
#else
|
||||
if (!frame || !frame->module) return NULL;
|
||||
|
||||
SymbolMap::const_iterator it = symbols_.find(frame->module->code_file());
|
||||
if (it == symbols_.end()) return NULL;
|
||||
|
||||
Module* module = it->second;
|
||||
uint64_t address = frame->instruction - frame->module->base_address();
|
||||
Module::StackFrameEntry* entry =
|
||||
module->FindStackFrameEntryByAddress(address);
|
||||
if (!entry)
|
||||
return NULL;
|
||||
|
||||
//TODO: can we cache this data per-address? does that make sense?
|
||||
// TODO: Maybe this should use google_breakpad::scoped_ptr, since we're in
|
||||
// "namespace google_breakpad". Not using scoped_ptr currently, because its
|
||||
// header triggers build warnings -- see bug 855010.
|
||||
nsAutoPtr<CFIFrameInfo> rules(new CFIFrameInfo());
|
||||
ConvertCFI(entry->initial_rules, rules);
|
||||
for (Module::RuleChangeMap::const_iterator delta_it =
|
||||
entry->rule_changes.begin();
|
||||
delta_it != entry->rule_changes.end() && delta_it->first < address;
|
||||
++delta_it) {
|
||||
ConvertCFI(delta_it->second, rules);
|
||||
}
|
||||
return rules.forget();
|
||||
#endif /* defined(SPS_OS_windows) */
|
||||
}
|
||||
|
||||
} // namespace google_breakpad
|
45
tools/profiler/gecko/local_debug_info_symbolizer.h
Normal file
45
tools/profiler/gecko/local_debug_info_symbolizer.h
Normal file
@ -0,0 +1,45 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_
|
||||
#define PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_
|
||||
|
||||
#include "google_breakpad/processor/stack_frame_symbolizer.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
class Module;
|
||||
|
||||
class LocalDebugInfoSymbolizer : public StackFrameSymbolizer {
|
||||
public:
|
||||
using StackFrameSymbolizer::SymbolizerResult;
|
||||
LocalDebugInfoSymbolizer(const std::vector<string>& debug_dirs) :
|
||||
StackFrameSymbolizer(NULL, NULL),
|
||||
debug_dirs_(debug_dirs) {}
|
||||
virtual ~LocalDebugInfoSymbolizer();
|
||||
|
||||
virtual SymbolizerResult FillSourceLineInfo(const CodeModules* modules,
|
||||
const SystemInfo* system_info,
|
||||
StackFrame* stack_frame);
|
||||
|
||||
virtual WindowsFrameInfo* FindWindowsFrameInfo(const StackFrame* frame);
|
||||
|
||||
virtual CFIFrameInfo* FindCFIFrameInfo(const StackFrame* frame);
|
||||
|
||||
// Lie to the stackwalker to short-circuit stack-scanning heuristics.
|
||||
virtual bool HasImplementation() { return false; }
|
||||
|
||||
private:
|
||||
typedef std::map<string, Module*> SymbolMap;
|
||||
SymbolMap symbols_;
|
||||
std::vector<string> debug_dirs_;
|
||||
};
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
||||
#endif // PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_
|
@ -45,6 +45,11 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||
'gecko/ThreadResponsiveness.cpp',
|
||||
]
|
||||
|
||||
# This file cannot be built in unified mode because of name clashes with mozglue headers on Android.
|
||||
SOURCES += [
|
||||
'gecko/local_debug_info_symbolizer.cc',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] in ('Android', 'Linux'):
|
||||
UNIFIED_SOURCES += [
|
||||
'lul/AutoObjectMapper.cpp',
|
||||
@ -60,14 +65,6 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||
'core/platform-linux.cc',
|
||||
'core/shared-libraries-linux.cc',
|
||||
]
|
||||
if not CONFIG['MOZ_CRASHREPORTER']:
|
||||
SOURCES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/linux/elfutils.cc',
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/linux/file_id.cc',
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/linux/guid_creator.cc',
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/linux/linux_libc_support.cc',
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/linux/memory_mapped_file.cc',
|
||||
]
|
||||
if CONFIG['CPU_ARCH'] == 'arm':
|
||||
SOURCES += [
|
||||
'core/EHABIStackWalk.cpp',
|
||||
@ -76,6 +73,7 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||
UNIFIED_SOURCES += [
|
||||
'core/platform-macos.cc',
|
||||
'core/shared-libraries-macos.cc',
|
||||
'core/shim_mac_dump_syms.mm',
|
||||
]
|
||||
elif CONFIG['OS_TARGET'] == 'WINNT':
|
||||
SOURCES += [
|
||||
@ -95,11 +93,7 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||
]
|
||||
|
||||
# We need access to Breakpad's getcontext(3) which is suitable for Android
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/gonk-include',
|
||||
]
|
||||
elif CONFIG['OS_TARGET'] == 'Android':
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
|
||||
]
|
||||
|
@ -36,7 +36,12 @@
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef XP_LINUX
|
||||
#include <ucontext.h>
|
||||
#ifdef ANDROID
|
||||
// Android NDK doesn't contain ucontext.h; use Breakpad's copy.
|
||||
# include "common/android/include/sys/ucontext.h"
|
||||
#else
|
||||
# include <ucontext.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
@ -65,16 +65,10 @@ UNIFIED_SOURCES += [
|
||||
LOCAL_INCLUDES += [
|
||||
'../build',
|
||||
'/caps',
|
||||
'/toolkit/crashreporter/google-breakpad/src',
|
||||
'/tools/profiler',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
# Gonk's bionic doesn't have ucontext.h
|
||||
LOCAL_INCLUDES += [
|
||||
'/toolkit/crashreporter/gonk-include',
|
||||
]
|
||||
|
||||
|
||||
# BHR disabled for Release builds because of bug 965392.
|
||||
# BHR disabled for debug builds because of bug 979069.
|
||||
# BHR disabled on gonk because of bug 1180533
|
||||
|
Loading…
Reference in New Issue
Block a user