Browse Source

generate kernel.sym for debug

master
Mathieu Maret 3 months ago committed by Mathieu Maret
parent
commit
1fcf63409c
  1. 5
      Makefile
  2. 2
      debug.gdb

5
Makefile

@ -20,8 +20,9 @@ all:$(KERNEL)
kernel.elf: $(cobj) $(gasmobj) font_psf.o $(LDSCRIPT)
$(LD) $(LDFLAGS) -o $@ $(gasmobj) $(cobj) font_psf.o -T$(LDSCRIPT) -Map kernel.map
$(KERNEL): kernel.elf
$(CROSS)objcopy -O binary $< $@
$(KERNEL) kernel.sym &: kernel.elf
$(CROSS)objcopy -O binary $< $(KERNEL)
$(CROSS)objcopy --only-keep-debug $< kernel.sym
font_psf.o: font.psf
$(LD) -r -b binary -o font_psf.o font.psf

2
debug.gdb

@ -1,3 +1,3 @@
#add-symbol-file kernel.map
add-symbol-file kernel.sym
file kernel.elf
target remote | qemu-system-aarch64 -machine raspi3b -S -gdb stdio -kernel kernel.bin

Loading…
Cancel
Save