Message not appearing in mesg

Luis de Bethencourt luis at debethencourt.com
Tue Jul 7 11:43:42 EDT 2015


On 7 July 2015 at 16:11, Sébastien Hinderer <Sebastien.Hinderer at ens-lyon.org
> wrote:

> Hi Luis,
>
> Many thanks for your prompt and helpfulresponse!
>
> > Do you have the relevant DEBUG macros activated in your kernel's
> > configuration?
>
> Perhaps not...
>
> > https://www.kernel.org/doc/local/pr_debug.txt
>
> Read this, thanks. But that has nothing to do with KConfigmacros, has
> it?
>
> > http://elinux.org/Debugging_by_printing
> >
> > If not, activate them. Or if in a pinch, switch to using pr_alert() for
> > development.
>
> What surprises me is that I made sue the message appears inthe .ko file
> and it was there,whereas it seems pr_debug discards its argument at
> compile time. Or is it at execution time?
>
> Thanks!
>
> Sébastien
>

Compile time. pr_debug() is meant only for development and discarded for
"production" builds.

pr_debug(), which is ordinarily an empty macro that discards its arguments
at compile time.
To enable debugging output, build the appropriate file with -DDEBUG by
adding

CFLAGS_[filename].o := -DDEBUG

That is the key part there. But it is good to also check the options you
have in:
make menuconfig-> Kernel Hacking

Enjoy,
Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150707/310e3572/attachment.html 


More information about the Kernelnewbies mailing list