riscv-collab / riscv-gnu-toolchain

GNU toolchain for RISC-V, including GCC
Other
3.51k stars 1.16k forks source link

gdb 12.1 can not run simulator with riscv #1269

Closed BSeany closed 1 year ago

BSeany commented 1 year ago

After run gdb-12.1 with sim, i found it does not support these instructions, such as INSN_CLASS_C, INSN_CLASS_ZICSR , INSN_CLASS_D, INSN_CLASS_F. The code should be there -> gdb/sim/riscv/sim-main.c static sim_cia execute_one(SIM_CPU cpu, unsigned_word iw, const struct riscv_opcode op)

test commands: ./gdb.exe d:/test/alien.elf target sim load b main run

TommyMurphyTM1234 commented 1 year ago

The GDB simulator is very limited in terms of the ISA extensions that it supports. Search existing issues here for more on this. For example:

You'll need to log the issue upstream in the relevant bugbase. For example:

But, as far I know, there's nobody doing much in terms of filling out gaps in GDB simulator RISC-V support. You'd probably be better off looking at one of the other simulators with better/more comprehensive RISC-V ISA extension support. E.g. Spike, QEMU, Renode etc.

I'm closing this issue because it's not really a valid one for this repo which deals primarily with the integration of the tools into the overall riscv-gnu-toolchain bundle and not with general maintenance of the individual submodule tools which is now done upstream.