qemu-riscv
[Top][All Lists]
Advanced

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

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


From: Shobhit
Subject: Re: Is there a way to check values of registers before and after running a program on qemu-system-risc64v?
Date: Thu, 20 Jun 2024 21:46:24 +0530

Yes, the si command is more helpful than continue.

Thank you for the suggestion.

On Wed, 19 Jun 2024 at 23:50, Deepak Gupta <debug@rivosinc.com> wrote:
On Wed, Jun 19, 2024 at 9:58 AM Shobhit <shobhit32t@gmail.com> wrote:
>
> On pressing CTRL+C, I am getting the following line:
>
> >> Thread 1 received signal SIGINT, Interrupt.
> >> 0x0000000080007bac in ?? ()
>
> Instead of the following:
>
> Thread 4 received signal SIGINT, Interrupt.
> [Switching to Thread 1.4]
> _start () at test.S:10
> 10      1:      j 1b
>

Why are you even creating 4 cpus (I saw that you had this option `-smp 4`)
Just have 1 cpu. You could use the gdb command `si` (step into)
instead of continuing.
Practically you will be stepping through 5 or 6 instructions.
GDB reference -
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Continuing-and-Stepping.html

As a side note, you may be just starting these things and thus getting
introduced to a lot of
sw / tools (like qemu, gdb, compiler) and it might be overwhelming.
But I would advise that
spend time with them and their documentation / internet search. What
do they do and why
do they do it? It'll help you understand and validate your own thought
process and make you
figure out things on your own.

reply via email to

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