mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
sim: riscv: Fix crash during instruction decoding
The match_never() function has been removed and thus step_once() crashes during instruction decoding. Fixed it by checking for null pointer before invoking function attached to match_func member of riscv_opcode structure
This commit is contained in:
committed by
Mike Frysinger
parent
8fed036bef
commit
b783d068d9
@@ -1040,7 +1040,7 @@ void step_once (SIM_CPU *cpu)
|
||||
for (; op->name; op++)
|
||||
{
|
||||
/* Does the opcode match? */
|
||||
if (! op->match_func (op, iw))
|
||||
if (! op->match_func || ! op->match_func (op, iw))
|
||||
continue;
|
||||
/* Is this a pseudo-instruction and may we print it as such? */
|
||||
if (op->pinfo & INSN_ALIAS)
|
||||
|
||||
Reference in New Issue
Block a user