blob: 1cae24b275470f07555bde6398ad70c78b44994b (
plain)
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
|
<table class="head">
<tr>
<td class="head-ltitle">LINDEBUGFS(4)</td>
<td class="head-vol">Device Drivers Manual</td>
<td class="head-rtitle">LINDEBUGFS(4)</td>
</tr>
</table>
<div class="manual-text">
<p class="Pp"></p>
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">lindebugfs</code> — <span class="Nd">Linux
file system for debugging</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<div class="Bd Li">
<pre>lindebugfs /sys/kernel/debug lindebugfs rw 0 0</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The debug file system, or debugfs, makes process debugging easier
by providing a simple API for data transfer between the kernel and user
space. Debugfs is not a general-purpose file system and should not be used
as a storage medium. Instead, developers can implement the debugfs interface
in their code to generate debug information about their program at runtime.
FreeBSD's <code class="Nm">lindebugfs</code> uses the
<a class="Xr">pseudofs(9)</a> file system construction kit to model itself
after Linux's debugfs. The <code class="Nm">lindebugfs</code> API is
intended for use with programs that take advantage of FreeBSD's LinuxKPI
compatibility layer.</p>
<p class="Pp">When mounted, <code class="Nm">lindebugfs</code> will populate
with pseudo files from any running process that calls
<code class="Nm">debugfs_create_file()</code>. Since
<code class="Nm">lindebugfs</code> is a pseudo file system, file contents
will be generated dynamically based on program provided file operations. The
current <code class="Nm">lindebugfs</code> implementation formally supports
seq_file and simple_attr_file virtual file formats.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<p class="Pp">Load the <code class="Nm">lindebugfs</code> kernel module:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">kldload lindebugfs</code></div>
<p class="Pp">Mount the <code class="Nm">lindebugfs</code> file system on
<span class="Pa">/sys/kernel/debug</span>:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">mount -t lindebugfs lindebugfs
/sys/kernel/debug</code></div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">mount(1)</a>, <a class="Xr">linprocfs(4)</a>,
<a class="Xr">linsysfs(4)</a>, <a class="Xr">linux(4)</a>,
<a class="Xr">pseudofs(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">lindebugfs</code> file system first appeared
in <span class="Ux">FreeBSD 12.1</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The initial implementation for <code class="Nm">lindebugfs</code>
was created by Matthew Macy. This manual page was written by Jake
Freeland.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">August 10, 2022</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|