From 4ed326be5d7dec9ee16190847ea0b9f42117fe1a Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 28 Nov 2008 12:09:17 +0000 Subject: This patch from Ralf Grosse Boerger makes debugging more comfortable. With this patch it's possible to - determine the according source code line for each asm statement (objdump -dS) - determine the source code file for each asm statement (objdump -ddl) This isn't exactly trivial because cache_as_ram_auto.c gets compiled to assembly and converted by a perl script afterwards. This patch solves the problem - by extending cache_as_ram_auto.inc with debug information and line numbers - by correcting the perl calls (".text" --> "\.text") - by creating a disassembly with source code and line numbers. (ctr0.disasm and coreboot.disasm) There's one minor downside to the patch: A complete abuild run takes up around 1.6G instead of about 700MB now. But I'm sure this is quite reasonable for the benefits. Signed-off-by: Stefan Reinauer Please commit while this is being worked out. Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3778 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/config/Config.lb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/config') diff --git a/src/config/Config.lb b/src/config/Config.lb index a9de434071..93d67b892e 100644 --- a/src/config/Config.lb +++ b/src/config/Config.lb @@ -124,6 +124,7 @@ makerule coreboot depends "crt0.o $(INIT-OBJECTS) $(COREBOOT_APC) $(COREBOOT_RAM_ROM) ldscript.ld" action "$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)" action "$(CROSS_COMPILE)nm -n coreboot | sort > coreboot.map" + action "$(CROSS_COMPILE)objdump -dS coreboot > coreboot.disasm" end # the buildrom tool @@ -139,9 +140,10 @@ makerule crt0.s action "$(CPP) $(CPPFLAGS) -I. -I$(TOP)/src $< > $@.new && mv $@.new $@" end +# generate an assembly listing via -a switch. makerule crt0.o depends "crt0.s" - action "@$(CC) -c $(CPU_OPT) -o $@ $<" + action "$(CC) -Wa,-acdlns -c $(CPU_OPT) -o $@ $< >crt0.disasm" end makerule etags -- cgit v1.2.3