]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/ktrace
merge
[plan9front.git] / sys / man / 1 / ktrace
1 .TH KTRACE 1
2 .SH NAME
3 ktrace \- interpret kernel stack dumps
4 .SH SYNOPSIS
5 .B ktrace 
6 [
7 .B -i
8 ]
9 .I kernel
10 .I pc
11 .I sp
12 [
13 .I link
14 ]
15 .SH DESCRIPTION
16 .I Ktrace
17 translates a hexadecimal kernel stack dump 
18 into a sequence of 
19 .IR acid (1)
20 commands to show the points in the call trace.
21 The
22 .I kernel
23 argument should be the path of the kernel being debugged,
24 and
25 .I pc
26 and
27 .I sp
28 are the PC and SP values given in the stack dump.
29 For MIPS kernels, the contents of the
30 .I link
31 register must also be supplied.
32 .PP
33 A stack trace consists of a 
34 .I ktrace
35 command followed by a series of lines containing
36 fields of the form
37 .IB location = contents \fR:
38 .EX
39 ktrace /kernel/path 80105bc1 8048e174
40 8048e114=80105ac6 8048e120=80140bb4 8048e134=8010031c
41 8048e16c=80137e45 8048e170=80105bc1 8048e178=80137e62
42 \&...
43 .EE
44 .PP
45 The trace can be edited to provide the correct kernel path
46 and then pasted into a shell window.
47 If the
48 .B -i
49 option is present, 
50 .I ktrace
51 instead prompts for the contents of the memory locations in which it is interested;
52 this is useful when the stack trace is on a screen rather than
53 in a machine readable form.
54 .SH SOURCE
55 .B /sys/src/cmd/ktrace.c
56 .SH SEE ALSO
57 .IR acid (1),
58 .IR rdbfs (4)
59 .SH BUGS
60 When examining a kernel trace resulting from 
61 an interrupt on top of other interrupts,
62 only the topmost call trace is printed.