[][src]Crate febug

Rust wrapper library for the user-space debugfs ABI.

Full documentation at libfebug.rs(3), 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/string-sorts.rs for a usage example.

Modules

abi

febug-abi(5)

Structs

Wrapper

Create this to register a variable to be debugged

Statics

FORMATTERS

Register formatters for your variable types here;

GLOBAL_CONTROLLED_SOCKET

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

Traits

StaticWrappable

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

Wrappable

Helper trait for constructing Wrapper<T>s

Functions

debug_handler

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

end

Hang up on febug(8)

install_handler

call debug_handler() with FEBUG_SIGNUM (SIGUSR2 by default)

install_handler_signal

Install debug_handler() as a handler for the specified signal

start

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

start_raw

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