diff options
Diffstat (limited to 'kern/bootstrap.c')
-rw-r--r-- | kern/bootstrap.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index c07b032d..7dd7c140 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -54,6 +54,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> @@ -122,8 +127,19 @@ void bootstrap_create() #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!"); |