Skip to contentSkip to conversation

Pass -g to assembler under CONFIG_DEBUG_INFO

PATCH Applied [email protected] 1 participant 1 message Aug 10, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/6 Pass -g to assembler under CONFIG_DEBUG_INFO

From: Roland McGrath <[email protected]>

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.

---

 Makefile |    1 +
 1 files changed, 1 insertion(+)
Makefile renamed from Makefile~pass-g-to-assembler-under-config_debug_info +1 -0
diff -puN Makefile~pass-g-to-assembler-under-config_debug_info Makefile
@@ -499,6 +499,7 @@ endif
 
 ifdef CONFIG_DEBUG_INFO
 CFLAGS		+= -g
+AFLAGS		+= $(call as-option, -gdwarf2)
 endif
 
 # Force gcc to behave correct even for buggy distributions

_