Howto build kernel in debug mode - Embedded
This is a discussion on Howto build kernel in debug mode - Embedded ; What I have to do to build a linux kernel 2.6.18 in debug mode ?
thanks
--
B.O.D.H.I....
-
Howto build kernel in debug mode
What I have to do to build a linux kernel 2.6.18 in debug mode ?
thanks
--
B.O.D.H.I.
-
Re: Howto build kernel in debug mode
Hello ,
> Bodhi wrote:
> What I have to do to build a linux kernel 2.6.18 in debug mode ?
What do you mean by debug mode? Do you want to use the debug option
in gcc to build the kernel (or) want to to debug the kernel using a
debugger?
Best Regards,
Vivekanandan M
-
Re: Howto build kernel in debug mode
>> What I have to do to build a linux kernel 2.6.18 in debug mode ?
>
> What do you mean by debug mode? Do you want to use the debug option
> in gcc to build the kernel (or) want to to debug the kernel using a
> debugger?
I need to buld the kernel with debug option and after that debug it with
a debugger. But as first I do need to build it properly.
TIA
-
Re: Howto build kernel in debug mode
Bodhi writes:
>>> What I have to do to build a linux kernel 2.6.18 in debug mode ?
>> What do you mean by debug mode? Do you want to use the debug
>> option
>> in gcc to build the kernel (or) want to to debug the kernel using a
>> debugger?
>
> I need to buld the kernel with debug option and after that debug it
> with a debugger.
If you have a kernel w/ kgdb support, than this would be one with a
'unoffical' patch applied. Is this certain? If not, trying to get
along with 'printk' and/or CONFIG_DEBUG_LL is probably easier.
-
Re: Howto build kernel in debug mode
>>>> What I have to do to build a linux kernel 2.6.18 in debug mode ?
>>> What do you mean by debug mode? Do you want to use the debug
>>> option
>>> in gcc to build the kernel (or) want to to debug the kernel using a
>>> debugger?
>> I need to buld the kernel with debug option and after that debug it
>> with a debugger.
>
> If you have a kernel w/ kgdb support, than this would be one with a
> 'unoffical' patch applied. Is this certain? If not, trying to get
> along with 'printk' and/or CONFIG_DEBUG_LL is probably easier.
Okay,
but HOW do I enable building the kernel with debug option ?
something like -O0 ? Where ? In makefiles or in menuconfig options ?
TIA
-
Re: Howto build kernel in debug mode
>> If you have a kernel w/ kgdb support, than this would be one with a
>> 'unoffical' patch applied. Is this certain? If not, trying to get
>> along with 'printk' and/or CONFIG_DEBUG_LL is probably easier.
>
> Okay,
> but HOW do I enable building the kernel with debug option ?
> something like -O0 ? Where ? In makefiles or in menuconfig options ?
> TIA
I've found the answer in .config
CONFIG_DEBUG_INFO=y
bye
-
Re: Howto build kernel in debug mode
Hello ,
-O0 is for optimization. Use -g for generating debug information.
Best Regards,
Vivekanandan M
> Bodhi wrote:
> >>>> What I have to do to build a linux kernel 2.6.18 in debug mode ?
> >>> What do you mean by debug mode? Do you want to use the debug
> >>> option
> >>> in gcc to build the kernel (or) want to to debug the kernel using a
> >>> debugger?
> >> I need to buld the kernel with debug option and after that debug it
> >> with a debugger.
> >
> > If you have a kernel w/ kgdb support, than this would be one with a
> > 'unoffical' patch applied. Is this certain? If not, trying to get
> > along with 'printk' and/or CONFIG_DEBUG_LL is probably easier.
>
> Okay,
> but HOW do I enable building the kernel with debug option ?
> something like -O0 ? Where ? In makefiles or in menuconfig options ?
> TIA