Crate febug

source · []
Expand description

Rust wrapper library for the user-space debugfs ABI.

Full documentation at, and of the rest of febug at index(0).

Set $FEBUG_DONT at build-time to turn everything into a no-op, set $FEBUG_SIGNUM at build-time to override the default signal (SIGUSR2), set $FEBUG_SOCKET at build-time to override the default location ([/var]/run/febug.sock).

Set $FEBUG_DONT at run-time to not connect (and, hence, make everything a no-op), set $FEBUG_SOCKET at run-time to set an alternate location.

See examples/ for a usage example.



Create this to register a variable to be debugged


Register formatters for your variable types here;

FD for the connection to febug(8), or -1 if none.


Helper trait for constructing Wrapper<T>s with type equal to TypeId::of::<Self>()

Helper trait for constructing Wrapper<T>s


Register this as a signal handler or call this from an event loop to format variables to be inspected

Hang up on febug(8)

Call debug_handler() with FEBUG_SIGNUM (SIGUSR2 by default)

Install debug_handler() as a handler for the specified signal

Call start_raw() with the default socket location for this platform, overridable with FEBUG_SOCKET

If $FEBUG_DONT isn’t set, dial febug(8) at the specified path, or $FEBUG_SOCKET