summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-06-03 01:54:48 +0200
committerJustus Winter <justus@gnupg.org>2016-06-03 01:54:48 +0200
commit5b90058991c3b65220105a6954a95c1bca5397cb (patch)
tree6f54ff230abbc029c87fb4b934b6506d53bfc50d
parent419986c8dd058bc8ebb1758ae7c61913c72b511a (diff)
drop old patch series
-rw-r--r--debian/patches/crash0001-xxx-crash-logging-works.patch175
-rw-r--r--debian/patches/series1
2 files changed, 0 insertions, 176 deletions
diff --git a/debian/patches/crash0001-xxx-crash-logging-works.patch b/debian/patches/crash0001-xxx-crash-logging-works.patch
deleted file mode 100644
index 0e5d6f10..00000000
--- a/debian/patches/crash0001-xxx-crash-logging-works.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 2e5e65464a919373212927fe52d86250e7713ecb Mon Sep 17 00:00:00 2001
-From: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Mon, 1 Dec 2014 22:23:29 +0100
-Subject: [PATCH hurd] xxx crash logging works
-
----
- hurd/paths.h | 1 +
- trans/crash.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 120 insertions(+)
-
-diff --git a/hurd/paths.h b/hurd/paths.h
-index a13ba9b..c6cb7a0 100644
---- a/hurd/paths.h
-+++ b/hurd/paths.h
-@@ -54,6 +54,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
- #define _HURD_IFSOCK _HURD "ifsock" /* S_IFSOCK */
-
- /* Symbolic names for all non-essential translators. */
-+#define _HURD_CRASH _HURD "crash"
- #define _HURD_MTAB _HURD "mtab"
-
- #endif /* hurd/paths.h */
-diff --git a/trans/crash.c b/trans/crash.c
-index 5db9974..4966f5c 100644
---- a/trans/crash.c
-+++ b/trans/crash.c
-@@ -24,12 +24,14 @@
- #include <hurd.h>
- #include <fcntl.h>
- #include <hurd/trivfs.h>
-+#include <hurd/paths.h>
- #include <sys/wait.h>
- #include <error.h>
- #include <argp.h>
- #include <argz.h>
- #include <sys/mman.h>
- #include <assert.h>
-+#include <syslog.h>
-
- #include <version.h>
-
-@@ -142,6 +144,121 @@ stop_pgrp (process_t userproc, mach_port_t cttyid)
- munmap (pids, numpids);
- }
-
-+void mach_print(const char *);
-+
-+#ifndef EXTERNAL_MACH_PRINT
-+asm (".global mach_print;"
-+ " mach_print:;"
-+ " mov $0xffffffe2, %eax;"
-+ " lcall $0x7, $0x0;"
-+ " ret;");
-+#endif /* EXTERNAL_MACH_PRINT */
-+
-+#include <mach/thread_status.h>
-+
-+error_t
-+get_pcs (task_t task, char **pcs)
-+{
-+ error_t err;
-+ thread_t *threads;
-+ size_t i, nthreads;
-+
-+#ifdef i386_THREAD_STATE
-+ struct i386_thread_state state;
-+ mach_msg_type_number_t count = i386_THREAD_STATE_COUNT;
-+ int flavor = i386_THREAD_STATE;
-+
-+ err = task_threads (task, &threads, &nthreads);
-+ if (err)
-+ return err;
-+
-+ *pcs = NULL;
-+ for (i = 0; i < nthreads; i++)
-+ {
-+ char *old = *pcs;
-+ err = thread_get_state (threads[i], flavor,
-+ (thread_state_t) &state, &count);
-+ if (err)
-+ return err;
-+
-+ if (old)
-+ asprintf (pcs, "%s, 0x%x", old, state.eip);
-+ else
-+ asprintf (pcs, "0x%x", state.eip);
-+
-+ free (old);
-+ err = mach_port_deallocate (mach_task_self (), threads[i]);
-+ assert_perror (err);
-+ }
-+#else
-+ *pcs = strdup ("architecture not supported");
-+#endif
-+ return 0;
-+}
-+
-+error_t
-+log_crash (task_t task,
-+ int signo, integer_t sigcode, int sigerror,
-+ natural_t exc, natural_t code, natural_t subcode,
-+ enum crash_action how)
-+{
-+ error_t err;
-+ pid_t pid;
-+ char argz_buf[128], *argz = argz_buf;
-+ size_t argz_len = sizeof argz;
-+ char *msg;
-+ char *how_msg;
-+ char *pcs;
-+
-+ switch (how)
-+ {
-+ case crash_suspend:
-+ how_msg = "suspending task";
-+ break;
-+ case crash_kill:
-+ how_msg = "killing task";
-+ break;
-+ case crash_corefile:
-+ how_msg = "writing core file";
-+ break;
-+ default:
-+ assert (! "reached");
-+ }
-+
-+ err = proc_task2pid (procserver, task, &pid);
-+ if (err)
-+ return err;
-+
-+ err = proc_getprocargs (procserver, pid, &argz, &argz_len);
-+ if (err)
-+ return err;
-+
-+ err = get_pcs (task, &pcs);
-+ if (err)
-+ return err;
-+
-+ argz_stringify (argz, argz_len, ' ');
-+ asprintf (&msg, "%s: %s(%d) crashed, signal {no:%d, code:%d, error:%d}, "
-+ "exception {%d, code:%d, subcode:%d}, PCs: {%s}, %s.\n",
-+ _HURD_CRASH, argz, pid,
-+ signo, sigcode, sigerror,
-+ exc, code, subcode,
-+ pcs,
-+ how_msg);
-+ if (argz != argz_buf)
-+ vm_deallocate (mach_task_self (), argz, argz_len);
-+ free (pcs);
-+ if (! msg)
-+ return ENOMEM;
-+
-+ fprintf (stderr, "%s", msg);
-+ mach_print (msg);
-+ syslog (LOG_ERR, "%s", msg);
-+
-+ free (msg);
-+
-+ return 0;
-+}
-
- kern_return_t
- S_crash_dump_task (mach_port_t port,
-@@ -175,6 +292,8 @@ S_crash_dump_task (mach_port_t port,
- }
- }
-
-+ log_crash (task, signo, sigcode, sigerror, exc, code, subcode, how);
-+
- switch (how)
- {
- default: /* NOTREACHED */
---
-2.1.4
-
diff --git a/debian/patches/series b/debian/patches/series
index f409c90c..eb90a884 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -35,7 +35,6 @@ exec_filename0002-Add-a-file_exec_file_name-RPC.patch
exec_filename0003-Use-the-new-_hurd_exec_file_name-function.patch
exec_filename0004-This-patch-is-an-amendment-of-exec_filename_exec.pat.patch
-crash0001-xxx-crash-logging-works.patch
pager-alloc0001-libpager-provide-pager_create_alloc.patch
hurdutil0001-libhurdutil-New-library-containing-utils-to-be-used-.patch
external.patch