Re: about pr_debug

2014-06-25 Thread lx
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:

Re: about pr_debug

2014-06-25 Thread 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:=/lib/modules/`uname -r`/build PWD:=$(shell pwd) default: echo $KDIR $(MAKE) -C $(KDIR) M=$(PWD) modul

Re: about pr_debug

2014-06-25 Thread lx
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

Re: about pr_debug

2014-06-25 Thread Bjørn Mork
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

Re: about pr_debug

2014-06-25 Thread Pranay Srivastava
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

Re: about pr_debug

2014-06-24 Thread anish singh
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

Re: about pr_debug

2014-06-24 Thread Varka Bhadram
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

Re: about pr_debug

2014-06-24 Thread Real Name
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

about pr_debug

2014-06-24 Thread lx
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