Skip to content

Commit

Permalink
Set up gdb in clion
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightwood13 committed Aug 18, 2023
1 parent 58ae36a commit 998ef77
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set architecture i386:x86-64
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ISO_FILE = $(BUILD_FOLDER)/sos.iso
CROSS_COMPILE = x86_64-elf-
ASM = nasm
CC = gcc
CC_FLAGS = -c -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs \
CC_FLAGS = -c -g -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs \
-Wall -Wextra -Werror
LINKER = ld

Expand Down
9 changes: 9 additions & 0 deletions kill-qemu-after-gdb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

sleep 2

while pkill -0 x86_64-elf-gdb; do
sleep 0.5
done

pkill qemu-system-x86_64
4 changes: 4 additions & 0 deletions run-qemu-detached.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

qemu-system-x86_64 -s -S -cdrom build_output/sos.iso &
./kill-qemu-after-gdb.sh &

0 comments on commit 998ef77

Please sign in to comment.