summaryrefslogtreecommitdiff
path: root/debian/patches/random-fixes0001-kern-bootstrap-drop-into-the-debugger.patch
blob: e97149156546e253dcfcb2e1c6e3409769144daa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 74cf1713f195ca5f1665a9fc65a6bec9985925b0 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Sun, 27 Sep 2015 14:35:27 +0200
Subject: [PATCH gnumach 1/2] kern/bootstrap: drop into the debugger

* kern/bootstrap.c (boot_script_prompt_task_resume): Drop into the
debugger instead of merely waiting for return using `safe_gets', which
disables interrupts, making it impossible to break into the debugger
using the magic keys.
---
 kern/bootstrap.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index bb6606c..779f913 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -823,10 +823,18 @@ boot_script_task_resume (struct cmd *cmd)
 int
 boot_script_prompt_task_resume (struct cmd *cmd)
 {
+#if ! MACH_KDB
   char xx[5];
+#endif
+
+  printf ("Pausing for %s...\n", cmd->path);
 
-  printf ("Hit return to resume %s...", cmd->path);
+#if ! MACH_KDB
+  printf ("Hit <return> to resume bootstrap.");
   safe_gets (xx, sizeof xx);
+#else
+  SoftDebugger("Hit `c<return>' to resume bootstrap.");
+#endif
 
   return boot_script_task_resume (cmd);
 }
-- 
2.1.4