why gdb try to read address 0x0 when I set $pc，how to suppress this behavior?

庄秋彬
2023-07-19T07:59:54Z

Hi,

I use gdb with openocd to debug a riscv board, and found that when set $pc=xxx(a non-zero value) in gdb, gdb would first read the address 0x0, which caused an error on this riscv device.
Is there any documentation or suggestions for reading the source code to solve this problem?
Thanks