Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target/riscv/riscv-011.c: fix access to non-existent register
`reg` is a number in register cache, as evident by the following call to `reg_cache_set()`. `CSR_DCSR` is `GDB_REGNO_DCSR - 65`. This results in setting cache value for another register, which does not exist, and causes a segfault if all non-existent registers are not allocated a value (`reg->value == NULL`). Change-Id: Iab68a4bb55ce6d4730804e9709e40ab2af8a07c6 Signed-off-by: Evgeniy Naydanov <[email protected]>
- Loading branch information