qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a way to check values of registers before and after running a p


From: Shobhit
Subject: Is there a way to check values of registers before and after running a program on qemu-system-risc64v?
Date: Tue, 18 Jun 2024 21:35:22 +0530

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]