freebsd-dev/sys/ddb
mhorne 088a7eef95 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
2021-01-08 14:53:06 -04:00
..
db_access.c No need to force md code to define a macro that's the same as 2018-04-16 13:52:23 +00:00
db_access.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_break.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_break.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_capture.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_command.c Use kdb_thr_* to iterate over threads consistently in DDB. 2020-12-31 16:01:35 -08:00
db_command.h ddb(4): Move an extern variable declaration to a header 2019-09-09 01:33:45 +00:00
db_examine.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_expr.c kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
db_input.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_lex.c ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
db_lex.h ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
db_main.c [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
db_output.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_output.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_print.c ddb: add ability to print user registers 2021-01-08 14:53:06 -04:00
db_ps.c ddb: Display process flags (p_flag and p_flag2) in 'show proc'. 2020-12-31 16:01:52 -08:00
db_run.c ddb(4): Move an extern variable declaration to a header 2019-09-09 01:33:45 +00:00
db_script.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_sym.c db_search_symbol: prevent pollution from bogus symbols 2020-10-26 16:42:53 +00:00
db_sym.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_textdump.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_thread.c Use kdb_thr_from_pid() in db_lookup_thread(). 2020-12-31 16:01:27 -08:00
db_variables.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_variables.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_watch.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_watch.h SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
db_write_cmd.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
ddb.h [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00