Thank you. I fix it
EXTRA_CFLAGS += -DDEBUG
2014-06-25 17:50 GMT+08:00 Varka Bhadram :
> On 06/25/2014 03:17 PM, lx wrote:
>
> thank you.
> But the Makefile is so simple and Not use "cc".
> #
> obj-m := task_01.o
>
>CFLAGS_task_01.o := -DDEBUG
>
> KDIR:
On 06/25/2014 03:17 PM, lx wrote:
thank you.
But the Makefile is so simple and Not use "cc".
#
obj-m := task_01.o
CFLAGS_task_01.o := -DDEBUG
KDIR:=/lib/modules/`uname -r`/build
PWD:=$(shell pwd)
default:
echo $KDIR
$(MAKE) -C $(KDIR) M=$(PWD) modul
thank you.
But the Makefile is so simple and Not use "cc".
#
obj-m := task_01.o
KDIR:=/lib/modules/`uname -r`/build
PWD:=$(shell pwd)
default:
echo $KDIR
$(MAKE) -C $(KDIR) M=$(PWD) modules
#
So, how to add "CFLAGS"?
201
Varka Bhadram writes:
> refer this :https://www.kernel.org/doc/local/pr_debug.txt
That seems a little outdated since it doesn't mention the extremely
useful dynamic debug feature. So please read
https://www.kernel.org/doc/Documentation/dynamic-debug-howto.txt
as well.
The ability to dynamicall
On Wed, Jun 25, 2014 at 11:39 AM, lx wrote:
> hi all:
>I'm confused with pr_debug. My codes is:
> ###
> #include
> #include
>
> static int __init init_page_dir(void)
> {
> pr_debug("Hello world\n");
> return 0;
> }
Add ccflags-y += -DDEBUG
On Tue, Jun 24, 2014 at 11:09 PM, lx wrote:
> hi all:
>I'm confused with pr_debug. My codes is:
> ###
> #include
> #include
>
> static int __init init_page_dir(void)
> {
> pr_debug("Hello world\n");
>
use printk or do echo "file_name +p" >
/sy
refer this :https://www.kernel.org/doc/local/pr_debug.txt
On 06/25/2014 11:39 AM, lx wrote:
hi all:
I'm confused with pr_debug. My codes is:
###
#include
#include
static int __init init_page_dir(void)
{
pr_debug("Hello world\n");
return 0
On Wed, Jun 25, 2014 at 02:09:40PM +0800, lx wrote:
> hi all:
>I'm confused with pr_debug. My codes is:
> ###
> #include
> #include
>
> static int __init init_page_dir(void)
> {
> pr_debug("Hello world\n");
> return 0;
> }
>
> static void
hi all:
I'm confused with pr_debug. My codes is:
###
#include
#include
static int __init init_page_dir(void)
{
pr_debug("Hello world\n");
return 0;
}
static void __exit exit_page_dir(void)
{
pr_debug("\nGoodbye now...\n\n");
}
MODULE_L