File: kdb_bp.man

package info (click to toggle)
kernel-patch-kdb 0.6-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 308 kB
  • ctags: 12
  • sloc: makefile: 60; sh: 55
file content (131 lines) | stat: -rw-r--r-- 3,731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.TH BD 1 "09 March 1999"
.SH NAME
bc, bd, be, bl, bp, bpa \- breakpoint commands
.SH SYNOPSIS
bp \fIaddress-expression\fP [\f(CWDATAR|DATAW|IO\fP [\fIlength\fP]]
.LP
bpa \fIaddress-expression\fP [\f(CWDATAR|DATAW|IO\fP [\fIlength\fP]]
.LP
bd \fIbreakpoint-number\fP
.LP
bc \fIbreakpoint-number\fP
.LP
be \fIbreakpoint-number\fP
.LP
bl
.SH DESCRIPTION
The
.B bp 
command is used to establish a breakpoint.   
The \fIaddress-expression\fP may be a numeric value (decimal or
hexidecimal), a symbol name, a register name preceeded by a 
percent symbol '%', or a simple expression consisting of a 
symbol name, an addition or subtraction character and a numeric
value (decimal or hexidecimal).
.P
The \fIaddress-expression\fP may also consist of a single
asterisk '*' symbol which indicates that the command should
operate on all existing breakpoints (valid only for \fBbc\fP, 
\fBbd\fP and \fBbe\fP).
.P
Three different types of
breakpoints may be set:

.TP 8
Instruction
Causes the kernel debugger to be invoked from the debug exception
path when an instruction is fetched from the specified address.  This
is the default if no other type of breakpoint is requested.

.TP 8
DATAR
Causes the kernel debugger to be entered when data of length
\fIlength\fP is read from or written to the specified address.
This type of breakpoint must use a processor debug register 
thus placing a limit of four on the number of data and I/O 
breakpoints that may be established.

.TP 8
DATAW
Enters the kernel debugger when data of length \fIlength\fP
is written to the specified address.  \fIlength\fP defaults 
to four bytes if it is not explicitly specified.  Note that the 
processor will have already overwritten the prior data at the
breakpoint location before the kernel debugger is invoked.  The
prior data should be saved before establishing the 
breakpoint, if required.

.TP 8
IO
Enters the kernel debugger when an \fBin\fP or \fBout\fP instruction
targets the specified I/O address.

.P
The
.B bpa
command will establish a breakpoint on all processors in an
SMP system.   This command is not available in an uniprocessor
kernel.
.P
The
.B bd
command will disable a breakpoint without removing it from 
the kernel debuggers breakpoint table.   This can be used to 
keep more than 4 breakpoints in the breakpoint table without
exceeding the processor breakpoint register count.
.P
The
.B be
command will re-enable a disabled breakpoint.
.P
The
.B bc
command will clear a breakpoint from the breakpoint table.
.P
The 
.B bl
command will list the existing set of breakpoints.
.SH LIMITATIONS
Currently the kernel debugger does not use the int 03 method
of establishing instruction breakpoints, so there may only be
four active instruction and data breakpoints at any given time.
.P
There is a compile time limit of sixteen entries in the 
breakpoint table at any one time.
.SH ENVIRONMENT
The breakpoint subsystem does not currently use any environment
variables.
.SH SMP CONSIDERATIONS
Breakpoints which use the processor breakpoint registers
are only established on the processor which is
currently active.  If you wish breakpoints to be universal
use the 'bpa' command.
.SH EXAMPLES
.TP 8
bp schedule
Sets an instruction breakpoint at the begining of the 
function \fBschedule\fP.

.TP 8
bp schedule+0x12e
Sets an instruction breakpoint at the instruction located
at \fBschedule\fP+\fI0x12e\fP.

.TP 8
bp ttybuffer+0x24 dataw
Sets a data write breakpoint at the location referenced by
\fBttybuffer\fP+\fI0x24\fP for a length of four bytes.

.TP 8
bp 0xc0254010 datar 1
Establishes a data reference breakpoint at address \fB0xc0254010\fP
for a length of one byte.

.TP 8
bp
List current breakpoint table.

.TP 8
bd 0
Disable breakpoint #0.