Changeset View
Changeset View
Standalone View
Standalone View
share/man/man5/lindebugfs.5
- This file was added.
.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD | |||||
.\" | |||||
.\" Copyright (c) 2022, Jake Freeland <jfree@freebsd.org> | |||||
markj: We don't include "$FreeBSD$" in new files. Typically you'd add a copyright statement instead of… | |||||
.\" | |||||
.\" Redistribution and use in source and binary forms, with or without | |||||
.\" modification, are permitted provided that the following conditions | |||||
.\" are met: | |||||
.\" 1. Redistributions of source code must retain the above copyright | |||||
.\" notice, this list of conditions and the following disclaimer. | |||||
.\" 2. Redistributions in binary form must reproduce the above copyright | |||||
.\" notice, this list of conditions and the following disclaimer in the | |||||
.\" documentation and/or other materials provided with the distribution. | |||||
.\" | |||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |||||
Done Inline ActionsIsn't lindebugfs solely for supporting drivers using the LinuxKPI? If so I'd suggest stating that directly. In other words, this is not a general-purpose filesystem but rather 1) exists mostly for the benefit of developers, and 2) only for LinuxKPI-based drivers. markj: Isn't lindebugfs solely for supporting drivers using the LinuxKPI? If so I'd suggest stating… | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |||||
.\" SUCH DAMAGE. | |||||
.Dd August 10, 2022 | |||||
.Dt LINDEBUGFS 5 | |||||
.Os | |||||
.Sh NAME | |||||
.Nm lindebugfs | |||||
.Nd Linux file system for debugging | |||||
.Sh SYNOPSIS | |||||
.Bd -literal | |||||
lindebugfs /sys/kernel/debug debugfs rw 0 0 | |||||
.Ed | |||||
.Sh DESCRIPTION | |||||
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 | |||||
.Nm | |||||
uses the | |||||
.Xr pseudofs 9 | |||||
file system construction kit to model itself after Linux's debugfs. | |||||
The | |||||
.Nm | |||||
API is intended for use with programs that take advantage of FreeBSD's | |||||
LinuxKPI compatibility layer. | |||||
.Pp | |||||
When mounted, | |||||
Done Inline ActionsOh, this filesystem should really be called "lindebugfs". markj: Oh, this filesystem should really be called "lindebugfs". | |||||
.Nm | |||||
will populate with pseudo files from any running process that calls | |||||
.Nm debugfs_create_file() . | |||||
Since | |||||
.Nm | |||||
is a pseudo file system, file contents will be generated dynamically | |||||
based on program provided file operations. | |||||
The current | |||||
.Nm | |||||
implementation formally supports seq_file and simple_attr_file virtual | |||||
file formats. | |||||
.Sh EXAMPLES | |||||
Load the | |||||
.Nm | |||||
kernel module: | |||||
.Pp | |||||
.Dl "kldload lindebugfs" | |||||
Done Inline ActionsYou need to update share/man/man5/Makefile to ensure that this makefile gets installed. markj: You need to update share/man/man5/Makefile to ensure that this makefile gets installed. | |||||
.Pp | |||||
Mount the | |||||
.Nm | |||||
file system on | |||||
.Pa /sys/kernel/debug : | |||||
.Pp | |||||
.Dl "mount -t lindebugfs lindebugfs /sys/kernel/debug" | |||||
.Sh SEE ALSO | |||||
.Xr linprocfs 5 , | |||||
.Xr linsysfs 5 , | |||||
.Xr pseudofs 9 , | |||||
.Xr linux 4 , | |||||
.Xr mount 1 | |||||
.Sh HISTORY | |||||
The | |||||
.Nm | |||||
file system first appeared in | |||||
.Fx 12.1 . | |||||
.Sh AUTHORS | |||||
.An -nosplit | |||||
The initial implementation for | |||||
.Nm | |||||
was created by Matthew Macy. | |||||
This manual page was written by Jake Freeland. |
We don't include "$FreeBSD$" in new files. Typically you'd add a copyright statement instead of a simple "written by."