Added debug symbols for bochs

This commit is contained in:
lucic71 2022-06-28 19:40:51 +03:00
parent e57be56d1b
commit b5640dfb24
4 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
. ./iso.sh
(./sym.sh "kernel/os.kernel")
BOCHS_CONFIG_FILE=bochs/bochsrc.txt

View File

@ -8,3 +8,4 @@ log: ./bochs/bochslog.txt
clock: sync=realtime, time0=local
cpu: count=1, ips=1000000
magic_break: enabled=1
debug_symbols: file=./kernel/os.kernel.sym

View File

@ -6,7 +6,7 @@ HOSTARCH!=../target-triplet-to-arch.sh $(HOST)
# Compiler and linker flags.
CFLAGS?=-g3
CFLAGS?=-g
CPPFLAGS?=
LDFLAGS?=
LIBS?=
@ -126,7 +126,7 @@ $(ARCHDIR)/crtbegin.o $(ARCHDIR)/crtend.o:
$(CC) -MD -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
clean: library_clean module_clean
rm -f os.kernel
rm -f os.kernel*
rm -f $(OBJS) *.o */*.o */*/*.o
rm -f $(OBJS:.o=.d) *.d */*.d */*/*.d

2
sym.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
nm $1 | grep " T " | awk '{ print $1" "$3 }' > $1.sym