freebsd-nq/sys/cddl/dev
Jessica Clarke 05985a7f80 arm64: Improve DDB backtrace support
The existing implementation relies on each trap handler saving a normal
stack frame record, which is a waste of time and space when we're
already saving a trapframe to the stack. It's also wrong as it currently
saves LR not ELR.

Instead of patching it up, rewrite it based on the RISC-V implementation
with inspiration from the amd64 implementation for how to handle
vectored traps to provide an improved implementation. This includes
compressing the information down to one line like other architectures
rather than the highly-verbose old form that repeats itself by printing
LR and FP in one frame only to print them as PC and SP in the next. It
also includes printing out actually useful information about the traps
that occurred, though FAR is not saved in the trapframe so we cannot
print it (in general it can be clobbered between when the trap happened
and now), only ESR.

The AAPCS also allows the stack frame record to be located anywhere in
the frame, not just the top, so the caller's SP is not at a fixed offset
from the callee's FP like on almost all other architectures in
existence. This means there is no way to derive the caller's SP in the
unwinder, and so we have to drop that bit of (unused) state everywhere.

Reviewed by:	jhb, markj
Differential Revision:	https://reviews.freebsd.org/D28026
2021-02-01 14:15:57 +00:00
..
dtmalloc malloc: move malloc_type_internal into malloc_type 2020-11-06 21:33:59 +00:00
dtrace arm64: Improve DDB backtrace support 2021-02-01 14:15:57 +00:00
fbt Handle using a sub instruction in the arm64 fbt 2021-01-12 12:42:23 +00:00
profile Merge OpenZFS support in to HEAD. 2020-08-25 02:21:27 +00:00
sdt sdt: Create providers and probes in separate passes when loading sdt.ko 2020-12-03 17:10:00 +00:00
systrace Merge OpenZFS support in to HEAD. 2020-08-25 02:21:27 +00:00
prototype.c Use C99 initializers for DTrace provider methods. 2017-09-27 17:46:38 +00:00