diff options
author | Michael Casadevall <sonicmctails@gmail.com> | 2007-12-19 22:18:37 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:35:13 +0200 |
commit | 894bc8c5b7936d274195f70b6db560f4fec569f4 (patch) | |
tree | bd0181ca26850bc5660e846bbc416927f8a9cf16 /kern/bootstrap.c | |
parent | 45b1b09e0c92f21852d16477e722595e70bc0919 (diff) |
Inital commit of gdb branch
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!"); |