]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Remove use of deprecated core functions (in NetBSD/ARM) users/cbiesinger/arm-nbsd
authorChristian Biesinger <cbiesinger@google.com>
Thu, 5 Mar 2020 21:32:54 +0000 (15:32 -0600)
committerChristian Biesinger <cbiesinger@google.com>
Fri, 6 Mar 2020 00:15:14 +0000 (18:15 -0600)
commitd05eef2037f6924ba3903ecf32608f53b0a58686
tree72226e75c5cbd5ff7320770e091e4b0beb9df0af
parent46f9f93119daaa8eceb7233a17759e10e858c9fd
Remove use of deprecated core functions (in NetBSD/ARM)

This is in preparation for deleting deprecated_add_core_fns and
related code.

As a side-effect, this makes it possible to read NetBSD/ARM
core files on non-NetBSD/ARM platforms, subject to PR corefiles/25638.

I have removed this comment:
-  /* This is ok: we're running native...  */
Since we are using the gdbarch from the regcache, we should be
guaranteed to be calling the right function here, so it shouldn't
matter whether we are running native.

Tested by reading a NetBSD/ARM core file on Linux/x86-64 and NetBSD/ARM;
the "info registers" output matches the one from the system GDB.

gdb/ChangeLog:

2020-03-05  Christian Biesinger  <cbiesinger@google.com>

* Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
* arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
renamed to arm_nbsd_supply_gregset.
(fetch_register): Update to call arm_nbsd_supply_gregset.
(fetch_regs): Remove in favor of fetch_register with a -1 regno.
(arm_netbsd_nat_target::fetch_registers): Update.
(fetch_elfcore_registers): Removed.
(_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
* arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
(arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
not require NetBSD system headers.
(arm_nbsd_regset): New struct.
(arm_nbsd_iterate_over_regset_sections): New function.
(arm_netbsd_init_abi_common): Updated to call
set_gdbarch_iterate_over_regset_sections.
* arm-nbsd-tdep.h: New file.
gdb/Makefile.in
gdb/arm-nbsd-nat.c
gdb/arm-nbsd-tdep.c
gdb/arm-nbsd-tdep.h [new file with mode: 0644]