summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD36
-rw-r--r--fixes.diff90
3 files changed, 141 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b1a2d9f9c440
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = google-coredumper
+ pkgdesc = Library can be compiled into applications to create core dumps of the running program -- without terminating.
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = https://code.google.com/p/google-coredumper/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ source = https://google-coredumper.googlecode.com/files/coredumper-1.2.1.tar.gz
+ source = fixes.diff
+ sha1sums = 8f770458bca2d0eea878689b5ae2329d7d21d450
+ sha1sums = 11d4cc83b2e02210d21271fda608c9a2c2ac8716
+
+pkgname = google-coredumper
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..56c1ec6bc630
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Anatol Pomozov <anatol@google.com>
+pkgname=google-coredumper
+pkgver=1.2.1
+pkgrel=1
+pkgdesc='Library can be compiled into applications to create core dumps of the running program -- without terminating.'
+url='https://code.google.com/p/google-coredumper/'
+license=(GPL)
+arch=(i686 x86_64)
+# Upstream is currently broken.
+# Here are fixs for upstream https://github.com/anatol/google-coredumper
+source=(https://google-coredumper.googlecode.com/files/coredumper-$pkgver.tar.gz
+ fixes.diff)
+sha1sums=('8f770458bca2d0eea878689b5ae2329d7d21d450'
+ '11d4cc83b2e02210d21271fda608c9a2c2ac8716')
+
+prepare() {
+ cd coredumper-$pkgver
+ patch -p1 < "$srcdir/fixes.diff"
+}
+
+build() {
+ cd coredumper-$pkgver
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd coredumper-$pkgver
+# The tests are broken because they expect binaries with debug symbols. Fix the tests.
+# make check
+}
+
+package() {
+ cd coredumper-$pkgver
+ make install DESTDIR="$pkgdir"
+}
diff --git a/fixes.diff b/fixes.diff
new file mode 100644
index 000000000000..94a78f9b0d19
--- /dev/null
+++ b/fixes.diff
@@ -0,0 +1,90 @@
+diff --git a/src/coredumper_unittest.c b/src/coredumper_unittest.c
+index b53443e..a6d89f7 100644
+--- a/src/coredumper_unittest.c
++++ b/src/coredumper_unittest.c
+@@ -139,7 +139,7 @@ static void CheckWithReadElf(FILE *input, FILE *output, const char *filename,
+ "Core file", "no sections in this file",
+ "NOTE",
+ "no relocations in this file",
+- "no unwind sections in this file",
++ "The decoding of unwind sections for machine type Advanced Micro Devices X86-64 is not currently supported.",
+ "No version information found in this file",
+ "NT_PRPSINFO",
+ #ifndef __mips__
+@@ -424,18 +424,16 @@ static void CheckWithGDB(FILE *input, FILE *output, const char *filename,
+ * to gdb. "*" is a glob wildcard character.
+ */
+ static const char *msg[] = { "Core was generated by",
+- " @ process * *"DUMPFUNCTION,
+- "[Switching to thread * *"DUMPFUNCTION,
++ " @ Thread * *"DUMPFUNCTION,
++ "[Current thread is *",
+ "#* *CoreDump",
+ "#@ * TestCoreDump",
+ " TestCoreDump",
+ "$1 = ",
+ #ifdef THREADS
+ " Busy",
+- " @ process * Busy",
+- "[Switching to thread * Busy",
+- "Busy",
+- "Busy",
++ " @ Thread * Busy",
++ "#* *CoreDump",
+ #endif
+ "DONE", 0 };
+
+diff --git a/src/elfcore.c b/src/elfcore.c
+index 4304770..0301f0a 100644
+--- a/src/elfcore.c
++++ b/src/elfcore.c
+@@ -40,6 +40,7 @@ extern "C" {
+ #include <elf.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#include <linux/sched.h>
+ #include <pthread.h>
+ #include <signal.h>
+ #include <stdint.h>
+diff --git a/src/linux_syscall_support_unittest.cc b/src/linux_syscall_support_unittest.cc
+index 3c7dd29..616f382 100644
+--- a/src/linux_syscall_support_unittest.cc
++++ b/src/linux_syscall_support_unittest.cc
+@@ -62,7 +62,6 @@ namespace linux_syscall_support {
+ #include <asm/posix_types.h>
+ #include <asm/types.h>
+ #include <errno.h>
+-#include <linux/dirent.h>
+ #include <linux/types.h>
+ #include <linux/unistd.h>
+ #include <signal.h>
+@@ -91,8 +90,6 @@ static void CheckStructures() {
+ // there are a small number of data structures (e.g "struct
+ // kernel_old_sigaction") that we cannot test at all, as glibc does
+ // not have any definitions for them.
+- CHECK(sizeof(struct dirent64) == sizeof(struct kernel_dirent64));
+- CHECK(sizeof(struct dirent) == sizeof(struct kernel_dirent));
+ CHECK(sizeof(struct iovec) == sizeof(struct kernel_iovec));
+ CHECK(sizeof(struct msghdr) == sizeof(struct kernel_msghdr));
+ CHECK(sizeof(struct pollfd) == sizeof(struct kernel_pollfd));
+diff --git a/src/linuxthreads.c b/src/linuxthreads.c
+index c09c68e..f7ba427 100644
+--- a/src/linuxthreads.c
++++ b/src/linuxthreads.c
+@@ -39,7 +39,7 @@ extern "C" {
+ #endif
+
+ #include <asm/stat.h>
+-#include <sched.h>
++#include <linux/sched.h>
+ #include <signal.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -49,7 +49,6 @@ extern "C" {
+ #include <asm/fcntl.h>
+ #include <asm/posix_types.h>
+ #include <asm/types.h>
+-#include <linux/dirent.h>
+
+ #include "linux_syscall_support.h"
+ #include "thread_lister.h"