gdb: xtensa: fix test for privileged register number
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 21 Feb 2017 23:41:31 +0000 (15:41 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 27 Mar 2017 20:00:55 +0000 (13:00 -0700)
commit0d0bf81a6729478563c3851ccfca435222ddfa25
treee58a00716f61038160423aef6b22ceaf663e4616
parent1a09b50a463ad005946849540da136b5cbe6237b
gdb: xtensa: fix test for privileged register number

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.
gdb/ChangeLog
gdb/xtensa-tdep.c