When recording instructions in a riscv CPU, the function
riscv_process_record works in 2 steps: first, it disassembles the
current instruction and creates std::vectors with all the data that will
be changed (in the "record" method), and then those get added to the
history in a helper function. If the disassembly fails, the
process_record function will add a new "end instruction" marker to the
recorded history.
And that is where the issue happens. Because the previous instruction
must already have added an "end" marker and no new information has been
added, since it was only disassembly, the end result is having an empty
instruction in the history, which will be fully redundant. This commit
just removes the end marker addition.
Approved-By: Guinevere Larsen <guinevere@redhat.com>
riscv_recorded_insn insn;
if (!insn.record (gdbarch, regcache, addr))
- {
- record_full_arch_list_add_end ();
- return -1;
- }
+ return -1;
int ret_val = riscv_record_insn_details (gdbarch, regcache, insn);