This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdb/riscv: Don't error when decoding a 6 or 8 byte instruction


*** TEST RESULTS FOR COMMIT 312617a3d06b8df67b9f4f63f92ebfaa6b591921 ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: 312617a3d06b8df67b9f4f63f92ebfaa6b591921

gdb/riscv: Don't error when decoding a 6 or 8 byte instruction

If the RISC-V prologue scanner finds a 6 or 8 byte instruction we
currently throw an internal error, which is not great for the user.

A mechanism already exists in the prologue scanner to leave
instructions marked as unknown so that we can stop the prologue scan
without raising an error, this is used for all 2 and 4 byte
instructions that are not part of the small set the prologue scanner
actually understands.

This commit changes GDB so that all 6 and 8 byte instructions are
marked as unknown, rather than causing an error.

gdb/ChangeLog:

	* riscv-tdep.c (riscv_insn::decode): Gracefully ignore
	instructions of lengths 6 or 8 bytes.

gdb/testsuite/ChangeLog:

	* gdb.arch/riscv-unwind-long-insn-6.s: New file.
	* gdb.arch/riscv-unwind-long-insn-8.s: New file.
	* gdb.arch/riscv-unwind-long-insn.c: New file.
	* gdb.arch/riscv-unwind-long-insn.exp: New file.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]