CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2017/05/07 18:13:38
Modified files:
sys/arch/amd64/amd64: db_trace.c
sys/arch/amd64/conf: Makefile.amd64
Log message:
add printing of arguments in stack traces.
this relies on building the kernel with -msave-args, which has
functions save their register arguments on the stack, so ddb can
easily find them and print them.
while here try to print arguments out of registers if we're at the
top of the stack (ie, if we set a breakpoint on a function entry).
-msave-args is only added to the compiler flags if the kernel has
been configured with ddb. this means it wont waste the space on
RAMDISK kernels because they don't include ddb.
inspired by similar functionality that has been in use on solaris
and its derivatives for well over a decade.
ok deraadt@