diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ddb/db_main.c | 16 | ||||
-rw-r--r-- | sys/gdb/gdb_main.c | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/ddb/db_main.c b/sys/ddb/db_main.c index 8375108..6e9286c 100644 --- a/sys/ddb/db_main.c +++ b/sys/ddb/db_main.c @@ -51,8 +51,10 @@ SYSCTL_NODE(_debug, OID_AUTO, ddb, CTLFLAG_RW, 0, "DDB settings"); static dbbe_init_f db_init; static dbbe_trap_f db_trap; static dbbe_trace_f db_trace_self_wrapper; +static dbbe_trace_thread_f db_trace_thread_wrapper; -KDB_BACKEND(ddb, db_init, db_trace_self_wrapper, db_trap); +KDB_BACKEND(ddb, db_init, db_trace_self_wrapper, db_trace_thread_wrapper, + db_trap); vm_offset_t ksym_start, ksym_end; @@ -246,3 +248,15 @@ db_trace_self_wrapper(void) db_trace_self(); (void)kdb_jmpbuf(prev_jb); } + +static void +db_trace_thread_wrapper(struct thread *td) +{ + jmp_buf jb; + void *prev_jb; + + prev_jb = kdb_jmpbuf(jb); + if (setjmp(jb) == 0) + db_trace_thread(td, -1); + (void)kdb_jmpbuf(prev_jb); +} diff --git a/sys/gdb/gdb_main.c b/sys/gdb/gdb_main.c index 8f3c271..4ed3272 100644 --- a/sys/gdb/gdb_main.c +++ b/sys/gdb/gdb_main.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); static dbbe_init_f gdb_init; static dbbe_trap_f gdb_trap; -KDB_BACKEND(gdb, gdb_init, NULL, gdb_trap); +KDB_BACKEND(gdb, gdb_init, NULL, NULL, gdb_trap); static struct gdb_dbgport null_gdb_dbgport; DATA_SET(gdb_dbgport_set, null_gdb_dbgport); |