mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 18:36:24 +04:00
Rollback rustsbi && support debugging under release mode
This commit is contained in:
parent
f33228a6bc
commit
009afdf55e
Binary file not shown.
Binary file not shown.
@ -7,3 +7,6 @@ edition = "2018"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Building
|
||||
TARGET := riscv64gc-unknown-none-elf
|
||||
MODE := debug
|
||||
MODE ?= debug
|
||||
KERNEL_ELF := target/$(TARGET)/$(MODE)/os
|
||||
KERNEL_BIN := $(KERNEL_ELF).bin
|
||||
DISASM_TMP := target/$(TARGET)/$(MODE)/asm
|
||||
@ -100,6 +100,7 @@ gdbserver: build
|
||||
@qemu-system-riscv64 -machine virt -nographic -bios $(BOOTLOADER) -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) -s -S
|
||||
|
||||
gdbclient:
|
||||
@echo $(KERNEL_ELF)
|
||||
@riscv64-unknown-elf-gdb -ex 'file $(KERNEL_ELF)' -ex 'set arch riscv:rv64' -ex 'target remote localhost:1234'
|
||||
|
||||
.PHONY: build env kernel clean disasm disasm-vim run-inner switch-check gdbserver
|
||||
.PHONY: build env kernel clean disasm disasm-vim run-inner switch-check gdbserver gdbclient
|
||||
|
Loading…
Reference in New Issue
Block a user