freebsd-dev/sys/i386
Andriy Gapon f3f6ecb450 set kdb_why to "trap" when calling kdb_trap from trap_fatal
This will allow to hook a ddb script to "kdb.enter.trap" event.
Previously there was no specific name for this event, so it could only
be handled by either "kdb.enter.unknown" or "kdb.enter.default" hooks.
Both are very unspecific.

Having a specific event is useful because the fatal trap condition is
very similar to panic but it has an additional property that the current
stack frame is the frame where the trap occurred.  So, both a register
dump and a stack bottom dump have additional information that can help
analyze the problem.

I have added the event only on architectures that have trap_fatal()
function defined.  I haven't looked at other architectures.  Their
maintainers can add support for the event later.

Sample script:
kdb.enter.trap=bt; show reg; x/aS $rsp,20; x/agx $rsp,20

Reviewed by:	kib, jhb, markj
MFC after:	11 days
Sponsored by:	Panzura
Differential Revision: https://reviews.freebsd.org/D15093
2018-04-19 05:06:56 +00:00
..
acpica Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
bios inittodr(0) actually sets the time, so there's no need to call 2018-01-10 17:25:08 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf i386 4/4G split. 2018-04-13 20:30:49 +00:00
i386 set kdb_why to "trap" when calling kdb_trap from trap_fatal 2018-04-19 05:06:56 +00:00
ibcs2 Fix kernel memory disclosure in ibcs2_getdents 2018-03-21 23:26:42 +00:00
include i386 4/4G split. 2018-04-13 20:30:49 +00:00
linux linuxulator: deduplicate linux_exec_imgact_try 2018-04-09 17:24:01 +00:00
pci Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
Makefile