aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-nbsd-tdep.h
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2020-03-05 15:32:54 -0600
committerChristian Biesinger <cbiesinger@google.com>2020-03-12 12:23:17 -0500
commit8dd8e1c7228d5dd57b3b36379718c806017988e1 (patch)
treeb7a94a6b989cdccf0b3c09cb727bbef7322203b9 /gdb/arm-nbsd-tdep.h
parent7a20f753ef28251e4d3bca211e9ee338f67aa2a8 (diff)
downloadgdb-8dd8e1c7228d5dd57b3b36379718c806017988e1.zip
gdb-8dd8e1c7228d5dd57b3b36379718c806017988e1.tar.gz
gdb-8dd8e1c7228d5dd57b3b36379718c806017988e1.tar.bz2
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-12 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.
Diffstat (limited to 'gdb/arm-nbsd-tdep.h')
-rw-r--r--gdb/arm-nbsd-tdep.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/arm-nbsd-tdep.h b/gdb/arm-nbsd-tdep.h
new file mode 100644
index 0000000..1b35395
--- /dev/null
+++ b/gdb/arm-nbsd-tdep.h
@@ -0,0 +1,27 @@
+/* NetBSD/ARM support.
+
+ Copyright (C) 2020 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef ARM_NBSD_TDEP_H
+#define ARM_NBSD_TDEP_H
+
+void arm_nbsd_supply_gregset
+ (const struct regset *regset, struct regcache *regcache,
+ int regnum, const void *gregs, size_t len);
+
+#endif