From 653724c79bb0cca9e79cc46c189d2cb5e69dfdae Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 25 Sep 2016 15:24:04 -0700 Subject: generate debug info --- Makefile | 2 +- ld_script.txt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6485d44f1..811e4610e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ AS := $(DEVKITARM)/bin/arm-none-eabi-as ASFLAGS := -mcpu=arm7tdmi CC1 := tools/agbcc/bin/agbcc -CFLAGS := -mthumb-interwork -O2 +CFLAGS := -mthumb-interwork -O2 -g CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef diff --git a/ld_script.txt b/ld_script.txt index 2cf248eb0..40f28e59e 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -570,6 +570,17 @@ SECTIONS { data/graphics.o(gfx_data); } =0 + /* DWARF 2 sections */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* Discard everything not specifically mentioned above. */ /DISCARD/ : { -- cgit v1.2.3