aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorMarvin Borner2020-05-12 18:07:47 +0200
committerMarvin Borner2020-05-12 18:07:47 +0200
commit58da8c3b7d2dcf6e879aa8aa6dc67ce0e87d017b (patch)
treebbac756a1d70daeb6649a6d6cc3bacbc5a34cb68 /run
parentbbaf93b7c8cc551d0b4b898163c60caaa0f9a279 (diff)
Improved debugging command
Diffstat (limited to 'run')
-rwxr-xr-xrun7
1 files changed, 6 insertions, 1 deletions
diff --git a/run b/run
index 9a5d150..88b6bda 100755
--- a/run
+++ b/run
@@ -135,7 +135,10 @@ make_test() {
}
make_debug() {
- qemu_with_flags -s -cdrom ./build/melvix.iso #-drive file=./build/hdd10M.img,format=raw
+ objcopy --only-keep-debug ./build/kernel/kernel.bin ./build/kernel/debug
+ qemu-system-i386 -vga std -S -s -cdrom ./build/melvix.iso -hda ./build/disk.img & sleep 2
+ (echo target remote 127.0.0.1:1234; cat) | gdb -s ./build/kernel/debug ./build/kernel/kernel.bin
+ pkill "qemu*"
}
make_image_debug() {
@@ -196,6 +199,8 @@ elif [ "${mode}" = "test" ]; then
elif [ "${mode}" = "again" ]; then
make_test
elif [ "${mode}" = "debug" ]; then
+ make_cross
+ make_build
make_debug
elif [ "${mode}" = "image_debug" ]; then
make_cross