summaryrefslogtreecommitdiff
path: root/kern/bootstrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/bootstrap.c')
-rw-r--r--kern/bootstrap.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 50388ade..0a8dcedb 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -57,6 +57,11 @@
#include <ddb/db_sym.h>
#endif
+#if MACH_GDB_STUB
+extern void set_debug_traps();
+extern void breakpoint();
+#endif
+
#if OSKIT_MACH
#include <stddef.h>
#include <oskit/machine/base_multiboot.h>
@@ -125,8 +130,19 @@ void bootstrap_create(void)
#else /* MACH_XEN */
struct multiboot_module *bmods = ((struct multiboot_module *)
phystokv(boot_info.mods_addr));
-
#endif /* MACH_XEN */
+
+#ifdef MACH_GDB_STUB
+ /*
+ * FIXME: Change this so its only
+ * run if -d is passed to mach
+ */
+
+ printf("Waiting for debugger connection on com0\n");
+ breakpoint();
+ printf("Back from GDB\n");
+#endif /* MACH_GDB_STUB */
+
if (!(boot_info.flags & MULTIBOOT_MODS)
|| (boot_info.mods_count == 0))
panic ("No bootstrap code loaded with the kernel!");