git: b8ec4929e9f4 - main - callout: ddb: resolve symbol of callout function
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Jun 2026 22:32:31 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=b8ec4929e9f4c83bf02f412de1f9022b17abf867
commit b8ec4929e9f4c83bf02f412de1f9022b17abf867
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-06-10 11:57:09 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-06-14 22:31:39 +0000
callout: ddb: resolve symbol of callout function
In the ddb show callout function try to resolve the symbol of the
callout function to improve debugging. In my case I went through
various callouts from show ktr to check what they were and this saved
me opening lldb/gdb next to it (and still having the old kernel as
the panic to debug was upon reboot).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: rlibby
Differential Revision: https://reviews.freebsd.org/D57521
---
sys/kern/kern_timeout.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 0fa1af6ef5a7..1f97e4f813a1 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1485,7 +1485,9 @@ _show_callout(struct callout *c)
C_DB_PRINTF("%" PRId64, c_time);
C_DB_PRINTF("%" PRId64, c_precision);
C_DB_PRINTF("%p", c_arg);
- C_DB_PRINTF("%p", c_func);
+ db_printf(" %s = %p (", "c_func", c->c_func);
+ db_printsym((db_addr_t)c->c_func, DB_STGY_ANY);
+ db_printf(")\n");
C_DB_PRINTF("%p", c_lock);
C_DB_PRINTF("%#x", c_flags);
C_DB_PRINTF("%#x", c_iflags);