A script for running the debugger. Also, some debugger settings

This commit is contained in:
Thomas Lovén 2017-10-23 22:58:18 +02:00
parent 6919f9c8ed
commit 82a8676056
3 changed files with 29 additions and 1 deletions

12
toolchain/dbg Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh -e
if [ -z ${MITTOS64+x} ]; then
echo -en "\033[31mWarning: \033[0m"
echo "It seems you are trying to build mittos64 in an unsuported environment."
echo "This makefile is designed to run inside a mittos64-specific docker container."
echo "If you know what you're doing, define the environment variable "MITTOS64""
echo "See README.md for more information"
exit 1
fi
gdb -q -x /opt/toolchain/gdbinit

View File

@ -13,4 +13,4 @@ iso=/opt/mittos64.iso
/opt/toolchain/mkiso /opt/toolchain/mkiso
qemu-system-x86_64 -cdrom ${iso} -curses qemu-system-x86_64 -s -S -cdrom ${iso} -curses

16
toolchain/gdbinit Normal file
View File

@ -0,0 +1,16 @@
set prompt \033[31m(gdb) \033[0m
set disassembly-flavor intel
target remote :1234
define q
monitor quit
end
define reg
monitor info registers
end
define reset
monitor system_reset
end