diff --git a/14-checkpoint/Makefile b/14-checkpoint/Makefile index b6112574..7d43bc30 100644 --- a/14-checkpoint/Makefile +++ b/14-checkpoint/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin & + qemu-system-i386 -s -S -fda os-image.bin & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/15-video-ports/Makefile b/15-video-ports/Makefile index b6112574..7d43bc30 100644 --- a/15-video-ports/Makefile +++ b/15-video-ports/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin & + qemu-system-i386 -s -S -fda os-image.bin & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/16-video-driver/Makefile b/16-video-driver/Makefile index b6112574..7d43bc30 100644 --- a/16-video-driver/Makefile +++ b/16-video-driver/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin & + qemu-system-i386 -s -S -fda os-image.bin & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/17-video-scroll/Makefile b/17-video-scroll/Makefile index b6112574..7d43bc30 100644 --- a/17-video-scroll/Makefile +++ b/17-video-scroll/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin & + qemu-system-i386 -s -S -fda os-image.bin & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/18-interrupts/Makefile b/18-interrupts/Makefile index 8a68aa00..6575ba6f 100644 --- a/18-interrupts/Makefile +++ b/18-interrupts/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin -d guest_errors,int & + qemu-system-i386 -s -S -fda os-image.bin -d guest_errors,int & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/18-interrupts/cpu/idt.c b/18-interrupts/cpu/idt.c index 999d0c94..cdb7e99b 100644 --- a/18-interrupts/cpu/idt.c +++ b/18-interrupts/cpu/idt.c @@ -1,6 +1,9 @@ #include "idt.h" #include "../kernel/util.h" +idt_gate_t idt[IDT_ENTRIES]; +idt_register_t idt_reg; + void set_idt_gate(int n, u32 handler) { idt[n].low_offset = low_16(handler); idt[n].sel = KERNEL_CS; diff --git a/18-interrupts/cpu/idt.h b/18-interrupts/cpu/idt.h index 27bfac5a..b31f3e31 100644 --- a/18-interrupts/cpu/idt.h +++ b/18-interrupts/cpu/idt.h @@ -28,8 +28,6 @@ typedef struct { } __attribute__((packed)) idt_register_t; #define IDT_ENTRIES 256 -idt_gate_t idt[IDT_ENTRIES]; -idt_register_t idt_reg; /* Functions implemented in idt.c */ diff --git a/19-interrupts-irqs/Makefile b/19-interrupts-irqs/Makefile index 8a68aa00..6575ba6f 100644 --- a/19-interrupts-irqs/Makefile +++ b/19-interrupts-irqs/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin -d guest_errors,int & + qemu-system-i386 -s -S -fda os-image.bin -d guest_errors,int & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/20-interrupts-timer/Makefile b/20-interrupts-timer/Makefile index 4d6da943..c80e4eda 100644 --- a/20-interrupts-timer/Makefile +++ b/20-interrupts-timer/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin -d guest_errors,int & + qemu-system-i386 -s -S -fda os-image.bin -d guest_errors,int & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/21-shell/Makefile b/21-shell/Makefile index 14782944..8a89a506 100644 --- a/21-shell/Makefile +++ b/21-shell/Makefile @@ -28,7 +28,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin -d guest_errors,int & + qemu-system-i386 -s -S -fda os-image.bin -d guest_errors,int & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/22-malloc/Makefile b/22-malloc/Makefile index 14782944..8a89a506 100644 --- a/22-malloc/Makefile +++ b/22-malloc/Makefile @@ -28,7 +28,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin -d guest_errors,int & + qemu-system-i386 -s -S -fda os-image.bin -d guest_errors,int & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards diff --git a/23-fixes/Makefile b/23-fixes/Makefile index 65e577be..19ed0884 100644 --- a/23-fixes/Makefile +++ b/23-fixes/Makefile @@ -27,7 +27,7 @@ run: os-image.bin # Open the connection to qemu and load our kernel-object file with symbols debug: os-image.bin kernel.elf - qemu-system-i386 -s -fda os-image.bin -d guest_errors,int & + qemu-system-i386 -s -S -fda os-image.bin -d guest_errors,int & ${GDB} -ex "target remote localhost:1234" -ex "symbol-file kernel.elf" # Generic rules for wildcards