]> Devi Nivas Git - cs3210-lab0.git/commitdiff
Have kernel build rule create kernel.sym, which can be
authorrsc <rsc>
Sun, 17 Sep 2006 19:21:12 +0000 (19:21 +0000)
committerrsc <rsc>
Sun, 17 Sep 2006 19:21:12 +0000 (19:21 +0000)
used in Bochs to make breakpoint setting easier:

load-symbols "kernel.sym"
vb 0x8:"main0"
c
disasm/25 "main0"
vb 0x8:"main0"+0x5f
c

etc.

Makefile

index 78421a2dd1058fd5a7171829e82160dbdffe59b5..fd9d9cdb2e01e63e1270aff81d8481989599a9f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,7 @@ kernel : $(OBJS) bootother.S _init
        $(OBJDUMP) -S bootother.o > bootother.asm
        $(LD) -Ttext 0x100000 -e main0 -o kernel $(OBJS) -b binary bootother _init
        $(OBJDUMP) -S kernel > kernel.asm
+       $(OBJDUMP) -t kernel | awk '/SYMBOL TABLE/ { go=1; next } go {print $$1, $$NF}' >kernel.sym
 
 tags: $(OBJS) bootother.S _init
        etags *.S *.c