add .gdbinit for debugrun

This commit is contained in:
DeathWish5 2022-04-12 20:42:54 +08:00
parent 41a0ce76d2
commit d585b87b09
4 changed files with 2 additions and 3 deletions

View File

@ -4,4 +4,3 @@ target remote 127.0.0.1:15234
symbol-file ../target/riscv64/release/zcore
display/10i $pc
break *0x8020004a
break

View File

@ -2,7 +2,7 @@ target remote 127.0.0.1:15234
symbol-file ../target/x86_64/release/zcore
b _start
# b __alltraps
# b syscall_return
b syscall_return
# b syscall_entry
display/10i $rip

View File

@ -226,6 +226,7 @@ endif
.PHONY: debugrun
debugrun: $(qemu_disk)
cp .gdbinit_$(MODE) .gdbinit
ifeq ($(ARCH), x86_64)
$(sed) 's#initramfs=.*#initramfs=\\EFI\\zCore\\$(notdir $(user_img))#' $(esp)/EFI/Boot/rboot.conf
$(sed) 's#cmdline=.*#cmdline=$(CMDLINE)#' $(esp)/EFI/Boot/rboot.conf

View File

@ -30,7 +30,6 @@ fn primary_main(config: kernel_hal::KernelConfig) {
logging::init();
memory::init_heap();
kernel_hal::primary_init_early(config, &handler::ZcoreKernelHandler);
let options = utils::boot_options();
logging::set_max_level(&options.log_level);
info!("Boot options: {:#?}", options);