This is the mail archive of the gdb-patches@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]

Re: [PATCH] gdb/riscv: Improve non-dwarf stack unwinding


> > Are you sure you want to assert on the register number? What if
> > the instruction was malformed and the register number ended up
> > being larger than RISCV_NUM_INTEGER_REGS; is that possible?
> 
> Well, it shouldn't happen in the sense that, for a given instruction,
> if it operates on integer registers then the space in the encoding
> should only allow for up to RISCV_NUM_INTEGER_REGS registers (some
> encodings allow for less registers).
> 
> Right now I can't imagine a situation where one of those asserts could
> fire and it's not either a bug in GDB, or a bug in the libopcode field
> extraction code - hence an assert rather than an error.

OK, that's perfect. Thanks for the confirmation!

-- 
Joel


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