Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replace .dump files, generated by objdump, with .sym files, generated…

… by nm. benefits are twofold: dramatic improvement in build time and a bochsrc that automatically loads the sym file for the kernel giving more useful output and the ability to set breakpoints with symbol names rather than hex.
  • Loading branch information...
commit 0f05dc7d1537f6c9881900f2463b99530082afb9 1 parent c65fa71
@wolfwood wolfwood authored
View
1  .gitignore
@@ -16,6 +16,7 @@ runtimes/mindrt/*.a
*.o
*~
*.dump
+*.sym
*-elf
app/c/hello/chel
app/d/hello/hello
View
6 app/d/hello/dsss.conf
@@ -29,9 +29,9 @@ echo '--> hello';\
ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o hello `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a;\
\
echo ;\
-echo Creating App Dump; \
-echo '--> hello.dump';\
-rm -f hello.dump && objdump -d -S -r hello > hello.dump;\
+echo Creating App Symbol File; \
+echo '--> hello.sym';\
+../../../build/mkldsym.sh hello hello.sym; \
\
echo ;\
echo Copying;\
View
7 app/d/init/dsss.conf
@@ -34,6 +34,7 @@ echo Copying;\
cp init ../../../build/iso/binaries/;\
\
echo ;\
-echo Creating App Dump; \
-echo '--> init.dump';\
-rm -f init.dump && objdump -j .text -g -S -d -r init-elf > init.dump;
+echo Creating App Symbol File; \
+echo '--> init.sym';\
+../../../build/mkldsym.sh init-elf init.sym; \
+\
View
6 app/d/posix/dsss.conf
@@ -30,9 +30,9 @@ echo '--> posix';\
ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o posix `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a;\
\
echo ;\
-echo Creating App Dump; \
-echo '--> posix.dump';\
-rm -f posix.dump && objdump -g -S -d -r posix > posix.dump;\
+echo Creating App Symbol File; \
+echo '--> posix.sym';\
+../../../build/mkldsym.sh posix posix.sym; \
\
echo ;\
echo Copying;\
View
6 app/d/xsh/dsss.conf
@@ -30,9 +30,9 @@ echo '--> xsh';\
ld -nostdlib -nodefaultlibs -T../../build/elf.ld -o xsh `ls dsss_objs/O/*.o` ../../../runtimes/mindrt/mindrt.a ../../../runtimes/mindrt/drt0.a;\
\
echo ;\
-echo Creating App Dump; \
-echo '--> xsh.dump';\
-rm -f xsh.dump && objdump -g -S -d -r xsh > xsh.dump;\
+echo Creating App Symbol File; \
+echo '--> xsh.sym';\
+../../../build/mkldsym.sh xsh xsh.sym; \
\
echo ;\
echo Copying;\
View
4 build/bochsrc
@@ -5,3 +5,7 @@ boot: cdrom
cpu: count=4, reset_on_triple_fault=0
#ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
#i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k
+
+# debug
+magic_break: enabled=1
+debug_symbols: file=xomb.sym
View
6 build/confs/x86_64.conf
@@ -75,7 +75,7 @@ echo Compiling ISO; \
./buildiso.sh; \
\
echo ;\
-echo Creating Kernel Dump; \
-echo '--> xomb.dump';\
-rm -f xomb.dump && objdump -d -S -r iso/boot/xomb > xomb.dump;\
+echo Creating Kernel Symbol File; \
+echo '--> xomb.sym';\
+./mkldsym.sh iso/boot/xomb xomb.sym; \
\
View
8 build/mkldsym.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+##
+## mkldsym: based on linux mksysmap, we just strip a field
+##
+## usage:
+##
+## mkldsym <ELF EXE> <output sym file>
+nm -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' | awk '{print $1, $3}' > $2

0 comments on commit 0f05dc7

Please sign in to comment.
Something went wrong with that request. Please try again.