mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
feat: add rr support
This commit is contained in:
parent
0ee2b996e4
commit
71faad766d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/.idea
|
||||
/target
|
||||
/replay.*
|
||||
|
31
Makefile
31
Makefile
@ -9,7 +9,7 @@ endif
|
||||
|
||||
RUSTFLAGS += -Crelocation-model=static
|
||||
RUSTFLAGS += -Ccode-model=medium
|
||||
RUSTFLAGS += -Ctarget-feature=+relax
|
||||
#RUSTFLAGS += -Ctarget-feature=+relax
|
||||
RUSTFLAGS += -Cforce-frame-pointers=yes
|
||||
RUSTFLAGS += -Clink-arg=-T$(LINKER_LDS)
|
||||
|
||||
@ -36,9 +36,32 @@ clean:
|
||||
cargo clean
|
||||
|
||||
qemu: kernel
|
||||
qemu-system-$(ARCH) -nographic -machine virt -serial mon:stdio -smp 1 -kernel target/$(BUILD_TARGET)/debug/kernel
|
||||
qemu-system-$(ARCH) \
|
||||
-nographic -machine virt -serial mon:stdio -smp 1 \
|
||||
-kernel target/$(BUILD_TARGET)/debug/kernel
|
||||
|
||||
qemu-gdb: kernel
|
||||
qemu-system-$(ARCH) -nographic -machine virt -serial mon:stdio -smp 1 -kernel target/$(BUILD_TARGET)/debug/kernel -s -S
|
||||
qemu-system-$(ARCH) \
|
||||
-nographic -machine virt -serial mon:stdio -smp 1 \
|
||||
-kernel target/$(BUILD_TARGET)/debug/kernel \
|
||||
-s -S
|
||||
|
||||
.PHONY: kernel clippy test clean qemu
|
||||
replay.qcow2:
|
||||
qemu-img create -f qcow2 replay.qcow2 1G
|
||||
|
||||
qemu-record: kernel replay.qcow2
|
||||
qemu-system-$(ARCH) \
|
||||
-nographic -machine virt -serial mon:stdio -smp 1 \
|
||||
-kernel target/$(BUILD_TARGET)/debug/kernel \
|
||||
-icount shift=auto,rr=record,rrfile=replay.bin,rrsnapshot=init \
|
||||
-drive file=replay.qcow2,if=none,id=rr
|
||||
|
||||
qemu-replay: kernel replay.qcow2
|
||||
qemu-system-$(ARCH) \
|
||||
-nographic -machine virt -serial mon:stdio -smp 1 \
|
||||
-kernel target/$(BUILD_TARGET)/debug/kernel \
|
||||
-icount shift=auto,rr=replay,rrfile=replay.bin,rrsnapshot=init \
|
||||
-drive file=replay.qcow2,if=none,id=rr \
|
||||
-s -S
|
||||
|
||||
.PHONY: kernel clippy test clean qemu qemu-gdb qemu-record qemu-replay
|
||||
|
Loading…
Reference in New Issue
Block a user