diff options
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/ddb/db_main.c b/sys/ddb/db_main.c index d047aeb..c196bf7 100644 --- a/sys/ddb/db_main.c +++ b/sys/ddb/db_main.c @@ -47,8 +47,9 @@ __FBSDID("$FreeBSD$"); static dbbe_init_f db_init; static dbbe_trap_f db_trap; +static dbbe_trace_f db_trace_self_wrapper; -KDB_BACKEND(ddb, db_init, db_trace_self, db_trap); +KDB_BACKEND(ddb, db_init, db_trace_self_wrapper, db_trap); vm_offset_t ksym_start, ksym_end; @@ -226,3 +227,15 @@ db_trap(int type, int code) return (1); } + +static void +db_trace_self_wrapper(void) +{ + jmp_buf jb; + void *prev_jb; + + prev_jb = kdb_jmpbuf(jb); + if (setjmp(jb) == 0) + db_trace_self(); + (void)kdb_jmpbuf(prev_jb); +} |