* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO [not found] ` <20070711224327.9B0ED4D0555@magilla.localdomain> @ 2007-07-11 23:03 ` Andrew Morton 2007-07-11 23:07 ` Roland McGrath ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Andrew Morton @ 2007-07-11 23:03 UTC (permalink / raw) To: Roland McGrath; +Cc: Jason Wessel, Linus Torvalds, linux-kernel, linux-arch On Wed, 11 Jul 2007 15:43:27 -0700 (PDT) Roland McGrath <roland@redhat.com> wrote: > > The -gdwarf2 had a specific reason. > > I have no objection to it. > OK, thanks. So I ended up with the below as a probably-2.6.23 thing: From: Roland McGrath <roland@redhat.com> The assembler for a while now supports -gdwarf to generate source line info just like the C compiler does. Source-level assembly debugging sounds like an oxymoron, but it is handy to be able to see the right source file and read its comments rather than just the disassembly. This patch enables -gdwarf for assembly files when CONFIG_DEBUG_INFO=y and the assembler supports the option. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> --- Makefile | 1 + 1 files changed, 1 insertion(+) diff -puN Makefile~pass-g-to-assembler-under-config_debug_info Makefile --- a/Makefile~pass-g-to-assembler-under-config_debug_info +++ a/Makefile @@ -498,6 +498,7 @@ endif ifdef CONFIG_DEBUG_INFO CFLAGS += -g +AFLAGS += $(call as-option, -gdwarf) endif # Force gcc to behave correct even for buggy distributions _ If there are problems it'll most likely be with oddball architectures running older compilers, I guess. If something blows up we might need to make this an arch/foo/Makefile thing. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:03 ` [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO Andrew Morton @ 2007-07-11 23:07 ` Roland McGrath 2007-07-11 23:15 ` Andreas Schwab 2007-07-11 23:40 ` Linus Torvalds 2 siblings, 0 replies; 9+ messages in thread From: Roland McGrath @ 2007-07-11 23:07 UTC (permalink / raw) To: Andrew Morton; +Cc: Jason Wessel, Linus Torvalds, linux-kernel, linux-arch > OK, thanks. So I ended up with the below as a probably-2.6.23 thing: Works for me. Thanks, Roland ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:03 ` [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO Andrew Morton 2007-07-11 23:07 ` Roland McGrath @ 2007-07-11 23:15 ` Andreas Schwab 2007-07-11 23:19 ` Roland McGrath 2007-07-11 23:40 ` Linus Torvalds 2 siblings, 1 reply; 9+ messages in thread From: Andreas Schwab @ 2007-07-11 23:15 UTC (permalink / raw) To: Andrew Morton Cc: Roland McGrath, Jason Wessel, Linus Torvalds, linux-kernel, linux-arch Andrew Morton <akpm@linux-foundation.org> writes: > diff -puN Makefile~pass-g-to-assembler-under-config_debug_info Makefile > --- a/Makefile~pass-g-to-assembler-under-config_debug_info > +++ a/Makefile > @@ -498,6 +498,7 @@ endif > > ifdef CONFIG_DEBUG_INFO > CFLAGS += -g > +AFLAGS += $(call as-option, -gdwarf) The option is officially called -gdwarf-2, and -gdwarf2 is an alias for backward compatibility. But -gdwarf is ambigous and will error out. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:15 ` Andreas Schwab @ 2007-07-11 23:19 ` Roland McGrath 2007-07-11 23:27 ` Andreas Schwab 0 siblings, 1 reply; 9+ messages in thread From: Roland McGrath @ 2007-07-11 23:19 UTC (permalink / raw) To: Andreas Schwab Cc: Andrew Morton, Jason Wessel, Linus Torvalds, linux-kernel, linux-arch > > +AFLAGS += $(call as-option, -gdwarf) > > The option is officially called -gdwarf-2, and -gdwarf2 is an alias for > backward compatibility. But -gdwarf is ambigous and will error out. AFLAGS is actually passed to $(CC), not $(AS), and -gdwarf works there (it's an unambiguous prefix of -gdwarf-2). Thanks, Roland ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:19 ` Roland McGrath @ 2007-07-11 23:27 ` Andreas Schwab 0 siblings, 0 replies; 9+ messages in thread From: Andreas Schwab @ 2007-07-11 23:27 UTC (permalink / raw) To: Roland McGrath Cc: Andrew Morton, Jason Wessel, Linus Torvalds, linux-kernel, linux-arch Roland McGrath <roland@redhat.com> writes: >> > +AFLAGS += $(call as-option, -gdwarf) >> >> The option is officially called -gdwarf-2, and -gdwarf2 is an alias for >> backward compatibility. But -gdwarf is ambigous and will error out. > > AFLAGS is actually passed to $(CC), not $(AS), and -gdwarf works there > (it's an unambiguous prefix of -gdwarf-2). Oh yes, you're right, sorry for the noise. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:03 ` [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO Andrew Morton 2007-07-11 23:07 ` Roland McGrath 2007-07-11 23:15 ` Andreas Schwab @ 2007-07-11 23:40 ` Linus Torvalds 2007-07-11 23:53 ` Andrew Morton 2 siblings, 1 reply; 9+ messages in thread From: Linus Torvalds @ 2007-07-11 23:40 UTC (permalink / raw) To: Andrew Morton; +Cc: Roland McGrath, Jason Wessel, linux-kernel, linux-arch On Wed, 11 Jul 2007, Andrew Morton wrote: > > OK, thanks. So I ended up with the below as a probably-2.6.23 thing: > ... > +AFLAGS += $(call as-option, -gdwarf) "-gdwarf2?" Linus ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:40 ` Linus Torvalds @ 2007-07-11 23:53 ` Andrew Morton 2007-07-12 8:23 ` Jan Engelhardt 2007-07-14 1:08 ` Adrian Bunk 0 siblings, 2 replies; 9+ messages in thread From: Andrew Morton @ 2007-07-11 23:53 UTC (permalink / raw) To: Linus Torvalds; +Cc: Roland McGrath, Jason Wessel, linux-kernel, linux-arch On Wed, 11 Jul 2007 16:40:29 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote: > > > On Wed, 11 Jul 2007, Andrew Morton wrote: > > > > OK, thanks. So I ended up with the below as a probably-2.6.23 thing: > > ... > > +AFLAGS += $(call as-option, -gdwarf) > > "-gdwarf2?" > yep, that's what the kgdb tree was using - I'll fix it up. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:53 ` Andrew Morton @ 2007-07-12 8:23 ` Jan Engelhardt 2007-07-14 1:08 ` Adrian Bunk 1 sibling, 0 replies; 9+ messages in thread From: Jan Engelhardt @ 2007-07-12 8:23 UTC (permalink / raw) To: Andrew Morton Cc: Linus Torvalds, Roland McGrath, Jason Wessel, linux-kernel, linux-arch On Jul 11 2007 16:53, Andrew Morton wrote: >On Wed, 11 Jul 2007 16:40:29 -0700 (PDT) >Linus Torvalds <torvalds@linux-foundation.org> wrote: > >> On Wed, 11 Jul 2007, Andrew Morton wrote: >> > >> > OK, thanks. So I ended up with the below as a probably-2.6.23 thing: >> > ... >> > +AFLAGS += $(call as-option, -gdwarf) >> >> "-gdwarf2?" >> > >yep, that's what the kgdb tree was using - I'll fix it up. I am all for using -ggdb/-ggdb2/-ggdb3 instead. Jan -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO 2007-07-11 23:53 ` Andrew Morton 2007-07-12 8:23 ` Jan Engelhardt @ 2007-07-14 1:08 ` Adrian Bunk 1 sibling, 0 replies; 9+ messages in thread From: Adrian Bunk @ 2007-07-14 1:08 UTC (permalink / raw) To: Andrew Morton Cc: Linus Torvalds, Roland McGrath, Jason Wessel, linux-kernel, linux-arch On Wed, Jul 11, 2007 at 04:53:08PM -0700, Andrew Morton wrote: > On Wed, 11 Jul 2007 16:40:29 -0700 (PDT) > Linus Torvalds <torvalds@linux-foundation.org> wrote: > > > > > > > On Wed, 11 Jul 2007, Andrew Morton wrote: > > > > > > OK, thanks. So I ended up with the below as a probably-2.6.23 thing: > > > ... > > > +AFLAGS += $(call as-option, -gdwarf) > > > > "-gdwarf2?" > > > > yep, that's what the kgdb tree was using - I'll fix it up. Since even gcc 3.2 already supports -gdwarf-2, you can drop the as-option check. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-07-14 1:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <46955BB1.20200@windriver.com>
[not found] ` <20070711224327.9B0ED4D0555@magilla.localdomain>
2007-07-11 23:03 ` [PATCH] Pass -g to assembler under CONFIG_DEBUG_INFO Andrew Morton
2007-07-11 23:07 ` Roland McGrath
2007-07-11 23:15 ` Andreas Schwab
2007-07-11 23:19 ` Roland McGrath
2007-07-11 23:27 ` Andreas Schwab
2007-07-11 23:40 ` Linus Torvalds
2007-07-11 23:53 ` Andrew Morton
2007-07-12 8:23 ` Jan Engelhardt
2007-07-14 1:08 ` Adrian Bunk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox