Re: compiling Kernel Modules with debugging information enabled

2005-07-16 Thread Brice Goglin
Le 16.07.2005 19:11, k8 s a écrit :
> To be more clear, say I have selected CONFIG_XFRM=y in .config file
> I want to make a change such that net/xfrm/Makefile has an entry 
> CFLAGS += -g so that it generates debugging information for all the
> modules in that directory

Look at Documentation/kbuild/makefiles.txt:

You can add some CFLAGS for a single object file with:
CFLAGS_foo.o += -g

For all objects defined in a Makefile:
EXTRA_CFLAGS = +g

Brice
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


compiling Kernel Modules with debugging information enabled

2005-07-16 Thread k8 s
Hello,
How can I compile a kernel module ,that is statically compiled at the
kernel compilation time, with debugging information.

To be more clear, say I have selected CONFIG_XFRM=y in .config file
I want to make a change such that net/xfrm/Makefile has an entry 
CFLAGS += -g so that it generates debugging information for all the
modules in that directory

I successfully did it for dynamically compiled modules that are insmod'ed.

How  can I do it for statically linked modules.

The idea is to do the following
objdump -DS xyz.o 
so that I know the source lines and their assembly translations.
This is useful in crashdump analysis where we get the information of 


S   Kartikeyan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


compiling Kernel Modules with debugging information enabled

2005-07-16 Thread k8 s
Hello,
How can I compile a kernel module ,that is statically compiled at the
kernel compilation time, with debugging information.

To be more clear, say I have selected CONFIG_XFRM=y in .config file
I want to make a change such that net/xfrm/Makefile has an entry 
CFLAGS += -g so that it generates debugging information for all the
modules in that directory

I successfully did it for dynamically compiled modules that are insmod'ed.

How  can I do it for statically linked modules.

The idea is to do the following
objdump -DS xyz.o 
so that I know the source lines and their assembly translations.
This is useful in crashdump analysis where we get the information of 
function name + offset

S   Kartikeyan
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: compiling Kernel Modules with debugging information enabled

2005-07-16 Thread Brice Goglin
Le 16.07.2005 19:11, k8 s a écrit :
 To be more clear, say I have selected CONFIG_XFRM=y in .config file
 I want to make a change such that net/xfrm/Makefile has an entry 
 CFLAGS += -g so that it generates debugging information for all the
 modules in that directory

Look at Documentation/kbuild/makefiles.txt:

You can add some CFLAGS for a single object file with:
CFLAGS_foo.o += -g

For all objects defined in a Makefile:
EXTRA_CFLAGS = +g

Brice
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/