I am trying to run a very basic RISC V assembly program on
qemu-system-riscv64, is there a way to check/monitor the value of some
particular registers before and after loading the program? I have tried
passing -monitor stdio flag to qemu-system-risc64v, but it doesn't give
me the values of registers.
This is the program I am running on bare metal risc64v emulator
.option norvc
.section .text.init
.global _start
_start:
addi x5, x0, 6
addi x5, x0, 4
And I am using ld script to load the program at the location 0x80000000 in memory.
This is the command I am using to start the emulator:
qemu-system-riscv64 -machine virt -monitor stdio -cpu rv64 -smp 4 -m
128M -bios default new.elf
Here new.elf is the executable elf file created after compiling the above assembly program.