I just tried today and I couldn't build it either. But the following simple patch fixed it for me:
diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index 8b64fa3..825b72e 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -51,8 +51,6 @@ db_breakpoint_t db_taken_bkpt = 0; int db_inst_count; -#ifndef KGDB - #include <ddb/db_lex.h> #include <ddb/db_watch.h> #include <ddb/db_output.h> @@ -298,7 +296,6 @@ db_continue_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) db_cmd_loop_done = 1; } -#endif /* NO KGDB */ #ifdef SOFTWARE_SSTEP /* However this might be wrong. Most likely there is a good reason why that ifdef is there. Luis On Mon, Dec 24, 2012 at 5:40 AM, <sickm...@lavabit.com> wrote: > On 15:34 Sun 23 Dec , Justin Mayes wrote: > > I was looking into kernel debug options and found that trying to build a > > kernel with kgdb option enabled fails. Anyone using the kgdb setup? I can > > use ddb it's just painful to have to manually walk structures to examine > > values. I have moved on to plan B which was to build with option > DDB_STRUCT > > and the build is a success but the 'show struct' command always returns > > 'unknown structure' for anything other than mbuf. Anyone have any kernel > > debugging strategies they'd like to share? > > > > > > > > Justin > > > > [demime 1.01d removed an attachment of type application/pkcs7-signature > which had a name of smime.p7s] > > I gave it a try about a year ago, but not much luck. If you want to use > gdb, you'll have either to fix kgdb or to run openbsd inside qemu and > use qemu as a gdb backend. And you can always stick to ddb.