pr_debug(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ pr_debug(9) β€” a Kernel API Manual moment πŸ’œ

okay so bestie, welcome to the Kernel API Manual ✨ this one's short and sweet and honestly kind of an underrated icon in the printk friend group 🫢


πŸŽ€ NAME πŸŽ€

pr_debug β€” prints a debug-level message, but conditionally πŸ‘€ like it's very "i'll show up if the vibes are right" energy


✨ SYNOPSIS ✨

pr_debug (fmt , ... );

🌸 ARGUMENTS 🌸

  • fmt β€” the format string, aka the blueprint of your message πŸ’…
  • ... β€” the arguments for that format string, the lil fill-in-the-blanks 🧚

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• this macro is a little shapeshifter and its whole personality depends on your config, no cap:

  • if CONFIG_DYNAMIC_DEBUG is set, it expands to dynamic_pr_debug πŸ”₯
  • otherwise, if DEBUG is defined, it's literally equivalent to a printk with KERN_DEBUG loglevel, iconic behavior πŸ’€
  • and if DEBUG is not defined? it does nothing. absolutely nothing. ghost mode πŸ‘» honestly respect

it uses pr_fmt to generate the format string β€” and yeah, dynamic_pr_debug uses pr_fmt internally too, so the whole fam is on the same page there 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/printk.h β€” the mothership πŸš€ and the whole squad:


πŸ’– and that's the whole page bestie, short king energy fr fr πŸ“

okay so this came at you straight from ./include/linux, dated October 2026, and it's pr_debug(9) signing off β€” mwah πŸ’‹ go log something cute πŸ¦‹βœ¨

πŸ“¦ where this page comes from