Update the ddb and gdb backends for the new 'trace_thread' hook.

It is implemented via db_trace_thread() for DDB and not implemented
for GDB.  This should have been part of r234190.

Pointy hat to:	jhb
Reported by:	jkim
MFC after:	1 week
This commit is contained in:
jhb 2012-04-12 21:34:58 +00:00
parent 02e8925eaa
commit 4b63f702b7
2 changed files with 16 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);