ref: e87ca8d97689ad9a63c0b56d0bfbda00c56abca2
dir: /sys/man/1/ktrace/
.TH KTRACE 1 .SH NAME ktrace \- interpret kernel stack dumps .SH SYNOPSIS .B ktrace [ .B -i ] .I kernel .I pc .I sp [ .I link ] .SH DESCRIPTION .I Ktrace translates a hexadecimal kernel stack dump into a sequence of .IR acid (1) commands to show the points in the call trace. The .I kernel argument should be the path of the kernel being debugged, and .I pc and .I sp are the PC and SP values given in the stack dump. For MIPS kernels, the contents of the .I link register must also be supplied. .PP A stack trace consists of a .I ktrace command followed by a series of lines containing fields of the form .IB location = contents \fR: .EX ktrace /kernel/path 80105bc1 8048e174 8048e114=80105ac6 8048e120=80140bb4 8048e134=8010031c 8048e16c=80137e45 8048e170=80105bc1 8048e178=80137e62 \&... .EE .PP The trace can be edited to provide the correct kernel path and then pasted into a shell window. If the .B -i option is present, .I ktrace instead prompts for the contents of the memory locations in which it is interested; this is useful when the stack trace is on a screen rather than in a machine readable form. .SH SOURCE .B /sys/src/cmd/ktrace.c .SH SEE ALSO .IR acid (1), .IR rdbfs (4) .SH BUGS When examining a kernel trace resulting from an interrupt on top of other interrupts, only the topmost call trace is printed.