Remove use of deprecated_add_core_fns in cris_tdep.c
authorChristian Biesinger <cbiesinger@google.com>
Tue, 11 Feb 2020 16:39:35 +0000 (10:39 -0600)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 11 Feb 2020 16:40:05 +0000 (10:40 -0600)
commit69ed9b74b61359d43a6f5f5a295c3cfb7f3ee61c
tree8f26400b7fe10291763e8f5078f67cc186f7068a
parentf6be87130b5b327075a09c05e78532816f186995
Remove use of deprecated_add_core_fns in cris_tdep.c

The non-deprecated equivalent is implementing the gdbarch function
iterate_over_regset_sections, this patch does that.

Tested by generating a core file on cris under qemu and comparing
the output of "info registers".

This also fixes this warning when loading cris core files:
  warning: Unexpected size of section `.reg/164' in core file.

gdb/ChangeLog:

2020-02-11  Christian Biesinger  <cbiesinger@google.com>

* cris-tdep.c (cris_supply_gregset): Change signature to match
what struct regset expects.
(cris_regset): New struct.
(fetch_core_registers): Remove.
(cris_iterate_over_regset_sections): New function.
(_initialize_cris_tdep): Don't call deprecated_add_core_fns.
(cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.

Change-Id: Ieef895b5a2fdc797d1a913cd1c0c07563edfe8e7
gdb/ChangeLog
gdb/cris-tdep.c