* [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
@ 2005-07-28 0:41 Grant Coady
2005-07-28 4:43 ` Nishanth Aravamudan
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Grant Coady @ 2005-07-28 0:41 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]
Hi there,
2.6.13-rc3-mm2 (cc: Russell King as lots of arms in there)
linux-2.6.13-rc3-mm2b$ grep -r CONFIG_DEBUG_INFO *|cut -d: -f2-|sort|uniq -c|sort -nr
57 # CONFIG_DEBUG_INFO is not set
22 CONFIG_DEBUG_INFO=y
4 #ifdef CONFIG_DEBUG_INFO
2 ifdef CONFIG_DEBUG_INFO
2 #ifndef CONFIG_DEBUG_INFO
1 ifneq ($(CONFIG_DEBUG_INFO),y) <<== ??
1 ifeq ($(CONFIG_DEBUG_INFO),y) <<== ??
linux-2.6.13-rc3-mm2b$ grep -r '($(CONFIG_DEBUG_INFO),y)' *
arch/arm26/Makefile:ifeq ($(CONFIG_DEBUG_INFO),y)
arch/x86_64/Makefile:ifneq ($(CONFIG_DEBUG_INFO),y)
Two Makefiles check for a value. The rest only check if [not] defined.
ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
AFLAGS += -g
endif
This a problem? I read somewhere setting to 'n' stops debug, that can't
be right?
Places setting it to 'y' are off the main path (for me):
linux-2.6.13-rc3-mm2b$ grep -r CONFIG_DEBUG_INFO=y *
arch/um/defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/pxa255-idp_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/h7202_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/mainstone_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/bast_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/lubbock_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/mx1ads_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/lpd7a404_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/s3c2410_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/badge4_defconfig:CONFIG_DEBUG_INFO=y
arch/arm/configs/lpd7a400_defconfig:CONFIG_DEBUG_INFO=y
arch/ppc/configs/ocotea_defconfig:CONFIG_DEBUG_INFO=y
arch/ppc/configs/lite5200_defconfig:CONFIG_DEBUG_INFO=y
arch/ppc/configs/luan_defconfig:CONFIG_DEBUG_INFO=y
arch/m32r/opsput/defconfig.opsput:CONFIG_DEBUG_INFO=y
arch/ia64/configs/sn2_defconfig:CONFIG_DEBUG_INFO=y
arch/ia64/configs/sim_defconfig:CONFIG_DEBUG_INFO=y
arch/v850/configs/rte-ma1-cb_defconfig:CONFIG_DEBUG_INFO=y
arch/v850/configs/sim_defconfig:CONFIG_DEBUG_INFO=y
arch/v850/configs/rte-me2-cb_defconfig:CONFIG_DEBUG_INFO=y
arch/alpha/defconfig:CONFIG_DEBUG_INFO=y
arch/arm26/defconfig:CONFIG_DEBUG_INFO=y
Thanks,
Grant.
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
@ 2005-07-28 4:43 ` Nishanth Aravamudan
2005-07-28 19:40 ` Grant Coady
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Nishanth Aravamudan @ 2005-07-28 4:43 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 2954 bytes --]
On 28.07.2005 [10:41:32 +1000], Grant Coady wrote:
> Hi there,
>
> 2.6.13-rc3-mm2 (cc: Russell King as lots of arms in there)
>
> linux-2.6.13-rc3-mm2b$ grep -r CONFIG_DEBUG_INFO *|cut -d: -f2-|sort|uniq -c|sort -nr
> 57 # CONFIG_DEBUG_INFO is not set
> 22 CONFIG_DEBUG_INFO=y
> 4 #ifdef CONFIG_DEBUG_INFO
> 2 ifdef CONFIG_DEBUG_INFO
> 2 #ifndef CONFIG_DEBUG_INFO
> 1 ifneq ($(CONFIG_DEBUG_INFO),y) <<== ??
> 1 ifeq ($(CONFIG_DEBUG_INFO),y) <<== ??
>
>
> linux-2.6.13-rc3-mm2b$ grep -r '($(CONFIG_DEBUG_INFO),y)' *
>
> arch/arm26/Makefile:ifeq ($(CONFIG_DEBUG_INFO),y)
> arch/x86_64/Makefile:ifneq ($(CONFIG_DEBUG_INFO),y)
I think the first can be
ifdef CONFIG_DEBUG_INFO
and the second
ifndef CONFIG_DEBUG_INFO
> Two Makefiles check for a value. The rest only check if [not] defined.
>
> ifdef CONFIG_DEBUG_INFO
> CFLAGS += -g
> AFLAGS += -g
> endif
>
> This a problem? I read somewhere setting to 'n' stops debug, that can't
> be right?
Read menuconfig:
CONFIG_DEBUG_INFO:
If you say Y here the resulting kernel image will include
debugging info resulting in a larger kernel image. Say Y here
only if you plan to debug the kernel.
If unsure, say N.
This basically is used for debugging purposes, changing the compiler
flags when you build your kernel (per arch's Makefile). Not sure what
you mean by "stops debug." That's a very vague statement wrt. the
kernel.
> Places setting it to 'y' are off the main path (for me):
>
> linux-2.6.13-rc3-mm2b$ grep -r CONFIG_DEBUG_INFO=y *
> arch/um/defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/pxa255-idp_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/h7202_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/mainstone_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/bast_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/lubbock_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/mx1ads_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/lpd7a404_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/s3c2410_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/badge4_defconfig:CONFIG_DEBUG_INFO=y
> arch/arm/configs/lpd7a400_defconfig:CONFIG_DEBUG_INFO=y
> arch/ppc/configs/ocotea_defconfig:CONFIG_DEBUG_INFO=y
> arch/ppc/configs/lite5200_defconfig:CONFIG_DEBUG_INFO=y
> arch/ppc/configs/luan_defconfig:CONFIG_DEBUG_INFO=y
> arch/m32r/opsput/defconfig.opsput:CONFIG_DEBUG_INFO=y
> arch/ia64/configs/sn2_defconfig:CONFIG_DEBUG_INFO=y
> arch/ia64/configs/sim_defconfig:CONFIG_DEBUG_INFO=y
> arch/v850/configs/rte-ma1-cb_defconfig:CONFIG_DEBUG_INFO=y
> arch/v850/configs/sim_defconfig:CONFIG_DEBUG_INFO=y
> arch/v850/configs/rte-me2-cb_defconfig:CONFIG_DEBUG_INFO=y
> arch/alpha/defconfig:CONFIG_DEBUG_INFO=y
> arch/arm26/defconfig:CONFIG_DEBUG_INFO=y
Were you asking a question with all of this? All of these are
defconfigs, which are basically machine specific config files (helps
with first build).
Thanks,
Nish
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
2005-07-28 4:43 ` Nishanth Aravamudan
@ 2005-07-28 19:40 ` Grant Coady
2005-07-28 20:21 ` Domen Puncer
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Grant Coady @ 2005-07-28 19:40 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
On Wed, 27 Jul 2005 21:43:52 -0700, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
>
>Were you asking a question with all of this? All of these are
>defconfigs, which are basically machine specific config files (helps
>with first build).
Sure, but why does this statement:
"
- Fix gcc 4 warnings.
[D: http://marc.theaimsgroup.com/?t=110348353800003]
Note: Set CONFIG_DEBUG_INFO=n to make compiles faster and smaller.
"
appear in http://janitor.kernelnewbies.org/TODO ??
Most users test if the flag is set, some users test == 'y', nothing
checks for == 'n'. So if I "Set CONFIG_DEBUG_INFO=n" I get unwanted
debugging info, opposite result to what was intended?
Grant.
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
2005-07-28 4:43 ` Nishanth Aravamudan
2005-07-28 19:40 ` Grant Coady
@ 2005-07-28 20:21 ` Domen Puncer
2005-07-28 20:38 ` Nishanth Aravamudan
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Domen Puncer @ 2005-07-28 20:21 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
On 29/07/05 05:40 +1000, Grant Coady wrote:
> On Wed, 27 Jul 2005 21:43:52 -0700, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> >
> >Were you asking a question with all of this? All of these are
> >defconfigs, which are basically machine specific config files (helps
> >with first build).
> Sure, but why does this statement:
> "
> - Fix gcc 4 warnings.
> [D: http://marc.theaimsgroup.com/?t=110348353800003]
> Note: Set CONFIG_DEBUG_INFO=n to make compiles faster and smaller.
> "
> appear in http://janitor.kernelnewbies.org/TODO ??
>
> Most users test if the flag is set, some users test == 'y', nothing
> checks for == 'n'. So if I "Set CONFIG_DEBUG_INFO=n" I get unwanted
> debugging info, opposite result to what was intended?
CONFIG_DEBUG_INFO == y compiles debugging info in kernel, and is
useful for kernel debuggers (and probably more).
For compile tests this option doesn't really mater, as it is not
compile time debugging. But disabling it makes compiles faster,
which is good.
Domen
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
` (2 preceding siblings ...)
2005-07-28 20:21 ` Domen Puncer
@ 2005-07-28 20:38 ` Nishanth Aravamudan
2005-07-28 21:14 ` Grant Coady
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Nishanth Aravamudan @ 2005-07-28 20:38 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]
On 29.07.2005 [05:40:01 +1000], Grant Coady wrote:
> On Wed, 27 Jul 2005 21:43:52 -0700, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> >
> >Were you asking a question with all of this? All of these are
> >defconfigs, which are basically machine specific config files (helps
> >with first build).
> Sure, but why does this statement:
> "
> - Fix gcc 4 warnings.
> [D: http://marc.theaimsgroup.com/?t=110348353800003]
> Note: Set CONFIG_DEBUG_INFO=n to make compiles faster and smaller.
> "
> appear in http://janitor.kernelnewbies.org/TODO ??
>
> Most users test if the flag is set, some users test == 'y', nothing
> checks for == 'n'. So if I "Set CONFIG_DEBUG_INFO=n" I get unwanted
> debugging info, opposite result to what was intended?
I believe that setting CONFIG_VAR to 'n' in a .config file (which
is all a defconfig is) is equivalent to saying # CONFIG_VAR is not set.
But I haven't tried it. See what happens when you do for your system. If
they are equivalent, then you don't need to check for y/n, you check
ifdef/ifndef. If not...well, we'll cross that bridge when we get there
:)
Thanks,
Nish
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
` (3 preceding siblings ...)
2005-07-28 20:38 ` Nishanth Aravamudan
@ 2005-07-28 21:14 ` Grant Coady
2005-07-28 21:17 ` Grant Coady
2005-07-28 21:41 ` Domen Puncer
6 siblings, 0 replies; 8+ messages in thread
From: Grant Coady @ 2005-07-28 21:14 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]
On Thu, 28 Jul 2005 22:21:49 +0200, Domen Puncer <domen@coderock.org> wrote:
>>
>> Most users test if the flag is set, some users test == 'y', nothing
>> checks for == 'n'. So if I "Set CONFIG_DEBUG_INFO=n" I get unwanted
>> debugging info, opposite result to what was intended?
>
>CONFIG_DEBUG_INFO == y compiles debugging info in kernel, and is
>useful for kernel debuggers (and probably more).
>For compile tests this option doesn't really mater, as it is not
>compile time debugging. But disabling it makes compiles faster,
>which is good.
top-level 2.6.12.3 Makefile:
...
ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
endif
...
So please tell me how "CONFIG_DEBUG_INFO=n" disables debug?
Observations from test runs with 'make randconfig':
$ ls trial-2.6.1*/*-config |wc -l
1031
$ grep -r CONFIG_DEBUG_INFO trial-2.6.1*/*-config|wc -l
354
$ grep -r CONFIG_DEBUG_INFO trial-2.6.1*/*-config|cut -d: -f2|sort|uniq -c
172 # CONFIG_DEBUG_INFO is not set
182 CONFIG_DEBUG_INFO=y
Two thirds .config produced do not offer the flag. This seems
inconsistent usage. Since I'm looking for build errors, I very
much like to turn off the flag, but as it is only set in < 20% of
random cases, this issue matters far less than I first thought.
Grant.
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
` (4 preceding siblings ...)
2005-07-28 21:14 ` Grant Coady
@ 2005-07-28 21:17 ` Grant Coady
2005-07-28 21:41 ` Domen Puncer
6 siblings, 0 replies; 8+ messages in thread
From: Grant Coady @ 2005-07-28 21:17 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
On Thu, 28 Jul 2005 13:38:43 -0700, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
>
>I believe that setting CONFIG_VAR to 'n' in a .config file (which
>is all a defconfig is) is equivalent to saying # CONFIG_VAR is not set.
>But I haven't tried it. See what happens when you do for your system. If
That _is_ my point, Makefile turns on debug symbols if the flag is
set, not on what value the flag is set to.
Grant.
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage?
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
` (5 preceding siblings ...)
2005-07-28 21:17 ` Grant Coady
@ 2005-07-28 21:41 ` Domen Puncer
6 siblings, 0 replies; 8+ messages in thread
From: Domen Puncer @ 2005-07-28 21:41 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1186 bytes --]
On 29/07/05 07:14 +1000, Grant Coady wrote:
> On Thu, 28 Jul 2005 22:21:49 +0200, Domen Puncer <domen@coderock.org> wrote:
> >>
> >> Most users test if the flag is set, some users test == 'y', nothing
> >> checks for == 'n'. So if I "Set CONFIG_DEBUG_INFO=n" I get unwanted
> >> debugging info, opposite result to what was intended?
> >
> >CONFIG_DEBUG_INFO == y compiles debugging info in kernel, and is
> >useful for kernel debuggers (and probably more).
> >For compile tests this option doesn't really mater, as it is not
> >compile time debugging. But disabling it makes compiles faster,
> >which is good.
>
> top-level 2.6.12.3 Makefile:
> ...
> ifdef CONFIG_DEBUG_INFO
> CFLAGS += -g
> endif
> ...
>
> So please tell me how "CONFIG_DEBUG_INFO=n" disables debug?
Ugh, I see the point, I should have read more carefully.
But Nishanth is right, kconfig magic makes this work :-)
domen@homer:~/kernel/a$ grep CONFIG_DEBUG_INFO build/.config
CONFIG_DEBUG_INFO=n
domen@homer:~/kernel/a$ make O=`pwd`/build/ oldconfig >/dev/null
domen@homer:~/kernel/a$ grep CONFIG_DEBUG_INFO build/.config
# CONFIG_DEBUG_INFO is not set
And yes, "just make" will take care of it too.
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-07-28 21:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 0:41 [KJ] 2.6 kbuild inconsistent CONFIG_DEBUG_INFO usage? Grant Coady
2005-07-28 4:43 ` Nishanth Aravamudan
2005-07-28 19:40 ` Grant Coady
2005-07-28 20:21 ` Domen Puncer
2005-07-28 20:38 ` Nishanth Aravamudan
2005-07-28 21:14 ` Grant Coady
2005-07-28 21:17 ` Grant Coady
2005-07-28 21:41 ` Domen Puncer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.