HomeFreeBSD

ddb: add ability to print user registers

Description

ddb: add ability to print user registers

The debugger is always entered after some kind of kernel trap, often a
breakpoint in kdb_enter(). This means that the most recent trapframe
will include kernel state at the time of the trap, when often it is
desirable to the developer to view the contents of the previous
trapframe. This trapframe often corresponds to the entry from userspace.

The ddb(4) man page claims the ability to display user register state
via the 'u' modifier to show registers, but this appears untrue. It is
not obvious from a quick search of the history when this feature was
added, or when it was removed. (Re)implement this feature in
db_show_regs, noting that it is not necessarily populated with userspace
state.

Reviewed by: jhb (earlier version), markj, bcr (manpages)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27705

Details

Provenance
mhorneAuthored on Dec 18 2020, 8:06 PM
Reviewer
jhb
Differential Revision
D27705: ddb: add ability to print user registers
Parents
rG52cd25eb1aa7: mbuf: enable ext_pgs ("unmapped") mbufs by default
Branches
Unknown
Tags
Unknown