There are no a0-a15 pseudoregisters at the top of the register set in
call0 registers layout. All registers above gdbarch_num_regs (gdbarch)
are privileged. Treat them as such. This fixes the following gdb
assertion seen when 'finish' command is invoked:
regcache.c:649: internal-error: register_status
regcache_raw_read(regcache*, int, gdb_byte*):
Assertion `regnum >= 0 && regnum < regcache->descr->nr_raw_registers'
failed.
gdb/
2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
* xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
registers above gdbarch_num_regs (gdbarch) as privileged in
call0 ABI.
+2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
+
+ * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
+ registers above gdbarch_num_regs (gdbarch) as privileged in
+ call0 ABI.
+
2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
* xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
/* We have to find out how to deal with priveleged registers.
Let's treat them as pseudo-registers, but we cannot read/write them. */
- else if (regnum < gdbarch_tdep (gdbarch)->a0_base)
+ else if (gdbarch_tdep (gdbarch)->call_abi == CallAbiCall0Only
+ || regnum < gdbarch_tdep (gdbarch)->a0_base)
{
buffer[0] = (gdb_byte)0;
buffer[1] = (gdb_byte)0;