diff options
Diffstat (limited to 'kern/bootstrap.c')
-rw-r--r-- | kern/bootstrap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index ad501d65..2e095106 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -51,6 +51,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> @@ -102,6 +107,17 @@ void bootstrap_create() phystokv(boot_info.mods_addr)); int compat; +#ifdef MACH_GDB_STUB + /* + * FIXME: Change this so its only + * run if -d is passed to mach + */ + set_debug_traps(); + 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!"); |