* Message not appearing in mesg
@ 2015-07-07 14:53 Sébastien Hinderer
2015-07-07 15:02 ` Luis de Bethencourt
0 siblings, 1 reply; 5+ messages in thread
From: Sébastien Hinderer @ 2015-07-07 14:53 UTC (permalink / raw)
To: kernelnewbies
Dear all,
I have a module that uses pr_debug at init.
Although the module is successfully loaded, the message appears
neither in dmesg, nor at the console. I tried toprint a 8 to
/proc/sys/kernel/printk but that does not change anything.
Any hint would be warmly appreciated.
Thanks!
S?bastien.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Message not appearing in mesg
2015-07-07 14:53 Message not appearing in mesg Sébastien Hinderer
@ 2015-07-07 15:02 ` Luis de Bethencourt
2015-07-07 15:11 ` Sébastien Hinderer
0 siblings, 1 reply; 5+ messages in thread
From: Luis de Bethencourt @ 2015-07-07 15:02 UTC (permalink / raw)
To: kernelnewbies
On 7 July 2015 at 15:53, S?bastien Hinderer <Sebastien.Hinderer@ens-lyon.org
> wrote:
> Dear all,
>
> I have a module that uses pr_debug at init.
> Although the module is successfully loaded, the message appears
> neither in dmesg, nor at the console. I tried toprint a 8 to
> /proc/sys/kernel/printk but that does not change anything.
>
> Any hint would be warmly appreciated.
>
> Thanks!
>
> S?bastien
Do you have the relevant DEBUG macros activated in your kernel's
configuration?
https://www.kernel.org/doc/local/pr_debug.txt
http://elinux.org/Debugging_by_printing
If not, activate them. Or if in a pinch, switch to using pr_alert() for
development.
Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150707/ca26df84/attachment.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Message not appearing in mesg
2015-07-07 15:02 ` Luis de Bethencourt
@ 2015-07-07 15:11 ` Sébastien Hinderer
2015-07-07 15:43 ` Luis de Bethencourt
0 siblings, 1 reply; 5+ messages in thread
From: Sébastien Hinderer @ 2015-07-07 15:11 UTC (permalink / raw)
To: kernelnewbies
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Message not appearing in mesg
2015-07-07 15:11 ` Sébastien Hinderer
@ 2015-07-07 15:43 ` Luis de Bethencourt
2015-07-07 16:34 ` Shérab
0 siblings, 1 reply; 5+ messages in thread
From: Luis de Bethencourt @ 2015-07-07 15:43 UTC (permalink / raw)
To: kernelnewbies
On 7 July 2015 at 16:11, S?bastien Hinderer <Sebastien.Hinderer@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Message not appearing in mesg
2015-07-07 15:43 ` Luis de Bethencourt
@ 2015-07-07 16:34 ` Shérab
0 siblings, 0 replies; 5+ messages in thread
From: Shérab @ 2015-07-07 16:34 UTC (permalink / raw)
To: kernelnewbies
Thanks a lot Luis!
Everything is clear now.
Sh?rab.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-07 16:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07 14:53 Message not appearing in mesg Sébastien Hinderer
2015-07-07 15:02 ` Luis de Bethencourt
2015-07-07 15:11 ` Sébastien Hinderer
2015-07-07 15:43 ` Luis de Bethencourt
2015-07-07 16:34 ` Shérab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).