I want to debug a user module using kgdb . The code :
#include<linux/init.h>
#include<linux/module.h>
#include<linux/kernel.h>
int r_day,rday1=10;
static int hello_init(void)
{
printk(KERN_ALERT "Hello World");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye World");
}
module_init(hello_init);
module_exit(hello_exit);
The makefile:
_CFLAGS=-g
obj-m := hello-kernel.o
hello-kernel-objs := hello.o
I have my kernel compiled with proper debugging symbols (CONFIG_DEBUG_INFO=y). But still when I check my sections in my module all the segments have address as 0x0000000000000000. Please help.