This is an ABI and should be documented like our other ABIs. Putting this into
the debug spec conflates two things: the interface (that "slli x0, x0, N;
ebreak" pair) and the implementation (an external debugger). The best example
for how to document this would be a Linux ABI document, but we don't have one
so I guess you'll be on your own :).
This is one of those cases where ABI really means two different things:
* The calling convention and memory layout of structures. This is documented
in the ELF psABI spec.
* The interface to the host system, which would include both the mechanism for
transferring control (either "slli; ebreak" or "ecall"), the calling
convention (in both cases very similar to the C function calling convention,
so easy to document), and the set of available interfaces (system calls or
semihosting calls).
The second one is a very large document in Linux land, which is why we haven't
done it (it's also a bit redundant, as the vast majority of our interface is
already standard). It's a feasible and useful document to produce for the
semi-hosting use case, though.
If you'd like to have repo to document the ABI then just ask.
> To view this discussion on the web visit
https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAKnTnFRB5NYfS4_dYc747a2mok7Bj%3DVdayMBg3G-z-fmgDA99g%40mail.gmail.com.