diff options
Diffstat (limited to 'meta-oe/recipes-devtools/breakpad/breakpad')
16 files changed, 176 insertions, 758 deletions
diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Fixed-missing-include-for-std-find_if.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Fixed-missing-include-for-std-find_if.patch new file mode 100644 index 0000000000..943daf4d00 --- /dev/null +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Fixed-missing-include-for-std-find_if.patch @@ -0,0 +1,31 @@ +From 45ea097e864e566771d756c92619e984815acd1e Mon Sep 17 00:00:00 2001 +From: Nathan Moinvaziri <nathan@nathanm.com> +Date: Tue, 19 Dec 2023 14:35:05 -0800 +Subject: [PATCH] Fixed missing include for std::find_if. + +Throws an error when compiling on Windows. + +Upstream-Status: Backport [https://github.com/google/breakpad/commit/898a997855168c0e6a689072fefba89246271a5d] +Change-Id: Ieb34c00cf199aaa1b45a440086c48b8ed363b3c7 +Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5137658 +Reviewed-by: Ivan Penkov <ivanpe@chromium.org> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/common/module.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/common/module.cc b/src/common/module.cc +index 0eb5aad8..b6f5da7e 100644 +--- a/src/common/module.cc ++++ b/src/common/module.cc +@@ -42,6 +42,7 @@ + #include <stdio.h> + #include <string.h> + ++#include <algorithm> + #include <functional> + #include <iostream> + #include <memory> +-- +2.43.0 + diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch new file mode 100644 index 0000000000..df41b4d6c0 --- /dev/null +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Remove-HAVE_GETCONTEXT-check-to-add-local-implementa.patch @@ -0,0 +1,49 @@ +From 70441611d4e8200d9d16dfed493873b8c1bb57c5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 15 Mar 2021 11:33:38 -0700 +Subject: [PATCH] Remove HAVE_GETCONTEXT check to add local implementation + +On musl getcontext/setcontext APIs are implemented in libucontext which +can be used + +Upstream-Status: Inappropriate [Musl Specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 12 ------------ + 1 file changed, 12 deletions(-) + +--- a/Makefile.am ++++ b/Makefile.am +@@ -529,10 +529,6 @@ src_client_linux_libbreakpad_client_a_SO + src/common/linux/linux_libc_support.cc \ + src/common/linux/memory_mapped_file.cc \ + src/common/linux/safe_readlink.cc +-if !HAVE_GETCONTEXT +-src_client_linux_libbreakpad_client_a_SOURCES += \ +- src/common/linux/breakpad_getcontext.S +-endif + + # Client tests + src_client_linux_linux_dumper_unittest_helper_SOURCES = \ +@@ -580,10 +576,6 @@ src_client_linux_linux_client_unittest_s + src/processor/minidump.cc \ + src/processor/pathname_stripper.cc \ + src/processor/proc_maps_linux.cc +-if !HAVE_GETCONTEXT +-src_client_linux_linux_client_unittest_shlib_SOURCES += \ +- src/common/linux/breakpad_getcontext.S +-endif + + src_client_linux_linux_client_unittest_shlib_CPPFLAGS = \ + $(AM_CPPFLAGS) $(TEST_CFLAGS) +@@ -613,10 +605,6 @@ src_client_linux_linux_client_unittest_s + src/common/string_conversion.o \ + $(TEST_LIBS) \ + $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) +-if !HAVE_GETCONTEXT +-src_client_linux_linux_client_unittest_shlib_SOURCES += \ +- src/common/linux/breakpad_getcontext_unittest.cc +-endif + if ANDROID_HOST + src_client_linux_linux_client_unittest_shlib_LDFLAGS += \ + -llog -lm diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch deleted file mode 100644 index 07cb8a366e..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch +++ /dev/null @@ -1,242 +0,0 @@ -From b90c8f3b60bfe5dbed2823620242e9d30b9eb28f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 28 Jun 2017 19:01:18 -0700 -Subject: [PATCH] Replace use of struct ucontext with ucontext_t - -glibc 2.26 would not expose struct ucontext anymore - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - .../linux/dump_writer_common/ucontext_reader.cc | 32 +++++++++++----------- - .../linux/dump_writer_common/ucontext_reader.h | 14 +++++----- - src/client/linux/handler/exception_handler.cc | 10 +++---- - src/client/linux/handler/exception_handler.h | 4 +-- - .../linux/microdump_writer/microdump_writer.cc | 2 +- - .../linux/minidump_writer/minidump_writer.cc | 2 +- - 6 files changed, 32 insertions(+), 32 deletions(-) - -diff --git a/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/client/linux/dump_writer_common/ucontext_reader.cc -index c80724dd..052ce37c 100644 ---- a/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ b/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -36,19 +36,19 @@ namespace google_breakpad { - - // Minidump defines register structures which are different from the raw - // structures which we get from the kernel. These are platform specific --// functions to juggle the ucontext and user structures into minidump format. -+// functions to juggle the ucontext_t and user structures into minidump format. - - #if defined(__i386__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_ESP]; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_EIP]; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct _libc_fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - -@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, - - #elif defined(__x86_64) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_RSP]; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_RIP]; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct _libc_fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - -@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, - - #elif defined(__ARM_EABI__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.arm_sp; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.arm_pc; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { - out->context_flags = MD_CONTEXT_ARM_FULL; - - out->iregs[0] = uc->uc_mcontext.arm_r0; -@@ -184,15 +184,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { - - #elif defined(__aarch64__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.sp; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.pc; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs) { - out->context_flags = MD_CONTEXT_ARM64_FULL; - -@@ -210,15 +210,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, - - #elif defined(__mips__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.pc; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { - #if _MIPS_SIM == _ABI64 - out->context_flags = MD_CONTEXT_MIPS64_FULL; - #elif _MIPS_SIM == _ABIO32 -diff --git a/src/client/linux/dump_writer_common/ucontext_reader.h b/src/client/linux/dump_writer_common/ucontext_reader.h -index b6e77b4b..2de80b70 100644 ---- a/src/client/linux/dump_writer_common/ucontext_reader.h -+++ b/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -39,23 +39,23 @@ - - namespace google_breakpad { - --// Wraps platform-dependent implementations of accessors to ucontext structs. -+// Wraps platform-dependent implementations of accessors to ucontext_t structs. - struct UContextReader { -- static uintptr_t GetStackPointer(const struct ucontext* uc); -+ static uintptr_t GetStackPointer(const ucontext_t* uc); - -- static uintptr_t GetInstructionPointer(const struct ucontext* uc); -+ static uintptr_t GetInstructionPointer(const ucontext_t* uc); - -- // Juggle a arch-specific ucontext into a minidump format -+ // Juggle a arch-specific ucontext_t into a minidump format - // out: the minidump structure - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) -- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct _libc_fpstate* fp); - #elif defined(__aarch64__) -- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); - #else -- static void FillCPUContext(RawContextCPU *out, const ucontext *uc); -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); - #endif - }; - -diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc -index 586d84e9..05936d28 100644 ---- a/src/client/linux/handler/exception_handler.cc -+++ b/src/client/linux/handler/exception_handler.cc -@@ -457,9 +457,9 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { - // Fill in all the holes in the struct to make Valgrind happy. - memset(&g_crash_context_, 0, sizeof(g_crash_context_)); - memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); -- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); -+ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t)); - #if defined(__aarch64__) -- struct ucontext* uc_ptr = (struct ucontext*)uc; -+ ucontext_t* uc_ptr = (ucontext_t*)uc; - struct fpsimd_context* fp_ptr = - (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; - if (fp_ptr->head.magic == FPSIMD_MAGIC) { -@@ -468,9 +468,9 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { - } - #elif !defined(__ARM_EABI__) && !defined(__mips__) - // FP state is not part of user ABI on ARM Linux. -- // In case of MIPS Linux FP state is already part of struct ucontext -+ // In case of MIPS Linux FP state is already part of ucontext_t - // and 'float_state' is not a member of CrashContext. -- struct ucontext* uc_ptr = (struct ucontext*)uc; -+ ucontext_t* uc_ptr = (ucontext_t*)uc; - if (uc_ptr->uc_mcontext.fpregs) { - memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, - sizeof(g_crash_context_.float_state)); -@@ -494,7 +494,7 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) { - // ExceptionHandler::HandleSignal(). - siginfo.si_code = SI_USER; - siginfo.si_pid = getpid(); -- struct ucontext context; -+ ucontext_t context; - getcontext(&context); - return HandleSignal(sig, &siginfo, &context); - } -diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h -index daba57e0..25598a29 100644 ---- a/src/client/linux/handler/exception_handler.h -+++ b/src/client/linux/handler/exception_handler.h -@@ -191,11 +191,11 @@ class ExceptionHandler { - struct CrashContext { - siginfo_t siginfo; - pid_t tid; // the crashing thread. -- struct ucontext context; -+ ucontext_t context; - #if !defined(__ARM_EABI__) && !defined(__mips__) - // #ifdef this out because FP state is not part of user ABI for Linux ARM. - // In case of MIPS Linux FP state is already part of struct -- // ucontext so 'float_state' is not required. -+ // ucontext_t so 'float_state' is not required. - fpstate_t float_state; - #endif - }; -diff --git a/src/client/linux/microdump_writer/microdump_writer.cc b/src/client/linux/microdump_writer/microdump_writer.cc -index 3764eec2..80ad5c46 100644 ---- a/src/client/linux/microdump_writer/microdump_writer.cc -+++ b/src/client/linux/microdump_writer/microdump_writer.cc -@@ -593,7 +593,7 @@ class MicrodumpWriter { - - void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } - -- const struct ucontext* const ucontext_; -+ const ucontext_t* const ucontext_; - #if !defined(__ARM_EABI__) && !defined(__mips__) - const google_breakpad::fpstate_t* const float_state_; - #endif -diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc -index d11ba6e5..c7161434 100644 ---- a/src/client/linux/minidump_writer/minidump_writer.cc -+++ b/src/client/linux/minidump_writer/minidump_writer.cc -@@ -1323,7 +1323,7 @@ class MinidumpWriter { - const int fd_; // File descriptor where the minidum should be written. - const char* path_; // Path to the file where the minidum should be written. - -- const struct ucontext* const ucontext_; // also from the signal handler -+ const ucontext_t* const ucontext_; // also from the signal handler - #if !defined(__ARM_EABI__) && !defined(__mips__) - const google_breakpad::fpstate_t* const float_state_; // ditto - #endif --- -2.13.2 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch index 33bae1a373..b2d2c72cb1 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch @@ -10,14 +10,14 @@ Fix Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/client/linux/crash_generation/crash_generation_server.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) -diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc -index 2596afde..2faeb9e5 100644 --- a/src/client/linux/crash_generation/crash_generation_server.cc +++ b/src/client/linux/crash_generation/crash_generation_server.cc -@@ -230,8 +230,18 @@ CrashGenerationServer::ClientEvent(short revents) +@@ -230,8 +230,18 @@ CrashGenerationServer::ClientEvent(short // Walk the control payload and extract the file descriptor and validated pid. pid_t crashing_pid = -1; int signal_fd = -1; @@ -28,7 +28,7 @@ index 2596afde..2faeb9e5 100644 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wsign-compare" +#endif - for (struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); hdr; + for (struct cmsghdr* hdr = CMSG_FIRSTHDR(&msg); hdr; hdr = CMSG_NXTHDR(&msg, hdr)) { +#ifndef __GLIBC__ + #pragma clang diagnostic pop @@ -36,6 +36,3 @@ index 2596afde..2faeb9e5 100644 if (hdr->cmsg_level != SOL_SOCKET) continue; if (hdr->cmsg_type == SCM_RIGHTS) { --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch index 4583d601a8..87e00c2422 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch @@ -4,25 +4,25 @@ Date: Sun, 1 Feb 2015 14:26:52 +0100 Subject: [PATCH 1/3] include <sys/reg.h> to get __WORDSIZE on musl libc --- +Upstream-Status: Pending + src/common/linux/elf_core_dump.h | 1 + 1 file changed, 1 insertion(+) -Index: git/src/common/linux/elf_core_dump.h -=================================================================== ---- git.orig/src/common/linux/elf_core_dump.h -+++ git/src/common/linux/elf_core_dump.h -@@ -33,10 +33,13 @@ +--- a/src/common/linux/elf_core_dump.h ++++ b/src/common/linux/elf_core_dump.h +@@ -33,10 +33,14 @@ #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_ #define COMMON_LINUX_ELF_CORE_DUMP_H_ +#include <config.h> #include <elf.h> + #include <limits.h> #include <link.h> #include <stddef.h> -- +#ifdef HAVE_SYS_REG_H +#include <sys/reg.h> +#endif + #include "common/memory_range.h" - namespace google_breakpad { diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch index 2b892ad64f..80e5a8a764 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch @@ -5,14 +5,14 @@ Subject: [PATCH] lss: Match syscalls to match musl Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + linux_syscall_support.h | 3 +++ 1 file changed, 3 insertions(+) -Index: lss/linux_syscall_support.h -=================================================================== ---- lss.orig/linux_syscall_support.h -+++ lss/linux_syscall_support.h -@@ -793,6 +793,9 @@ struct kernel_statfs { +--- a/linux_syscall_support.h ++++ b/linux_syscall_support.h +@@ -1006,6 +1006,9 @@ struct kernel_statx { #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) #endif @@ -22,17 +22,17 @@ Index: lss/linux_syscall_support.h #if defined(__x86_64__) #ifndef ARCH_SET_GS -@@ -924,6 +927,7 @@ struct kernel_statfs { - #ifndef __NR_fallocate - #define __NR_fallocate 324 +@@ -1140,6 +1143,7 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom 355 #endif + /* End of i386 definitions */ #elif defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) #ifndef __NR_setresuid -@@ -1211,6 +1215,12 @@ struct kernel_statfs { - #ifndef __NR_fallocate - #define __NR_fallocate 285 +@@ -1448,6 +1452,12 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom 318 #endif +#ifndef __NR_pread +#define __NR_pread __NR_pread64 @@ -43,3 +43,16 @@ Index: lss/linux_syscall_support.h /* End of x86-64 definitions */ #elif defined(__mips__) #if _MIPS_SIM == _MIPS_SIM_ABI32 +@@ -1633,6 +1643,12 @@ struct kernel_statx { + #ifndef __NR_getrandom + #define __NR_getrandom (__NR_Linux + 313) + #endif ++ ++#undef __NR_pread ++#define __NR_pread __NR_pread64 ++#undef __NR_pwrite ++#define __NR_pwrite __NR_pwrite64 ++ + /* End of MIPS (64bit API) definitions */ + #else + #ifndef __NR_setresuid diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch deleted file mode 100644 index bc62829811..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 806964f852773e427fea82a7716d44ce3be4498c Mon Sep 17 00:00:00 2001 -From: Felix Janda <felix.janda@posteo.de> -Date: Sun, 1 Feb 2015 14:27:32 +0100 -Subject: [PATCH 2/3] Avoid using basename - ---- - src/common/linux/dump_symbols.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc -index d029ca14..6ac4a17b 100644 ---- a/src/common/linux/dump_symbols.cc -+++ b/src/common/linux/dump_symbols.cc -@@ -881,9 +881,9 @@ const char* ElfArchitecture(const typename ElfClass::Ehdr* elf_header) { - // last slash, or the whole filename if there are no slashes. - string BaseFileName(const string &filename) { - // Lots of copies! basename's behavior is less than ideal. -- char* c_filename = strdup(filename.c_str()); -- string base = basename(c_filename); -- free(c_filename); -+ const char *c_filename = filename.c_str(); -+ const char *p = strrchr(c_filename, '/'); -+ string base = p ? p+1 : c_filename; - return base; - } - --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch deleted file mode 100644 index 6c097cd22e..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0002-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0ba1b3e35e7c743b670bedc3e90001dfb868df10 Mon Sep 17 00:00:00 2001 -From: Felix Janda <felix.janda@posteo.de> -Date: Sun, 1 Feb 2015 13:45:51 +0100 -Subject: [PATCH 2/6] Use _fpstate instead of _libc_fpstate on linux - -glibc defines both. musl libc only the former. ---- - src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++-- - src/client/linux/dump_writer_common/ucontext_reader.h | 2 +- - src/client/linux/minidump_writer/minidump_writer.h | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ git/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstruction - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp) { -+ const struct _fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_X86_FULL | -@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstruction - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fpregs) { -+ const struct _fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; -Index: git/src/client/linux/dump_writer_common/ucontext_reader.h -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/ucontext_reader.h -+++ git/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -50,7 +50,7 @@ struct UContextReader { - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp); -+ const struct _fpstate* fp); - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); -Index: git/src/client/linux/minidump_writer/minidump_writer.h -=================================================================== ---- git.orig/src/client/linux/minidump_writer/minidump_writer.h -+++ git/src/client/linux/minidump_writer/minidump_writer.h -@@ -48,7 +48,7 @@ class ExceptionHandler; - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) --typedef struct _libc_fpstate fpstate_t; -+typedef struct _fpstate fpstate_t; - #endif - - // These entries store a list of memory regions that the client wants included diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch deleted file mode 100644 index cfd9a9b34e..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 15582e19c2545d5ffe8ff07f957d0ed602aeca74 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 23:15:09 -0700 -Subject: [PATCH 2/5] <sys/signal.h> is a nonportable alias for <signal.h> - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/client/linux/handler/exception_handler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc -index 05936d28..cca023fd 100644 ---- a/src/client/linux/handler/exception_handler.cc -+++ b/src/client/linux/handler/exception_handler.cc -@@ -78,7 +78,7 @@ - #include <sys/wait.h> - #include <unistd.h> - --#include <sys/signal.h> -+#include <signal.h> - #include <sys/ucontext.h> - #include <sys/user.h> - #include <ucontext.h> --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch index 2593ea93ea..81844d0d66 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch @@ -5,16 +5,16 @@ Subject: [PATCH 3/5] Dont include stab.h Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/common/stabs_reader.cc | 1 - src/common/stabs_reader.h | 12 +++++++++++- src/common/stabs_reader_unittest.cc | 1 - 3 files changed, 11 insertions(+), 3 deletions(-) -Index: git/src/common/stabs_reader.cc -=================================================================== ---- git.orig/src/common/stabs_reader.cc -+++ git/src/common/stabs_reader.cc -@@ -34,7 +34,9 @@ +--- a/src/common/stabs_reader.cc ++++ b/src/common/stabs_reader.cc +@@ -38,7 +38,9 @@ #include "common/stabs_reader.h" #include <assert.h> @@ -24,11 +24,9 @@ Index: git/src/common/stabs_reader.cc #include <string.h> #include <string> -Index: git/src/common/stabs_reader.h -=================================================================== ---- git.orig/src/common/stabs_reader.h -+++ git/src/common/stabs_reader.h -@@ -58,6 +58,30 @@ +--- a/src/common/stabs_reader.h ++++ b/src/common/stabs_reader.h +@@ -54,6 +54,30 @@ #elif defined(HAVE_A_OUT_H) #include <a.out.h> #endif @@ -59,11 +57,9 @@ Index: git/src/common/stabs_reader.h #include <string> #include <vector> -Index: git/src/common/stabs_reader_unittest.cc -=================================================================== ---- git.orig/src/common/stabs_reader_unittest.cc -+++ git/src/common/stabs_reader_unittest.cc -@@ -33,7 +33,9 @@ +--- a/src/common/stabs_reader_unittest.cc ++++ b/src/common/stabs_reader_unittest.cc +@@ -36,7 +36,9 @@ #include <assert.h> #include <errno.h> @@ -73,16 +69,14 @@ Index: git/src/common/stabs_reader_unittest.cc #include <stdarg.h> #include <stdlib.h> #include <string.h> -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ fi + AC_SYS_LARGEFILE AX_PTHREAD --AC_CHECK_HEADERS([a.out.h sys/random.h]) -+AC_CHECK_HEADERS([a.out.h stab.h sys/random.h]) - AC_CHECK_FUNCS([arc4random getrandom]) - - AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +-AC_CHECK_HEADERS([a.out.h sys/mman.h sys/random.h]) ++AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h]) + AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create]) + AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) + AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes]) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch index 851004704f..9b16dc3b2a 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch @@ -6,22 +6,22 @@ Subject: [PATCH 3/3] Fix conflict between musl libc <dirent.h> and lss Include <dirent.h> late to avoid the macro getdents64 in musl libc's <dirent.h> to conflict with linux_sycall_support.h. --- +Upstream-Status: Pending + src/client/linux/crash_generation/crash_generation_server.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc -index 26c50a5c..2596afde 100644 --- a/src/client/linux/crash_generation/crash_generation_server.cc +++ b/src/client/linux/crash_generation/crash_generation_server.cc -@@ -28,7 +28,6 @@ - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@@ -31,7 +31,6 @@ + #endif #include <assert.h> -#include <dirent.h> #include <fcntl.h> #include <limits.h> #include <poll.h> -@@ -49,6 +48,8 @@ +@@ -52,6 +51,8 @@ #include "common/linux/guid_creator.h" #include "common/linux/safe_readlink.h" @@ -30,6 +30,3 @@ index 26c50a5c..2596afde 100644 static const char kCommandQuit = 'x'; namespace google_breakpad { --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch index 525a1555bd..ff331977b6 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch @@ -6,38 +6,38 @@ Subject: [PATCH 4/5] elf_reader.cc: include <sys/reg.h> to get __WORDSIZE on Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/common/dwarf/elf_reader.cc | 1 + 1 file changed, 1 insertion(+) -Index: git/src/common/dwarf/elf_reader.cc -=================================================================== ---- git.orig/src/common/dwarf/elf_reader.cc -+++ git/src/common/dwarf/elf_reader.cc -@@ -29,10 +29,13 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE // needed for pread() +--- a/src/common/dwarf/elf_reader.cc ++++ b/src/common/dwarf/elf_reader.cc +@@ -34,12 +34,16 @@ + #include <config.h> // Must come first #endif -- + +#include <config.h> - #include <sys/types.h> - #include <sys/stat.h> + #include <fcntl.h> + #include <limits.h> + #include <string.h> #include <sys/mman.h> + #include <sys/stat.h> + #include <sys/types.h> +#ifdef HAVE_SYS_REG_H +#include <sys/reg.h> +#endif #include <unistd.h> - #include <fcntl.h> - #include <string.h> -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac -+++ git/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC + + #include <algorithm> +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ fi + AC_SYS_LARGEFILE AX_PTHREAD --AC_CHECK_HEADERS([a.out.h stab.h sys/random.h]) -+AC_CHECK_HEADERS([a.out.h stab.h sys/random.h sys/reg.h]) - AC_CHECK_FUNCS([arc4random getrandom]) - - AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +-AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h]) ++AC_CHECK_HEADERS([a.out.h stab.h sys/mman.h sys/random.h sys/reg.h]) + AC_CHECK_FUNCS([arc4random getcontext getrandom memfd_create]) + AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) + AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test "x$ac_cv_func_memfd_create" = xyes]) diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch deleted file mode 100644 index 80de8c6843..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch +++ /dev/null @@ -1,199 +0,0 @@ -From fa7a3b7312307acad0045549d5f306e7fd117804 Mon Sep 17 00:00:00 2001 -From: Felix Janda <felix.janda@posteo.de> -Date: Sun, 1 Feb 2015 14:34:44 +0100 -Subject: [PATCH 5/6] Import necessary definitions from stab.h - ---- - configure.ac | 1 - - src/common/android/include/stab.h | 100 ------------------------------------ - src/common/common.gyp | 1 - - src/common/stabs_reader.cc | 1 - - src/common/stabs_reader.h | 13 +++-- - src/common/stabs_reader_unittest.cc | 1 - - 6 files changed, 10 insertions(+), 107 deletions(-) - delete mode 100644 src/common/android/include/stab.h - -diff --git a/configure.ac b/configure.ac -index 2223920..0e55cd9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -73,7 +73,6 @@ AC_HEADER_STDC - AC_SYS_LARGEFILE - m4_include(m4/ax_pthread.m4) - AX_PTHREAD --AC_CHECK_HEADERS([a.out.h]) - - # Only build Linux client libs when compiling for Linux - case $host in -diff --git a/src/common/android/include/stab.h b/src/common/android/include/stab.h -deleted file mode 100644 -index cd92902..0000000 ---- a/src/common/android/include/stab.h -+++ /dev/null -@@ -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 -diff --git a/src/common/common.gyp b/src/common/common.gyp -index f01ede5..c49ff85 100644 ---- a/src/common/common.gyp -+++ b/src/common/common.gyp -@@ -46,7 +46,6 @@ - 'android/include/elf.h', - 'android/include/link.h', - 'android/include/sgidefs.h', -- 'android/include/stab.h', - 'android/include/sys/procfs.h', - 'android/include/sys/signal.h', - 'android/include/sys/user.h', -diff --git a/src/common/stabs_reader.cc b/src/common/stabs_reader.cc -index 6019fc7..9562caa 100644 ---- a/src/common/stabs_reader.cc -+++ b/src/common/stabs_reader.cc -@@ -34,7 +34,6 @@ - #include "common/stabs_reader.h" - - #include <assert.h> --#include <stab.h> - #include <string.h> - - #include <string> -diff --git a/src/common/stabs_reader.h b/src/common/stabs_reader.h -index d89afc0..591f007 100644 ---- a/src/common/stabs_reader.h -+++ b/src/common/stabs_reader.h -@@ -53,12 +53,19 @@ - #include <config.h> - #endif - --#ifdef HAVE_A_OUT_H --#include <a.out.h> --#endif - #ifdef HAVE_MACH_O_NLIST_H - #include <mach-o/nlist.h> - #endif -+// Definitions from <stab.h> and <a.out.h> for systems which -+// do not have them -+#undef N_UNDF -+#define N_UNDF 0x0 -+#define N_FUN 0x24 -+#define N_SLINE 0x44 -+#define N_SO 0x64 -+#define N_LSYM 0x80 -+#define N_BINCL 0x82 -+#define N_SOL 0x84 - - #include <string> - #include <vector> -diff --git a/src/common/stabs_reader_unittest.cc b/src/common/stabs_reader_unittest.cc -index a84da1c..854ac42 100644 ---- a/src/common/stabs_reader_unittest.cc -+++ b/src/common/stabs_reader_unittest.cc -@@ -33,7 +33,6 @@ - - #include <assert.h> - #include <errno.h> --#include <stab.h> - #include <stdarg.h> - #include <stdlib.h> - #include <string.h> --- -2.0.5 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch b/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch deleted file mode 100644 index 852c1ed2ca..0000000000 --- a/meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch +++ /dev/null @@ -1,38 +0,0 @@ -From bbf2b5ed5d93b227df8aea5726727b48e29f6790 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 23:35:40 -0700 -Subject: [PATCH 5/5] md2core: Replace basename() - -musl does not provide it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/tools/linux/md2core/minidump-2-core.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc -index 6a9e28eb..52b81c22 100644 ---- a/src/tools/linux/md2core/minidump-2-core.cc -+++ b/src/tools/linux/md2core/minidump-2-core.cc -@@ -107,6 +107,9 @@ struct Options { - - static void - Usage(int argc, const char* argv[]) { -+ const char *c_filename = argv[0];; -+ const char *p = strrchr(c_filename, '/'); -+ const char *base = p ? p+1 : c_filename; - fprintf(stderr, - "Usage: %s [options] <minidump file>\n" - "\n" -@@ -133,7 +136,7 @@ Usage(int argc, const char* argv[]) { - " lookups to be done in this directory rather than the filesystem\n" - " layout as it exists in the crashing image. This path should end\n" - " with a slash if it's a directory. e.g. /var/lib/breakpad/\n" -- "", basename(argv[0])); -+ "", base); - } - - static void --- -2.14.1 - diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch index 42e073b94d..cb323fbdcb 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/mcontext.patch @@ -1,77 +1,16 @@ map the mcontext_t structure for musl -Upstream-Status: Inappropriate[need to consider Android] +Upstream-Status: Inappropriate [need to consider Android] Signed-off-by: Khem Raj <raj.khem@gmail.com> -Index: git/src/client/linux/dump_writer_common/thread_info.cc -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/thread_info.cc -+++ git/src/client/linux/dump_writer_common/thread_info.cc -@@ -229,7 +229,6 @@ void ThreadInfo::FillCPUContext(RawConte - } - - #elif defined(__mips__) -- - uintptr_t ThreadInfo::GetInstructionPointer() const { - return mcontext.pc; - } -@@ -263,8 +262,11 @@ void ThreadInfo::FillCPUContext(RawConte - out->cause = 0; // Not stored in mcontext - - for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) -+#ifdef __GLIBC__ - out->float_save.regs[i] = mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs; -- -+#else -+ out->float_save.regs[i] = mcontext.fpregs[i]; -+#endif - out->float_save.fpcsr = mcontext.fpc_csr; - #if _MIPS_SIM == _ABIO32 - out->float_save.fir = mcontext.fpc_eir; -Index: git/src/client/linux/dump_writer_common/ucontext_reader.cc -=================================================================== ---- git.orig/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ git/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -247,8 +247,11 @@ void UContextReader::FillCPUContext(RawC - out->cause = 0; // Not reported in signal context. - - for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) -+#ifdef __GLIBC__ - out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i]; -- -+#else -+ out->float_save.regs[i] = uc->uc_mcontext.fpregs[i]; -+#endif - out->float_save.fpcsr = uc->uc_mcontext.fpc_csr; - #if _MIPS_SIM == _ABIO32 - out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused. -Index: git/src/client/linux/minidump_writer/linux_core_dumper.cc -=================================================================== ---- git.orig/src/client/linux/minidump_writer/linux_core_dumper.cc -+++ git/src/client/linux/minidump_writer/linux_core_dumper.cc -@@ -196,7 +196,7 @@ bool LinuxCoreDumper::EnumerateThreads() +--- a/src/client/linux/minidump_writer/linux_core_dumper.cc ++++ b/src/client/linux/minidump_writer/linux_core_dumper.cc +@@ -214,7 +214,7 @@ bool LinuxCoreDumper::EnumerateThreads() info.tgid = status->pr_pgrp; info.ppid = status->pr_ppid; #if defined(__mips__) --#if defined(__ANDROID__) -+#if defined(__ANDROID__) || !defined(__GLIBC__) +-# if defined(__ANDROID__) ++# if defined(__ANDROID__) || !defined(__GLIBC__) for (int i = EF_R0; i <= EF_R31; i++) info.mcontext.gregs[i - EF_R0] = status->pr_reg[i]; - #else // __ANDROID__ -Index: git/src/tools/linux/md2core/minidump-2-core.cc -=================================================================== ---- git.orig/src/tools/linux/md2core/minidump-2-core.cc -+++ git/src/tools/linux/md2core/minidump-2-core.cc -@@ -516,8 +516,12 @@ ParseThreadRegisters(CrashedProcess::Thr - thread->mcontext.lo3 = rawregs->lo[2]; - - for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) { -+#ifdef __GLIBC__ - thread->mcontext.fpregs.fp_r.fp_fregs[i]._fp_fregs = - rawregs->float_save.regs[i]; -+#else -+ thread->mcontext.fpregs[i] = rawregs->float_save.regs[i]; -+#endif - } - - thread->mcontext.fpc_csr = rawregs->float_save.fpcsr; + # else // __ANDROID__ diff --git a/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch b/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch index 19bb560445..77d08399bf 100644 --- a/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch +++ b/meta-oe/recipes-devtools/breakpad/breakpad/mips_asm_sgidefs.patch @@ -1,12 +1,11 @@ -Index: lss/linux_syscall_support.h -=================================================================== ---- lss.orig/linux_syscall_support.h -+++ lss/linux_syscall_support.h -@@ -118,21 +118,13 @@ extern "C" { - #include <endian.h> +Upstream-Status: Pending + +--- a/linux_syscall_support.h ++++ b/linux_syscall_support.h +@@ -119,14 +119,7 @@ extern "C" { #ifdef __mips__ --/* Include definitions of the ABI currently in use. */ + /* Include definitions of the ABI currently in use. */ -#ifdef __ANDROID__ -/* Android doesn't have sgidefs.h, but does have asm/sgidefs.h, - * which has the definitions we need. @@ -18,10 +17,3 @@ Index: lss/linux_syscall_support.h #endif #endif - /* The Android NDK's <sys/stat.h> #defines these macros as aliases - * to their non-64 counterparts. To avoid naming conflict, remove them. */ --#ifdef __ANDROID__ -+#if defined(__ANDROID__) || (defined(__linux__) && !defined(__glibc__)) - /* These are restored by the corresponding #pragma pop_macro near - * the end of this file. */ - # pragma push_macro("stat64") |