kern/57976: simple kernel DDB enhancement

Dan Strick strick at
Mon Oct 13 13:50:27 PDT 2003

>Number:         57976
>Category:       kern
>Synopsis:       simple kernel DDB enhancement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 13 13:50:24 PDT 2003
>Originator:     Dan Strick
>Release:        FreeBSD in general
System: FreeBSD ice 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sun Apr 6 21:47:39 PDT 2003 root at ice:/usr/src/sys/compile/ICE i386


This is not bug report but a request for a trivial but potentially very
useful enhancement to the kernel DDB facility.  In function db_examine()
in the source file /sys/ddb/db_examine.c, add something like this:

                            case 'S':   /* symbolic */
                                value = db_get_value(addr, size, FALSE);
                                addr += size;
                                db_printsym(value, DB_STGY_ANY);

to the examine format switch, for example just before the line:

                            case 'c':   /* character */

This would create a new examine modifer format that expresses a value
as a global_symbol+offset instead of just a non-obvious number.
This might be very useful when examining pointers in memory.

Presumably the DDB(4) man page would also be modified to mention
the new format.  This would also be a good time to add a description
of the DDB "panic" command which has somehow escaped mention on
the man page.

Dan Strick
strick at

More information about the freebsd-bugs mailing list