diff options
author | John Baldwin <jhb@FreeBSD.org> | 2002-09-19 18:46:29 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2002-09-19 18:46:29 +0000 |
commit | c79408a0598671ed3c1c62bca8d950a31e0e88ef (patch) | |
tree | c1476f925d34a2b15d6347328a15e33a91997d2f /sys/ddb/ddb.h | |
parent | 37ee08bcabbaf392f03e6130d10c3461a3518e63 (diff) | |
download | src-c79408a0598671ed3c1c62bca8d950a31e0e88ef.tar.gz src-c79408a0598671ed3c1c62bca8d950a31e0e88ef.zip |
Implement db_print_backtrace() if DDB is compiled into the kernel. This
MD function is just a wrapper around db_stack_trace_cmd() that prints out
a backtrace of curthread. Currently, this function is only implemented
on i386 and alpha (and the alpha version isn't quite tested yet, will do
that in a bit). Other changes:
- For i386, fix a bug in the raw frame address case. The eip we extract
from the passed in frame address does not match the frame we received.
Thus, instead of printing a bogus frame with the wrong eip, go ahead
and advance frame down to the same frame as the eip we are using.
- For alpha, attempt to add a way of doing a raw trace for alpha. Instead
of passing a frame address in 'addr', pass in a pointer to a structure
containing PC and KSP and use those to start the backtrace. The alpha
db_print_backtrace() uses asm to read in the current PC and KSP values
into such a request.
Tested on: i386
Requested by: many
Notes
Notes:
svn path=/head/; revision=103646
Diffstat (limited to 'sys/ddb/ddb.h')
-rw-r--r-- | sys/ddb/ddb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index ce3ffc41278a..1eb87ba0ce27 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -134,6 +134,9 @@ db_cmdfcn_t ipc_port_print; db_cmdfcn_t vm_page_print; #endif +/* Scare the user with backtrace of curthread to console. */ +void db_print_backtrace(void); + /* * Command table. */ |