aboutsummaryrefslogtreecommitdiff
path: root/devel/gdb/files/extrapatch-kgdb
diff options
context:
space:
mode:
Diffstat (limited to 'devel/gdb/files/extrapatch-kgdb')
-rw-r--r--devel/gdb/files/extrapatch-kgdb311
1 files changed, 188 insertions, 123 deletions
diff --git a/devel/gdb/files/extrapatch-kgdb b/devel/gdb/files/extrapatch-kgdb
index 9fd4bdc03c63..f9098cc19de8 100644
--- a/devel/gdb/files/extrapatch-kgdb
+++ b/devel/gdb/files/extrapatch-kgdb
@@ -1,8 +1,8 @@
diff --git gdb/Makefile.in gdb/Makefile.in
-index 4808357e65..982af063b8 100644
+index 9c0a0bff2cd..0e62786dd31 100644
--- gdb/Makefile.in
+++ gdb/Makefile.in
-@@ -665,6 +665,7 @@ TARGET_OBS = @TARGET_OBS@
+@@ -704,6 +704,7 @@ ALL_AMD_DBGAPI_TARGET_OBS = \
# All target-dependent objects files that require 64-bit CORE_ADDR
# (used with --enable-targets=all --enable-64-bit-bfd).
ALL_64_TARGET_OBS = \
@@ -10,31 +10,45 @@ index 4808357e65..982af063b8 100644
aarch64-fbsd-tdep.o \
aarch64-linux-tdep.o \
aarch64-newlib-tdep.o \
-@@ -679,6 +680,7 @@ ALL_64_TARGET_OBS = \
+@@ -718,6 +719,7 @@ ALL_64_TARGET_OBS = \
amd64-darwin-tdep.o \
amd64-dicos-tdep.o \
amd64-fbsd-tdep.o \
+ amd64fbsd-kern.o \
amd64-linux-tdep.o \
- amd64-nbsd-tdep.o \
+ amd64-netbsd-tdep.o \
amd64-obsd-tdep.o \
-@@ -693,6 +695,7 @@ ALL_64_TARGET_OBS = \
+@@ -737,18 +739,21 @@ ALL_64_TARGET_OBS = \
ia64-vms-tdep.o \
+ loongarch-linux-tdep.o \
+ loongarch-tdep.o \
++ mipsfbsd-kern.o \
+ mips-fbsd-tdep.o \
+ mips-linux-tdep.o \
+ mips-netbsd-tdep.o \
+ mips-sde-tdep.o \
+ mips-tdep.o \
mips64-obsd-tdep.o \
++ riscv-fbsd-kern.o \
+ riscv-fbsd-tdep.o \
+ riscv-linux-tdep.o \
+ riscv-none-tdep.o \
+ riscv-ravenscar-thread.o \
+ riscv-tdep.o \
sparc64-fbsd-tdep.o \
+ sparc64fbsd-kern.o \
sparc64-linux-tdep.o \
- sparc64-nbsd-tdep.o \
+ sparc64-netbsd-tdep.o \
sparc64-obsd-tdep.o \
-@@ -713,6 +716,7 @@ ALL_TARGET_OBS = \
+@@ -773,6 +778,7 @@ ALL_TARGET_OBS = \
+ arch/loongarch.o \
arch/ppc-linux-common.o \
- arch/riscv.o \
arm-bsd-tdep.o \
+ arm-fbsd-kern.o \
arm-fbsd-tdep.o \
arm-linux-tdep.o \
- arm-nbsd-tdep.o \
-@@ -731,6 +735,8 @@ ALL_TARGET_OBS = \
+ arm-netbsd-tdep.o \
+@@ -790,6 +796,8 @@ ALL_TARGET_OBS = \
csky-linux-tdep.o \
csky-tdep.o \
dicos-tdep.o \
@@ -43,77 +57,31 @@ index 4808357e65..982af063b8 100644
fbsd-tdep.o \
frv-linux-tdep.o \
frv-tdep.o \
-@@ -746,6 +752,7 @@ ALL_TARGET_OBS = \
+@@ -804,6 +812,7 @@ ALL_TARGET_OBS = \
+ i386-bsd-tdep.o \
i386-darwin-tdep.o \
i386-dicos-tdep.o \
- i386-fbsd-tdep.o \
+ i386fbsd-kern.o \
+ i386-fbsd-tdep.o \
i386-gnu-tdep.o \
i386-go32-tdep.o \
- i386-linux-tdep.o \
-@@ -770,6 +777,7 @@ ALL_TARGET_OBS = \
- mep-tdep.o \
- microblaze-linux-tdep.o \
- microblaze-tdep.o \
-+ mipsfbsd-kern.o \
- mips-fbsd-tdep.o \
- mips-linux-tdep.o \
- mips-nbsd-tdep.o \
-@@ -788,6 +796,7 @@ ALL_TARGET_OBS = \
+@@ -841,6 +850,7 @@ ALL_TARGET_OBS = \
+ obsd-tdep.o \
or1k-linux-tdep.o \
or1k-tdep.o \
- ppc-fbsd-tdep.o \
+ ppcfbsd-kern.o \
+ ppc-fbsd-tdep.o \
ppc-linux-tdep.o \
- ppc-nbsd-tdep.o \
- ppc-obsd-tdep.o \
-@@ -795,6 +804,7 @@ ALL_TARGET_OBS = \
- ppc-sysv-tdep.o \
- ppc64-tdep.o \
- ravenscar-thread.o \
-+ riscv-fbsd-kern.o \
- riscv-fbsd-tdep.o \
- riscv-linux-tdep.o \
- riscv-ravenscar-thread.o \
-@@ -1606,7 +1616,7 @@ generated_files = \
- # Flags needed to compile Python code
- PYTHON_CFLAGS = @PYTHON_CFLAGS@
-
--all: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb
-+all: gdb$(EXEEXT) kgdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb
- @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
-
- # Rule for compiling .c files in the top-level gdb directory.
-@@ -1871,6 +1881,12 @@ ifneq ($(CODESIGN_CERT),)
- $(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT)
- endif
-
-+kgdb$(EXEEXT): kgdb-main.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
-+ $(SILENCE) rm -f kgdb$(EXEEXT)
-+ $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
-+ -o kgdb$(EXEEXT) kgdb-main.o $(LIBGDB_OBS) \
-+ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
-+
- # Convenience rule to handle recursion.
- .PHONY: all-data-directory
- all-data-directory: data-directory/Makefile
-@@ -1911,6 +1927,7 @@ clean mostlyclean: $(CONFIG_CLEAN)
- rm -f init.c stamp-init version.c stamp-version
- rm -f gdb$(EXEEXT) core make.log
- rm -f gdb[0-9]$(EXEEXT)
-+ rm -f kgdb$(EXEEXT)
- rm -f test-cp-name-parser$(EXEEXT)
- rm -f xml-builtin.c stamp-xml
- rm -f $(DEPDIR)/*
-@@ -2106,6 +2123,7 @@ MAKEOVERRIDES =
-
- ALLDEPFILES = \
+ ppc-netbsd-tdep.o \
+@@ -1642,6 +1652,7 @@ ALLDEPFILES = \
+ arch/riscv.c \
+ arch/tic6x.c \
aarch32-tdep.c \
+ aarch64-fbsd-kern.c \
aarch64-fbsd-nat.c \
aarch64-fbsd-tdep.c \
aarch64-linux-nat.c \
-@@ -2125,6 +2143,7 @@ ALLDEPFILES = \
+@@ -1662,6 +1673,7 @@ ALLDEPFILES = \
amd64-bsd-nat.c \
amd64-darwin-tdep.c \
amd64-dicos-tdep.c \
@@ -121,15 +89,15 @@ index 4808357e65..982af063b8 100644
amd64-fbsd-nat.c \
amd64-fbsd-tdep.c \
amd64-linux-nat.c \
-@@ -2139,6 +2158,7 @@ ALLDEPFILES = \
+@@ -1678,6 +1690,7 @@ ALLDEPFILES = \
+ arc-linux-nat.c \
arc-tdep.c \
- arm.c \
arm-bsd-tdep.c \
+ arm-fbsd-kern.c \
arm-fbsd-nat.c \
arm-fbsd-tdep.c \
- arm-get-next-pcs.c \
-@@ -2160,6 +2180,9 @@ ALLDEPFILES = \
+ arm-linux-nat.c \
+@@ -1697,6 +1710,9 @@ ALLDEPFILES = \
csky-tdep.c \
darwin-nat.c \
dicos-tdep.c \
@@ -139,7 +107,7 @@ index 4808357e65..982af063b8 100644
fbsd-nat.c \
fbsd-tdep.c \
fork-child.c \
-@@ -2180,6 +2203,7 @@ ALLDEPFILES = \
+@@ -1717,6 +1733,7 @@ ALLDEPFILES = \
i386-darwin-nat.c \
i386-darwin-tdep.c \
i386-dicos-tdep.c \
@@ -147,7 +115,7 @@ index 4808357e65..982af063b8 100644
i386-fbsd-nat.c \
i386-fbsd-tdep.c \
i386-gnu-nat.c \
-@@ -2217,6 +2241,7 @@ ALLDEPFILES = \
+@@ -1757,6 +1774,7 @@ ALLDEPFILES = \
microblaze-linux-tdep.c \
microblaze-tdep.c \
mingw-hdep.c \
@@ -155,15 +123,15 @@ index 4808357e65..982af063b8 100644
mips-fbsd-nat.c \
mips-fbsd-tdep.c \
mips-linux-nat.c \
-@@ -2236,6 +2261,7 @@ ALLDEPFILES = \
- obsd-nat.c \
+@@ -1777,6 +1795,7 @@ ALLDEPFILES = \
obsd-tdep.c \
+ or1k-linux-nat.c \
posix-hdep.c \
+ ppcfbsd-kern.c \
ppc-fbsd-nat.c \
ppc-fbsd-tdep.c \
ppc-linux-nat.c \
-@@ -2250,6 +2276,7 @@ ALLDEPFILES = \
+@@ -1791,6 +1810,7 @@ ALLDEPFILES = \
procfs.c \
ravenscar-thread.c \
remote-sim.c \
@@ -171,7 +139,7 @@ index 4808357e65..982af063b8 100644
riscv-fbsd-nat.c \
riscv-fbsd-tdep.c \
riscv-linux-nat.c \
-@@ -2286,6 +2313,7 @@ ALLDEPFILES = \
+@@ -1828,6 +1848,7 @@ ALLDEPFILES = \
sparc-sol2-nat.c \
sparc-sol2-tdep.c \
sparc-tdep.c \
@@ -179,7 +147,37 @@ index 4808357e65..982af063b8 100644
sparc64-fbsd-nat.c \
sparc64-fbsd-tdep.c \
sparc64-linux-nat.c \
-@@ -2544,7 +2572,7 @@ endif
+@@ -1915,7 +1936,7 @@ generated_files = \
+ # Flags needed to compile Python code
+ PYTHON_CFLAGS = @PYTHON_CFLAGS@
+
+-all: gdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb
++all: gdb$(EXEEXT) kgdb$(EXEEXT) $(CONFIG_ALL) gdb-gdb.py gdb-gdb.gdb
+ @$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=$(SUBDIRS)" subdir_do
+
+ # Rule for compiling .c files in the top-level gdb directory.
+@@ -2178,6 +2199,12 @@ ifneq ($(CODESIGN_CERT),)
+ $(ECHO_SIGN) $(CODESIGN) -s $(CODESIGN_CERT) gdb$(EXEEXT)
+ endif
+
++kgdb$(EXEEXT): kgdb-main.o $(LIBGDB_OBS) $(CDEPS) $(TDEPLIBS)
++ $(SILENCE) rm -f kgdb$(EXEEXT)
++ $(ECHO_CXXLD) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
++ -o kgdb$(EXEEXT) kgdb-main.o $(LIBGDB_OBS) \
++ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
++
+ # This is useful when debugging GDB, because some Unix's don't let you run GDB
+ # on itself without copying the executable. So "make gdb1" will make
+ # gdb and put a copy in gdb1, and you can run it with "gdb gdb1".
+@@ -2213,6 +2240,7 @@ clean mostlyclean: $(CONFIG_CLEAN)
+ rm -f init.c stamp-init version.c stamp-version
+ rm -f gdb$(EXEEXT) core make.log
+ rm -f gdb[0-9]$(EXEEXT)
++ rm -f kgdb$(EXEEXT)
+ rm -f test-cp-name-parser$(EXEEXT)
+ rm -f xml-builtin.c stamp-xml
+ rm -f $(DEPDIR)/*
+@@ -2636,7 +2664,7 @@ endif
# A list of all the objects we might care about in this build, for
# dependency tracking.
@@ -189,12 +187,12 @@ index 4808357e65..982af063b8 100644
# All the .deps files to include.
diff --git gdb/config.in gdb/config.in
-index 9755458f9c..4a1f7a924c 100644
+index e17245156d8..e1be9fdbc40 100644
--- gdb/config.in
+++ gdb/config.in
-@@ -217,6 +217,12 @@
- /* Define to 1 if your system has the kinfo_getvmmap function. */
- #undef HAVE_KINFO_GETVMMAP
+@@ -229,6 +229,12 @@
+ /* Define to 1 if you have the `kinfo_getfile' function. */
+ #undef HAVE_KINFO_GETFILE
+/* Define to 1 if your system has the kvm_kerndisp function. */
+#undef HAVE_KVM_DISP
@@ -206,11 +204,11 @@ index 9755458f9c..4a1f7a924c 100644
#undef HAVE_LANGINFO_CODESET
diff --git gdb/configure gdb/configure
-index e7811e807a..0a6a1304ce 100755
+index 5361bf42952..9f4c500fd22 100755
--- gdb/configure
+++ gdb/configure
-@@ -8331,6 +8331,126 @@ $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
- fi
+@@ -19724,6 +19724,126 @@ fi
+
+# kgdb needs kvm_open2 for cross-debugging
@@ -334,15 +332,15 @@ index e7811e807a..0a6a1304ce 100755
+
+
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
+ # Check whether --with-zstd was given.
+ if test "${with_zstd+set}" = set; then :
diff --git gdb/configure.ac gdb/configure.ac
-index 620ae23e34..9186b54386 100644
+index 3912b77b27f..bc960202b22 100644
--- gdb/configure.ac
+++ gdb/configure.ac
-@@ -480,6 +480,16 @@ AC_SEARCH_LIBS(kinfo_getvmmap, util util-freebsd,
- [AC_DEFINE(HAVE_KINFO_GETVMMAP, 1,
- [Define to 1 if your system has the kinfo_getvmmap function. ])])
+@@ -516,6 +516,16 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
+ AM_ZLIB
+ AC_ZSTD
+# kgdb needs kvm_open2 for cross-debugging
+AC_SEARCH_LIBS(kvm_open2, kvm,
@@ -358,7 +356,7 @@ index 620ae23e34..9186b54386 100644
# GDB may fork/exec the iconv program to get the list of supported character
diff --git gdb/configure.nat gdb/configure.nat
-index 3e94a064ae..6b73f8dd90 100644
+index 1dc4206b69c..cb46e1505c7 100644
--- gdb/configure.nat
+++ gdb/configure.nat
@@ -63,7 +63,8 @@ case ${gdb_host} in
@@ -372,19 +370,19 @@ index 3e94a064ae..6b73f8dd90 100644
LOADLIBES='-lkvm'
;;
diff --git gdb/configure.tgt gdb/configure.tgt
-index a3e11c4b9b..1d8b6f10a0 100644
+index 47a674201f9..4b4b6893edf 100644
--- gdb/configure.tgt
+++ gdb/configure.tgt
-@@ -101,7 +101,7 @@ esac
+@@ -122,7 +122,7 @@ esac
case "${targ}" in
*-*-freebsd* | *-*-kfreebsd*-gnu)
- os_obs="fbsd-tdep.o solib-svr4.o";;
+ os_obs="fbsd-tdep.o solib-svr4.o fbsd-kld.o fbsd-kthr.o";;
*-*-netbsd* | *-*-knetbsd*-gnu)
- os_obs="nbsd-tdep.o solib-svr4.o";;
+ os_obs="netbsd-tdep.o solib-svr4.o";;
*-*-openbsd*)
-@@ -118,7 +118,7 @@ aarch64*-*-elf | aarch64*-*-rtems*)
+@@ -139,7 +139,7 @@ aarch64*-*-elf | aarch64*-*-rtems*)
aarch64*-*-freebsd*)
# Target: FreeBSD/aarch64
@@ -393,7 +391,7 @@ index a3e11c4b9b..1d8b6f10a0 100644
;;
aarch64*-*-linux*)
-@@ -173,7 +173,7 @@ arm*-*-linux*)
+@@ -202,7 +202,7 @@ arm*-*-linux*)
;;
arm*-*-freebsd*)
# Target: FreeBSD/arm
@@ -402,7 +400,7 @@ index a3e11c4b9b..1d8b6f10a0 100644
;;
arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
# Target: NetBSD/arm
-@@ -277,7 +277,11 @@ i[34567]86-*-dicos*)
+@@ -294,7 +294,11 @@ i[34567]86-*-dicos*)
;;
i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
# Target: FreeBSD/i386
@@ -415,16 +413,16 @@ index a3e11c4b9b..1d8b6f10a0 100644
;;
i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
# Target: NetBSD/i386
-@@ -423,7 +427,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
+@@ -434,7 +438,7 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
;;
mips*-*-freebsd*)
# Target: MIPS running FreeBSD
- gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o"
+ gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o mipsfbsd-kern.o"
- gdb_sim=../sim/mips/libsim.a
;;
mips64*-*-openbsd*)
-@@ -489,7 +493,7 @@ or1k-*-* | or1knd-*-*)
+ # Target: OpenBSD/mips64
+@@ -492,7 +496,7 @@ or1k-*-* | or1knd-*-*)
powerpc*-*-freebsd*)
# Target: FreeBSD/powerpc
gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \
@@ -442,7 +440,7 @@ index a3e11c4b9b..1d8b6f10a0 100644
;;
riscv*-*-linux*)
-@@ -616,6 +620,7 @@ sparc64-*-linux*)
+@@ -606,6 +610,7 @@ sparc64-*-linux*)
sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu)
# Target: FreeBSD/sparc64
gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \
@@ -450,7 +448,7 @@ index a3e11c4b9b..1d8b6f10a0 100644
ravenscar-thread.o sparc-ravenscar-thread.o"
;;
sparc-*-netbsd* | sparc-*-knetbsd*-gnu)
-@@ -735,8 +740,8 @@ x86_64-*-linux*)
+@@ -722,8 +727,8 @@ x86_64-*-linux*)
;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
# Target: FreeBSD/amd64
@@ -462,10 +460,10 @@ index a3e11c4b9b..1d8b6f10a0 100644
x86_64-*-mingw* | x86_64-*-cygwin*)
# Target: MingW/amd64
diff --git gdb/osabi.c gdb/osabi.c
-index 627b9d9815..45a2fc6ade 100644
+index ad3dad5b849..29e8578d031 100644
--- gdb/osabi.c
+++ gdb/osabi.c
-@@ -66,6 +66,7 @@ static const struct osabi_names gdb_osabi_names[] =
+@@ -67,6 +67,7 @@ static const struct osabi_names gdb_osabi_names[] =
{ "Solaris", NULL },
{ "GNU/Linux", "linux(-gnu[^-]*)?" },
{ "FreeBSD", NULL },
@@ -474,7 +472,7 @@ index 627b9d9815..45a2fc6ade 100644
{ "OpenBSD", NULL },
{ "WindowsCE", NULL },
diff --git gdb/osabi.h gdb/osabi.h
-index a7e6a10d01..07cef9bee3 100644
+index 35f14ec433c..1276d34d5f7 100644
--- gdb/osabi.h
+++ gdb/osabi.h
@@ -31,6 +31,7 @@ enum gdb_osabi
@@ -486,10 +484,10 @@ index a7e6a10d01..07cef9bee3 100644
GDB_OSABI_OPENBSD,
GDB_OSABI_WINCE,
diff --git gdb/regcache.c gdb/regcache.c
-index 91d3202b94..903b3d0d86 100644
+index 91b20b7a2a2..0cfa1bae3d9 100644
--- gdb/regcache.c
+++ gdb/regcache.c
-@@ -1108,6 +1108,22 @@ reg_buffer::raw_supply_zeroed (int regnum)
+@@ -1123,6 +1123,22 @@ reg_buffer::raw_supply_zeroed (int regnum)
m_register_status[regnum] = REG_VALID;
}
@@ -512,11 +510,91 @@ index 91d3202b94..903b3d0d86 100644
/* See gdbsupport/common-regcache.h. */
void
+@@ -1289,6 +1305,53 @@ regcache::collect_regset (const struct regset *regset, int regbase,
+ size);
+ }
+
++/* See regcache.h */
++
++int
++regcache_map_entry_size (const struct regcache_map_entry *map, gdbarch *gdbarch)
++{
++ int size = 0, count;
++
++ for (; (count = map->count) != 0; map++)
++ {
++ int regno = map->regno;
++ int slot_size = map->size;
++
++ if (slot_size == 0 && regno != REGCACHE_MAP_SKIP)
++ slot_size = register_size (gdbarch, regno);
++
++ size += count * slot_size;
++ }
++ return size;
++}
++
++/* See regcache.h */
++
++int
++regcache_map_offset (const struct regcache_map_entry *map, int regnum,
++ gdbarch *gdbarch)
++{
++ int offs = 0, count;
++
++ for (; (count = map->count) != 0; map++)
++ {
++ int regno = map->regno;
++ int slot_size = map->size;
++
++ if (slot_size == 0 && regno != REGCACHE_MAP_SKIP)
++ slot_size = register_size (gdbarch, regno);
++
++ if (regno != REGCACHE_MAP_SKIP && regnum >= regno
++ && regnum < regno + count)
++ return offs + (regno - regnum) * slot_size;
++
++ offs += count * slot_size;
++ }
++ return -1;
++}
++
++/* See regcache.h */
++
+ bool
+ regcache_map_supplies (const struct regcache_map_entry *map, int regnum,
+ struct gdbarch *gdbarch, size_t size)
diff --git gdb/regcache.h gdb/regcache.h
-index 9390f5708e..62920a5b7f 100644
+index 57ddac465f0..b9f62994901 100644
--- gdb/regcache.h
+++ gdb/regcache.h
-@@ -228,6 +228,8 @@ class reg_buffer : public reg_buffer_common
+@@ -133,6 +133,11 @@ regcache_map_entry_size (const struct regcache_map_entry *map)
+ return size;
+ }
+
++/* Same as above, but accepts a gdbarch to handle entries with a
++ variable register size. */
++extern int regcache_map_entry_size (const struct regcache_map_entry *map,
++ gdbarch *gdbarch);
++
+ /* Transfer a set of registers (as described by REGSET) between
+ REGCACHE and BUF. If REGNUM == -1, transfer all registers
+ belonging to the regset, otherwise just the register numbered
+@@ -151,6 +156,13 @@ extern void regcache_collect_regset (const struct regset *regset,
+ int regnum, void *buf, size_t size);
+
+
++/* Return the offset of REGNUM in a block of registers described by an
++ array of regcache_map_entries. If the register is not found,
++ returns -1. */
++
++extern int regcache_map_offset (const struct regcache_map_entry *map,
++ int regnum, gdbarch *gdbarch);
++
+ /* Return true if a set of registers contains the value of the
+ register numbered REGNUM. The size of the set of registers is
+ given in SIZE, and the layout of the set of registers is described
+@@ -238,6 +250,8 @@ class reg_buffer : public reg_buffer_common
only LEN, without editing the rest of the register. */
void raw_supply_part (int regnum, int offset, int len, const gdb_byte *in);
@@ -525,16 +603,3 @@ index 9390f5708e..62920a5b7f 100644
void invalidate (int regnum);
virtual ~reg_buffer () = default;
-diff --git gnulib/configure gnulib/configure
-index ef7f6d5e80..536a0b4812 100644
---- gnulib/configure
-+++ gnulib/configure
-@@ -20747,6 +20747,8 @@ else
- *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # Guess all is fine on musl systems.
- *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
-+ # Guess all is fine on FreeBSD.
-+ freebsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.