HomeFreeBSD

Only call stacktrace_subr() from DDB.

Description

Only call stacktrace_subr() from DDB.

There was a single call to stacktrace() under an #ifdef DEBUG to obtain
a stack trace during a fault that resulted in a function pointer to a
printf function being passed to stacktrace_subr() in db_trace.c. The
kernel now has existing interfaces for obtaining a stack trace outside
of DDB (kdb_backtrace(), or the stack_*() API) that should be used instead.
Rather than fix the one call however, remove it since the kernel will
dump a trace anyway once it panics.

Make stacktrace_subr() static, remove the function pointer and change it
to use db_printf() explicitly.

Discussed with: kan
Sponsored by: DARPA / AFRL

Details

Provenance
jhbAuthored on
Parents
rS311340: Misc Coverity fixes for tail(1)
Branches
Unknown
Tags
Unknown