GDB will set bp at a function for RISC-V when step over this function call
Jim Wilson
jimw@sifive.com
Wed Sep 22 21:48:58 GMT 2021
On Mon, Sep 20, 2021 at 10:06 AM John Baldwin <jhb@freebsd.org> wrote:
> RISC-V doesn't (to my knowledge) have support for hardware single step and
> should be using software single step on bare metal as well.
>
There is hardware single-step/breakpoint/watchpoint support. However, in
old versions of the debug spec (e.g. HiFive Unleashed), this support was
only visible via jtag, and hence unusable to linux/freebsd/etc. But
openocd does have hardware single-step/breakpoint/watchport support which
does work. People doing bare metal debugging are expected to use openocd
with gdb. In new versions of the debug spec (e.g. HiFive Unmatched), this
support is now visible in machine mode, but we need opensbi and kernel
support before gdb can use it. I don't know of anyone working on that,
though I might try it if I ever find the time.
Jim
More information about the Gdb
mailing list