Cannot step over an ecall in gdb?


(Bengt Bäverman) #1

Today I implemented a ecall in assembly and everything is fine, except I cannot step over the ecall in GDB without ending up in the exception route. When using the s(tep) or n(ext) commands they take me to the exception routine instead of ignoring all that an stopping after the ecall.

Any ideas?


#2

Somehow related problem:
Under gdb jalr 748(ra) works like jalr 748(pc) when you stepi through it, resulting in an incorrect destination address.

gdb from riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14 pack
MCU: FE310-G002 on HiFive1 RevB