I am on the traps lecture of the 2023 version of the course. Following the instructions here tell me that I can step
into the ecall instruction and see the jump to trapframe.
This does not seem to happen and it automatically jumps to ret
. This answer asks for the same problem and the solutions suggest to use the newlib version of riscv64 compiler.
Thus, I installed the binutils-riscv64-unknown-elf_2.34-0ubuntu1_amd64.deb
and gcc-riscv64-unknown-elf_10.2.0-0ubuntu1_amd64.deb
packages which provide me with riscv64-unknown-elf-gcc with newlib support (newer versions seem to be built with the --without-newlib
flag)
However, on running gdb-multiarch
, I still can’t step into the ecall function. I am on Ubuntu 24.04 LTS. Is this something to do with ubuntu, or the fact that I am using gdb-multiarch instead of riscv64-unknown-elf-gdb
? For some reason I can’t seem to be able to find this online and my system is too frail to build any binaries so any leads on finding this will be helpful.