-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp.html
163 lines (143 loc) · 5.01 KB
/
p.html
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<!-- MAIN BODY TABLE is nested for scalability -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><hr class="gray" noshade="noshade" /></td>
</tr>
<tr>
<td colspan="3"><img src="/img/pixel.gif" width="1" height="10" border="0" alt="" /></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<!--CONTENT begins here-->
<h3>crash utility help page: <tt><b> p</b></tt></a></h3>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
<pre>
NAME
p - print the value of an expression
SYNOPSIS
p [-x|-d][-u] [expression | symbol[:cpuspec]]
DESCRIPTION
This command passes its arguments on to gdb "print" command for evaluation.
expression an expression to be evaluated.
symbol a kernel symbol.
:cpuspec CPU specification for a per-cpu symbol:
: CPU of the currently selected task.
:a[ll] all CPUs.
:#[-#][,...] CPU list(s), e.g. "1,3,5", "1-3",
or "1,3,5-7,10".
-x override default output format with hexadecimal format.
-d override default output format with decimal format.
-u the expression evaluates to a user address reference.
The default output format is decimal, but that can be changed at any time
with the two built-in aliases "hex" and "dec". Alternatively, there
are two other built-in aliases, "px" and "pd", which force the command
output to be displayed in hexadecimal or decimal, without changing the
default mode.
EXAMPLES
Print the contents of jiffies:
crash> p jiffies
jiffies = $6 = 166532620
crash> px jiffies
jiffies = $7 = 0x9ed174b
crash> pd jiffies
jiffies = $8 = 166533160
Print the contents of the vm_area_struct "init_mm":
crash> p init_mm
init_mm = $5 = {
mmap = 0xc022d540,
mmap_avl = 0x0,
mmap_cache = 0x0,
pgd = 0xc0101000,
count = {
counter = 0x6
},
map_count = 0x1,
mmap_sem = {
count = {
counter = 0x1
},
waking = 0x0,
wait = 0x0
},
context = 0x0,
start_code = 0xc0000000,
end_code = 0xc022b4c8,
start_data = 0x0,
end_data = 0xc0250388,
start_brk = 0x0,
brk = 0xc02928d8,
start_stack = 0x0,
arg_start = 0x0,
arg_end = 0x0,
env_start = 0x0,
env_end = 0x0,
rss = 0x0,
total_vm = 0x0,
locked_vm = 0x0,
def_flags = 0x0,
cpu_vm_mask = 0x0,
swap_cnt = 0x0,
swap_address = 0x0,
segments = 0x0
}
If a per-cpu symbol is entered as a argument, its data type
and all of its per-cpu addresses are displayed:
crash> p irq_stat
PER-CPU DATA TYPE:
irq_cpustat_t irq_stat;
PER-CPU ADDRESSES:
[0]: ffff88021e211540
[1]: ffff88021e251540
[2]: ffff88021e291540
[3]: ffff88021e2d1540
To display the contents a per-cpu symbol for CPU 1, append
a cpu-specifier:
crash> p irq_stat:1
per_cpu(irq_stat, 1) = $29 = {
__softirq_pending = 0,
__nmi_count = 209034,
apic_timer_irqs = 597509876,
irq_spurious_count = 0,
icr_read_retry_count = 2,
x86_platform_ipis = 0,
apic_perf_irqs = 209034,
apic_irq_work_irqs = 0,
irq_resched_count = 264922233,
irq_call_count = 7036692,
irq_tlb_count = 4750442,
irq_thermal_count = 0,
irq_threshold_count = 0
}
</pre>
</td>
</tr>
</table>
<!--CONTENT ends here-->
</td>
</tr>
</table>
<hr class="gray" noshade="noshade" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><img src="/img/pixel.gif" width="1" height="10" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="3"><img src="/img/pixel.gif" width="1" height="30" border="0" alt="" /></td>
</tr>
</table>
</td>
</table>
</body>
</html>