summaryrefslogtreecommitdiff
path: root/debian/patches/immc0003-ddb-automatically-display-stack-traces.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/immc0003-ddb-automatically-display-stack-traces.patch')
-rw-r--r--debian/patches/immc0003-ddb-automatically-display-stack-traces.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/immc0003-ddb-automatically-display-stack-traces.patch b/debian/patches/immc0003-ddb-automatically-display-stack-traces.patch
new file mode 100644
index 0000000..6768f0d
--- /dev/null
+++ b/debian/patches/immc0003-ddb-automatically-display-stack-traces.patch
@@ -0,0 +1,36 @@
+From 19cc6fee48bc1ec62d8990228aa95864413fb190 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 26 Jun 2015 14:44:32 +0200
+Subject: [PATCH gnumach 3/3] ddb: automatically display stack traces
+
+* ddb/db_trap.c (db_task_trap): Automatically display stack traces if
+an unexpected trap occurs.
+---
+ ddb/db_trap.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ddb/db_trap.c b/ddb/db_trap.c
+index b56ffdc..7e10731 100644
+--- a/ddb/db_trap.c
++++ b/ddb/db_trap.c
+@@ -44,6 +44,7 @@
+ #include <ddb/db_task_thread.h>
+ #include <ddb/db_trap.h>
+ #include <ddb/db_run.h>
++#include <machine/db_interface.h>
+
+
+ extern jmp_buf_t *db_recover;
+@@ -88,6 +89,9 @@ db_task_trap(
+ db_print_loc_and_inst(db_dot, task_space);
+ else
+ db_printf("Trouble printing location %#X.\n", db_dot);
++
++ if (!bkpt && !watchpt && _setjmp(db_recover = &db_jmpbuf) == 0)
++ db_stack_trace_cmd(0, 0, -1, "");
+ db_recover = prev;
+
+ db_command_loop();
+--
+2.1.4
+