Closed hauhsu closed 4 years ago
We weren't aware that there were debug csrs that we needed to support. We will have to put this on our todo list. Meanwhile, you can access the csrs by using their address.
User beware that if you tell gdb to set a hardware breakpoint, that's likely to overwrite whatever you wrote to those registers.
However, there are a lot of possible hardware triggers that gdb has no model for, so sometimes writing these register values yourself is the only way to do what you want.
@Nelson1225 can you work on this?
OK I will take care of this :)
Thank you guys 😄 .
Sorry for the late reply. I didn't add the missing debug CSR until recently, since there are some related problems need to be resolved first. The current FSF binutils should use the missing debug CSR mentioned above now. Please feel free to let me know if it is good to you. Thanks.
The missing debug CSR should be added on the FSF binutils. You can reopen this PR or create a new one if needed. Thanks.
RISC-V debug spec defines some trigger registers (section 5.2). And these registers should be accessible using
csr
instruction. But I have the following assembly code that triggers unknown CSR error:I think these registers are missed in binutils/include/opcode/riscv-opc.h?: