GDB var.
This commit is contained in:
parent
2e56f726c3
commit
6ddcf19a06
13
Makefile
13
Makefile
@ -1,15 +1,18 @@
|
|||||||
|
GDB=gdb
|
||||||
|
|
||||||
ifeq ($(shell uname -s),Darwin)
|
ifeq ($(shell uname -s),Darwin)
|
||||||
AS=x86_64-elf-as
|
AS=x86_64-elf-as
|
||||||
LD=x86_64-elf-ld
|
LD=x86_64-elf-ld
|
||||||
CC=x86_64-elf-gcc
|
CC=x86_64-elf-gcc
|
||||||
|
GDB=x86_64-elf-gdb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
run: image.bin
|
run: image.bin
|
||||||
qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio
|
qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio
|
||||||
|
|
||||||
debug-preboot: image.bin mbr.elf
|
debug-preboot-nox: image.bin mbr.elf
|
||||||
qemu-system-i386 -drive format=raw,file=$< -s -S &
|
qemu-system-i386 -nographic -drive format=raw,file=$< -s -S &
|
||||||
x86_64-elf-gdb mbr.elf \
|
$(GDB) mbr.elf \
|
||||||
-ex "set architecture i8086" \
|
-ex "set architecture i8086" \
|
||||||
-ex "target remote localhost:1234" \
|
-ex "target remote localhost:1234" \
|
||||||
-ex "break *0x7c00" \
|
-ex "break *0x7c00" \
|
||||||
@ -17,14 +20,14 @@ debug-preboot: image.bin mbr.elf
|
|||||||
|
|
||||||
debug-boot: image.bin mbr.elf
|
debug-boot: image.bin mbr.elf
|
||||||
qemu-system-i386 -drive format=raw,file=$< -s -S &
|
qemu-system-i386 -drive format=raw,file=$< -s -S &
|
||||||
x86_64-elf-gdb mbr.elf \
|
$(GDB) mbr.elf \
|
||||||
-ex "target remote localhost:1234" \
|
-ex "target remote localhost:1234" \
|
||||||
-ex "break init_32bit" \
|
-ex "break init_32bit" \
|
||||||
-ex "continue"
|
-ex "continue"
|
||||||
|
|
||||||
debug: image.bin
|
debug: image.bin
|
||||||
qemu-system-i386 -drive format=raw,file=$< -s -S &
|
qemu-system-i386 -drive format=raw,file=$< -s -S &
|
||||||
x86_64-elf-gdb kernel.bin \
|
$(GDB) kernel.bin \
|
||||||
-ex "target remote localhost:1234" \
|
-ex "target remote localhost:1234" \
|
||||||
-ex "break _start" \
|
-ex "break _start" \
|
||||||
-ex "continue"
|
-ex "continue"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user