How to enable dynamic debugging (pr_debug
) at boot for multiple files by supplying a command line argument to the linux kernel?
I tried to provide the following as an argument -
dyndbg='file drivers/<filename1> +p file drivers/<filename2> +p file drivers/<filename3> +p'
However the dynamic debugging was not enabled.
Is my syntax correct?
Separate control commands with semicolons.
First, check if you have enabled
CONFIG_DYNAMIC_DEBUG=y
this in the.config
fileTest if this works properly when the kernel is booted.
Make sure the QUERY is in correct format (where the path to the module/folder is correct) when specified with
dyndbg=QUERY
For built-in module use
dyndbg='module module_name +p'
For loadable module use
module_name.dyndbg=<query>
ex:xhci_hcd.dyndbg=+p
You can add it to your Linux default command line by writing the
/etc/default/grub
file as follows:Refer link: