aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-04-22 16:10:14 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2024-04-22 21:34:19 -0400
commitec4525259262492b61fb9bd2f9acdf156ab037fc (patch)
tree73e3cf9b3f4049db32037f6ede09abd6dd08ec71
parent15afb100ea6bc04d8944a919bf58c5c3fb8c20ec (diff)
downloadgdb-ec4525259262492b61fb9bd2f9acdf156ab037fc.zip
gdb-ec4525259262492b61fb9bd2f9acdf156ab037fc.tar.gz
gdb-ec4525259262492b61fb9bd2f9acdf156ab037fc.tar.bz2
gdb: move store/extract integer functions to extract-store-integer.{c,h}
Move the declarations out of defs.h, and the implementations out of findvar.c. I opted for a new file, because this functionality of converting integers to bytes and vice-versa seems a bit to generic to live in findvar.c. Change-Id: I524858fca33901ee2150c582bac16042148d2251 Approved-By: John Baldwin <jhb@FreeBSD.org>
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/aarch64-fbsd-tdep.c1
-rw-r--r--gdb/aarch64-linux-tdep.c1
-rw-r--r--gdb/aarch64-tdep.c1
-rw-r--r--gdb/ada-lang.c1
-rw-r--r--gdb/ada-tasks.c1
-rw-r--r--gdb/ada-valprint.c1
-rw-r--r--gdb/alpha-tdep.c1
-rw-r--r--gdb/amd64-darwin-tdep.c1
-rw-r--r--gdb/amd64-linux-tdep.c1
-rw-r--r--gdb/amd64-obsd-tdep.c1
-rw-r--r--gdb/amd64-tdep.c1
-rw-r--r--gdb/amd64-windows-tdep.c1
-rw-r--r--gdb/arc-tdep.c1
-rw-r--r--gdb/arch-utils.c1
-rw-r--r--gdb/arm-linux-tdep.c1
-rw-r--r--gdb/arm-none-tdep.c1
-rw-r--r--gdb/arm-tdep.c1
-rw-r--r--gdb/auxv.c1
-rw-r--r--gdb/avr-tdep.c1
-rw-r--r--gdb/bfin-linux-tdep.c1
-rw-r--r--gdb/bfin-tdep.c1
-rw-r--r--gdb/bsd-uthread.c1
-rw-r--r--gdb/c-lang.c1
-rw-r--r--gdb/c-valprint.c1
-rw-r--r--gdb/corefile.c1
-rw-r--r--gdb/cp-valprint.c1
-rw-r--r--gdb/cris-tdep.c1
-rw-r--r--gdb/csky-tdep.c1
-rw-r--r--gdb/darwin-nat.c1
-rw-r--r--gdb/defs.h89
-rw-r--r--gdb/dtrace-probe.c1
-rw-r--r--gdb/dwarf2/index-common.h2
-rw-r--r--gdb/elfread.c1
-rw-r--r--gdb/extract-store-integer.c308
-rw-r--r--gdb/extract-store-integer.h111
-rw-r--r--gdb/fbsd-tdep.c1
-rw-r--r--gdb/findvar.c239
-rw-r--r--gdb/frame-unwind.c1
-rw-r--r--gdb/frame.c1
-rw-r--r--gdb/frv-linux-tdep.c1
-rw-r--r--gdb/frv-tdep.c1
-rw-r--r--gdb/ft32-tdep.c1
-rw-r--r--gdb/gnu-v3-abi.c1
-rw-r--r--gdb/h8300-tdep.c1
-rw-r--r--gdb/hppa-bsd-tdep.c1
-rw-r--r--gdb/hppa-linux-tdep.c1
-rw-r--r--gdb/hppa-tdep.c1
-rw-r--r--gdb/i386-bsd-tdep.c1
-rw-r--r--gdb/i386-darwin-tdep.c1
-rw-r--r--gdb/i386-gnu-tdep.c1
-rw-r--r--gdb/i386-linux-tdep.c1
-rw-r--r--gdb/i386-nto-tdep.c1
-rw-r--r--gdb/i386-obsd-tdep.c1
-rw-r--r--gdb/i386-tdep.c1
-rw-r--r--gdb/i387-tdep.c1
-rw-r--r--gdb/ia64-linux-tdep.c1
-rw-r--r--gdb/ia64-tdep.c1
-rw-r--r--gdb/iq2000-tdep.c1
-rw-r--r--gdb/jit.c1
-rw-r--r--gdb/linux-nat-trad.c1
-rw-r--r--gdb/linux-record.c1
-rw-r--r--gdb/lm32-tdep.c1
-rw-r--r--gdb/loongarch-linux-tdep.c1
-rw-r--r--gdb/loongarch-tdep.c1
-rw-r--r--gdb/m32c-tdep.c1
-rw-r--r--gdb/m32r-linux-tdep.c1
-rw-r--r--gdb/m32r-tdep.c1
-rw-r--r--gdb/m68hc11-tdep.c1
-rw-r--r--gdb/m68k-linux-tdep.c1
-rw-r--r--gdb/m68k-tdep.c1
-rw-r--r--gdb/mep-tdep.c1
-rw-r--r--gdb/mi/mi-main.c1
-rw-r--r--gdb/microblaze-tdep.c1
-rw-r--r--gdb/mips-fbsd-tdep.c1
-rw-r--r--gdb/mips-linux-tdep.c1
-rw-r--r--gdb/mips-netbsd-tdep.c1
-rw-r--r--gdb/mips-tdep.c1
-rw-r--r--gdb/mn10300-tdep.c1
-rw-r--r--gdb/moxie-tdep.c1
-rw-r--r--gdb/msp430-tdep.c1
-rw-r--r--gdb/nds32-tdep.c1
-rw-r--r--gdb/nios2-tdep.c1
-rw-r--r--gdb/nto-tdep.c1
-rw-r--r--gdb/or1k-tdep.c1
-rw-r--r--gdb/p-lang.c1
-rw-r--r--gdb/p-valprint.c1
-rw-r--r--gdb/ppc-fbsd-tdep.c1
-rw-r--r--gdb/ppc-linux-nat.c1
-rw-r--r--gdb/ppc-linux-tdep.c1
-rw-r--r--gdb/ppc-obsd-tdep.c1
-rw-r--r--gdb/ppc-sysv-tdep.c1
-rw-r--r--gdb/ppc64-tdep.c1
-rw-r--r--gdb/printcmd.c1
-rw-r--r--gdb/procfs.c1
-rw-r--r--gdb/ravenscar-thread.c1
-rw-r--r--gdb/record-full.c1
-rw-r--r--gdb/regcache.c1
-rw-r--r--gdb/remote-fileio.c1
-rw-r--r--gdb/riscv-fbsd-tdep.c1
-rw-r--r--gdb/riscv-tdep.c1
-rw-r--r--gdb/rl78-tdep.c1
-rw-r--r--gdb/rs6000-aix-tdep.c1
-rw-r--r--gdb/rs6000-lynx178-tdep.c1
-rw-r--r--gdb/rs6000-tdep.c1
-rw-r--r--gdb/rx-tdep.c1
-rw-r--r--gdb/s390-linux-nat.c1
-rw-r--r--gdb/s390-tdep.c1
-rw-r--r--gdb/sh-tdep.c1
-rw-r--r--gdb/solib-darwin.c1
-rw-r--r--gdb/solib-dsbt.c1
-rw-r--r--gdb/solib-frv.c1
-rw-r--r--gdb/solib-svr4.c1
-rw-r--r--gdb/solib.c1
-rw-r--r--gdb/sparc-linux-tdep.c1
-rw-r--r--gdb/sparc-obsd-tdep.c1
-rw-r--r--gdb/sparc-tdep.c1
-rw-r--r--gdb/sparc64-linux-tdep.c1
-rw-r--r--gdb/sparc64-obsd-tdep.c1
-rw-r--r--gdb/sparc64-tdep.c1
-rw-r--r--gdb/stack.c1
-rw-r--r--gdb/stap-probe.c1
-rw-r--r--gdb/symfile.c1
-rw-r--r--gdb/target.c1
-rw-r--r--gdb/tic6x-tdep.c1
-rw-r--r--gdb/tilegx-tdep.c1
-rw-r--r--gdb/tracefile-tfile.c1
-rw-r--r--gdb/tracefile.c1
-rw-r--r--gdb/trad-frame.c1
-rw-r--r--gdb/tramp-frame.c1
-rw-r--r--gdb/unittests/gmp-utils-selftests.c1
-rw-r--r--gdb/v850-tdep.c1
-rw-r--r--gdb/valarith.c1
-rw-r--r--gdb/valops.c1
-rw-r--r--gdb/valprint.c1
-rw-r--r--gdb/value.c1
-rw-r--r--gdb/vax-tdep.c1
-rw-r--r--gdb/windows-tdep.c1
-rw-r--r--gdb/xstormy16-tdep.c1
-rw-r--r--gdb/xtensa-tdep.c1
-rw-r--r--gdb/z80-tdep.c1
141 files changed, 559 insertions, 327 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 23894ea..618c5bb 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1109,6 +1109,7 @@ COMMON_SFILES = \
dwarf2/read-gdb-index.c \
dwarf2/section.c \
dwarf2/stringify.c \
+ extract-store-integer.c \
eval.c \
event-top.c \
exceptions.c \
@@ -1362,6 +1363,7 @@ HFILES_NO_SRCDIR = \
expression.h \
extension.h \
extension-priv.h \
+ extract-store-integer.h \
f-array-walker.h \
f-lang.h \
fbsd-nat.h \
diff --git a/gdb/aarch64-fbsd-tdep.c b/gdb/aarch64-fbsd-tdep.c
index e2ff57e..844023c 100644
--- a/gdb/aarch64-fbsd-tdep.c
+++ b/gdb/aarch64-fbsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbarch.h"
#include "fbsd-tdep.h"
#include "aarch64-tdep.h"
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 3597987..ad55cf2 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbarch.h"
#include "glibc-tdep.h"
#include "linux-tdep.h"
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 06eda10..a01ae39 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "language.h"
#include "gdbcmd.h"
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index a387002..5ab6e8b 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -19,6 +19,7 @@
#include <ctype.h>
+#include "extract-store-integer.h"
#include "gdbsupport/gdb_regex.h"
#include "frame.h"
#include "symtab.h"
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 864c5cf..547395d 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "observable.h"
#include "gdbcmd.h"
#include "target.h"
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 6acfb9a..6d3fca9 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <ctype.h>
+#include "extract-store-integer.h"
#include "gdbtypes.h"
#include "expression.h"
#include "value.h"
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index c93bd69..ada8afd 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
index b0bead0..f2741e2 100644
--- a/gdb/amd64-darwin-tdep.c
+++ b/gdb/amd64-darwin-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "gdbcore.h"
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 9d560ac..c52b043 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
diff --git a/gdb/amd64-obsd-tdep.c b/gdb/amd64-obsd-tdep.c
index f6f63bb..5b1e77b 100644
--- a/gdb/amd64-obsd-tdep.c
+++ b/gdb/amd64-obsd-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbcore.h"
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 0bb7a24..053067e 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "language.h"
#include "opcode/i386.h"
#include "dis-asm.h"
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index a559d96..3dfc800 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "osabi.h"
#include "amd64-tdep.h"
#include "gdbsupport/x86-xstate.h"
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 5684f32..f35f4c4 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -23,6 +23,7 @@
#include "elf-bfd.h"
#include "disasm.h"
#include "dwarf2/frame.h"
+#include "extract-store-integer.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "gdbcore.h"
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index cb149c3..b8a18a5 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -19,6 +19,7 @@
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "gdbcmd.h"
#include "inferior.h"
#include "infrun.h"
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 8511abc..43869e4 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "target.h"
#include "value.h"
#include "gdbtypes.h"
diff --git a/gdb/arm-none-tdep.c b/gdb/arm-none-tdep.c
index 453e752..4212af3 100644
--- a/gdb/arm-none-tdep.c
+++ b/gdb/arm-none-tdep.c
@@ -19,6 +19,7 @@
#include "arm-tdep.h"
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "regcache.h"
#include "elf-bfd.h"
#include "regset.h"
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index b4062a8..97728d9 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -20,6 +20,7 @@
#include <ctype.h>
+#include "extract-store-integer.h"
#include "frame.h"
#include "language.h"
#include "inferior.h"
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 1dc0587..616564c 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "target.h"
#include "gdbtypes.h"
#include "command.h"
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index be95034..68b2646 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -22,6 +22,7 @@
/* Portions of this file were taken from the original gdb-4.18 patch developed
by Denis Chertykov, denisc@overta.ru */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/bfin-linux-tdep.c b/gdb/bfin-linux-tdep.c
index f67e064..0b1b018 100644
--- a/gdb/bfin-linux-tdep.c
+++ b/gdb/bfin-linux-tdep.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "regcache.h"
#include "tramp-frame.h"
#include "trad-frame.h"
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index dbc339d..b89b7df 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "inferior.h"
#include "gdbcore.h"
#include "arch-utils.h"
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c
index 576a9ec..a686f17 100644
--- a/gdb/bsd-uthread.c
+++ b/gdb/bsd-uthread.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "inferior.h"
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 922bf8c..2b6cf08 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 28a6a6a..ca24b15 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 16cd60f..984c7be 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -19,6 +19,7 @@
#include <signal.h>
#include <fcntl.h>
+#include "extract-store-integer.h"
#include "inferior.h"
#include "symtab.h"
#include "command.h"
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index f2a2ca5..2e776f4 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index dd013d5..8ca9fbc 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -20,6 +20,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index 5f0fd3d..49aa1f6 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbsupport/gdb_assert.h"
#include "frame.h"
#include "inferior.h"
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 0c5b54b..33896a8 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "top.h"
#include "inferior.h"
#include "target.h"
diff --git a/gdb/defs.h b/gdb/defs.h
index be5c9b7..5da8ce7 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -422,95 +422,6 @@ enum symbol_needs_kind
SYMBOL_NEEDS_FRAME
};
-/* In findvar.c. */
-
-template<typename T, typename = RequireLongest<T>>
-T extract_integer (gdb::array_view<const gdb_byte>, enum bfd_endian byte_order);
-
-static inline LONGEST
-extract_signed_integer (gdb::array_view<const gdb_byte> buf,
- enum bfd_endian byte_order)
-{
- return extract_integer<LONGEST> (buf, byte_order);
-}
-
-static inline LONGEST
-extract_signed_integer (const gdb_byte *addr, int len,
- enum bfd_endian byte_order)
-{
- return extract_signed_integer (gdb::array_view<const gdb_byte> (addr, len),
- byte_order);
-}
-
-static inline ULONGEST
-extract_unsigned_integer (gdb::array_view<const gdb_byte> buf,
- enum bfd_endian byte_order)
-{
- return extract_integer<ULONGEST> (buf, byte_order);
-}
-
-static inline ULONGEST
-extract_unsigned_integer (const gdb_byte *addr, int len,
- enum bfd_endian byte_order)
-{
- return extract_unsigned_integer (gdb::array_view<const gdb_byte> (addr, len),
- byte_order);
-}
-
-extern CORE_ADDR extract_typed_address (const gdb_byte *buf,
- struct type *type);
-
-/* All 'store' functions accept a host-format integer and store a
- target-format integer at ADDR which is LEN bytes long. */
-
-template<typename T, typename = RequireLongest<T>>
-extern void store_integer (gdb::array_view<gdb_byte> dst,
- bfd_endian byte_order, T val);
-
-template<typename T>
-static inline void
-store_integer (gdb_byte *addr, int len, bfd_endian byte_order, T val)
-{
- return store_integer (gdb::make_array_view (addr, len), byte_order, val);
-}
-
-static inline void
-store_signed_integer (gdb::array_view<gdb_byte> dst, bfd_endian byte_order,
- LONGEST val)
-{
- return store_integer (dst, byte_order, val);
-}
-
-static inline void
-store_signed_integer (gdb_byte *addr, int len, bfd_endian byte_order,
- LONGEST val)
-{
- return store_signed_integer (gdb::make_array_view (addr, len), byte_order,
- val);
-}
-
-static inline void
-store_unsigned_integer (gdb::array_view<gdb_byte> dst, bfd_endian byte_order,
- ULONGEST val)
-{
- return store_integer (dst, byte_order, val);
-}
-
-static inline void
-store_unsigned_integer (gdb_byte *addr, int len, bfd_endian byte_order,
- ULONGEST val)
-{
- return store_unsigned_integer (gdb::make_array_view (addr, len), byte_order,
- val);
-}
-
-extern void store_typed_address (gdb_byte *buf, struct type *type,
- CORE_ADDR addr);
-
-extern void copy_integer_to_size (gdb_byte *dest, int dest_size,
- const gdb_byte *source, int source_size,
- bool is_signed, enum bfd_endian byte_order);
-
/* Hooks for alternate command interfaces. */
struct target_waitstatus;
diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c
index ad1a3f8..0f4e164 100644
--- a/gdb/dtrace-probe.c
+++ b/gdb/dtrace-probe.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "probe.h"
#include "elf-bfd.h"
#include "gdbtypes.h"
diff --git a/gdb/dwarf2/index-common.h b/gdb/dwarf2/index-common.h
index dca4151..0a871a7 100644
--- a/gdb/dwarf2/index-common.h
+++ b/gdb/dwarf2/index-common.h
@@ -20,6 +20,8 @@
#ifndef DWARF_INDEX_COMMON_H
#define DWARF_INDEX_COMMON_H
+#include "extract-store-integer.h"
+
/* The suffix for an index file. */
#define INDEX4_SUFFIX ".gdb-index"
#define INDEX5_SUFFIX ".debug_names"
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 9bfe127..7a6a8ca 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -24,6 +24,7 @@
#include "elf/common.h"
#include "elf/internal.h"
#include "elf/mips.h"
+#include "extract-store-integer.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
diff --git a/gdb/extract-store-integer.c b/gdb/extract-store-integer.c
new file mode 100644
index 0000000..a3b7e40
--- /dev/null
+++ b/gdb/extract-store-integer.c
@@ -0,0 +1,308 @@
+/* Copyright (C) 2024 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/>. */
+
+#include "extract-store-integer.h"
+#include "gdbtypes.h"
+#include "gdbarch.h"
+#include "gdbsupport/selftest.h"
+
+template<typename T, typename>
+T
+extract_integer (gdb::array_view<const gdb_byte> buf, enum bfd_endian byte_order)
+{
+ typename std::make_unsigned<T>::type retval = 0;
+
+ if (buf.size () > (int) sizeof (T))
+ error (_("\
+That operation is not available on integers of more than %d bytes."),
+ (int) sizeof (T));
+
+ /* Start at the most significant end of the integer, and work towards
+ the least significant. */
+ if (byte_order == BFD_ENDIAN_BIG)
+ {
+ size_t i = 0;
+
+ if (std::is_signed<T>::value)
+ {
+ /* Do the sign extension once at the start. */
+ retval = ((LONGEST) buf[i] ^ 0x80) - 0x80;
+ ++i;
+ }
+ for (; i < buf.size (); ++i)
+ retval = (retval << 8) | buf[i];
+ }
+ else
+ {
+ ssize_t i = buf.size () - 1;
+
+ if (std::is_signed<T>::value)
+ {
+ /* Do the sign extension once at the start. */
+ retval = ((LONGEST) buf[i] ^ 0x80) - 0x80;
+ --i;
+ }
+ for (; i >= 0; --i)
+ retval = (retval << 8) | buf[i];
+ }
+ return retval;
+}
+
+/* Explicit instantiations. */
+template LONGEST extract_integer<LONGEST> (gdb::array_view<const gdb_byte> buf,
+ enum bfd_endian byte_order);
+template ULONGEST extract_integer<ULONGEST>
+ (gdb::array_view<const gdb_byte> buf, enum bfd_endian byte_order);
+
+/* Sometimes a long long unsigned integer can be extracted as a
+ LONGEST value. This is done so that we can print these values
+ better. If this integer can be converted to a LONGEST, this
+ function returns 1 and sets *PVAL. Otherwise it returns 0. */
+
+int
+extract_long_unsigned_integer (const gdb_byte *addr, int orig_len,
+ enum bfd_endian byte_order, LONGEST *pval)
+{
+ const gdb_byte *p;
+ const gdb_byte *first_addr;
+ int len;
+
+ len = orig_len;
+ if (byte_order == BFD_ENDIAN_BIG)
+ {
+ for (p = addr;
+ len > (int) sizeof (LONGEST) && p < addr + orig_len;
+ p++)
+ {
+ if (*p == 0)
+ len--;
+ else
+ break;
+ }
+ first_addr = p;
+ }
+ else
+ {
+ first_addr = addr;
+ for (p = addr + orig_len - 1;
+ len > (int) sizeof (LONGEST) && p >= addr;
+ p--)
+ {
+ if (*p == 0)
+ len--;
+ else
+ break;
+ }
+ }
+
+ if (len <= (int) sizeof (LONGEST))
+ {
+ *pval = (LONGEST) extract_unsigned_integer (first_addr,
+ sizeof (LONGEST),
+ byte_order);
+ return 1;
+ }
+
+ return 0;
+}
+
+
+/* Treat the bytes at BUF as a pointer of type TYPE, and return the
+ address it represents. */
+CORE_ADDR
+extract_typed_address (const gdb_byte *buf, struct type *type)
+{
+ gdb_assert (type->is_pointer_or_reference ());
+ return gdbarch_pointer_to_address (type->arch (), type, buf);
+}
+
+/* All 'store' functions accept a host-format integer and store a
+ target-format integer at ADDR which is LEN bytes long. */
+template<typename T, typename>
+void
+store_integer (gdb::array_view<gdb_byte> dst, enum bfd_endian byte_order,
+ T val)
+{
+ gdb_byte *p;
+ gdb_byte *startaddr = dst.data ();
+ gdb_byte *endaddr = startaddr + dst.size ();
+
+ /* Start at the least significant end of the integer, and work towards
+ the most significant. */
+ if (byte_order == BFD_ENDIAN_BIG)
+ {
+ for (p = endaddr - 1; p >= startaddr; --p)
+ {
+ *p = val & 0xff;
+ val >>= 8;
+ }
+ }
+ else
+ {
+ for (p = startaddr; p < endaddr; ++p)
+ {
+ *p = val & 0xff;
+ val >>= 8;
+ }
+ }
+}
+
+/* Explicit instantiations. */
+template void store_integer (gdb::array_view<gdb_byte> dst,
+ bfd_endian byte_order, LONGEST val);
+
+template void store_integer (gdb::array_view<gdb_byte> dst,
+ bfd_endian byte_order, ULONGEST val);
+
+/* Store the address ADDR as a pointer of type TYPE at BUF, in target
+ form. */
+void
+store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr)
+{
+ gdb_assert (type->is_pointer_or_reference ());
+ gdbarch_address_to_pointer (type->arch (), type, buf, addr);
+}
+
+/* Copy a value from SOURCE of size SOURCE_SIZE bytes to DEST of size DEST_SIZE
+ bytes. If SOURCE_SIZE is greater than DEST_SIZE, then truncate the most
+ significant bytes. If SOURCE_SIZE is less than DEST_SIZE then either sign
+ or zero extended according to IS_SIGNED. Values are stored in memory with
+ endianness BYTE_ORDER. */
+
+void
+copy_integer_to_size (gdb_byte *dest, int dest_size, const gdb_byte *source,
+ int source_size, bool is_signed,
+ enum bfd_endian byte_order)
+{
+ signed int size_diff = dest_size - source_size;
+
+ /* Copy across everything from SOURCE that can fit into DEST. */
+
+ if (byte_order == BFD_ENDIAN_BIG && size_diff > 0)
+ memcpy (dest + size_diff, source, source_size);
+ else if (byte_order == BFD_ENDIAN_BIG && size_diff < 0)
+ memcpy (dest, source - size_diff, dest_size);
+ else
+ memcpy (dest, source, std::min (source_size, dest_size));
+
+ /* Fill the remaining space in DEST by either zero extending or sign
+ extending. */
+
+ if (size_diff > 0)
+ {
+ gdb_byte extension = 0;
+ if (is_signed
+ && ((byte_order != BFD_ENDIAN_BIG && source[source_size - 1] & 0x80)
+ || (byte_order == BFD_ENDIAN_BIG && source[0] & 0x80)))
+ extension = 0xff;
+
+ /* Extend into MSBs of SOURCE. */
+ if (byte_order == BFD_ENDIAN_BIG)
+ memset (dest, extension, size_diff);
+ else
+ memset (dest + source_size, extension, size_diff);
+ }
+}
+
+#if GDB_SELF_TEST
+namespace selftests {
+
+/* Function to test copy_integer_to_size. Store SOURCE_VAL with size
+ SOURCE_SIZE to a buffer, making sure no sign extending happens at this
+ stage. Copy buffer to a new buffer using copy_integer_to_size. Extract
+ copied value and compare to DEST_VALU. Copy again with a signed
+ copy_integer_to_size and compare to DEST_VALS. Do everything for both
+ LITTLE and BIG target endians. Use unsigned values throughout to make
+ sure there are no implicit sign extensions. */
+
+static void
+do_cint_test (ULONGEST dest_valu, ULONGEST dest_vals, int dest_size,
+ ULONGEST src_val, int src_size)
+{
+ for (int i = 0; i < 2 ; i++)
+ {
+ gdb_byte srcbuf[sizeof (ULONGEST)] = {};
+ gdb_byte destbuf[sizeof (ULONGEST)] = {};
+ enum bfd_endian byte_order = i ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
+
+ /* Fill the src buffer (and later the dest buffer) with non-zero junk,
+ to ensure zero extensions aren't hidden. */
+ memset (srcbuf, 0xaa, sizeof (srcbuf));
+
+ /* Store (and later extract) using unsigned to ensure there are no sign
+ extensions. */
+ store_unsigned_integer (srcbuf, src_size, byte_order, src_val);
+
+ /* Test unsigned. */
+ memset (destbuf, 0xaa, sizeof (destbuf));
+ copy_integer_to_size (destbuf, dest_size, srcbuf, src_size, false,
+ byte_order);
+ SELF_CHECK (dest_valu == extract_unsigned_integer (destbuf, dest_size,
+ byte_order));
+
+ /* Test signed. */
+ memset (destbuf, 0xaa, sizeof (destbuf));
+ copy_integer_to_size (destbuf, dest_size, srcbuf, src_size, true,
+ byte_order);
+ SELF_CHECK (dest_vals == extract_unsigned_integer (destbuf, dest_size,
+ byte_order));
+ }
+}
+
+static void
+copy_integer_to_size_test ()
+{
+ /* Destination is bigger than the source, which has the signed bit unset. */
+ do_cint_test (0x12345678, 0x12345678, 8, 0x12345678, 4);
+ do_cint_test (0x345678, 0x345678, 8, 0x12345678, 3);
+
+ /* Destination is bigger than the source, which has the signed bit set. */
+ do_cint_test (0xdeadbeef, 0xffffffffdeadbeef, 8, 0xdeadbeef, 4);
+ do_cint_test (0xadbeef, 0xffffffffffadbeef, 8, 0xdeadbeef, 3);
+
+ /* Destination is smaller than the source. */
+ do_cint_test (0x5678, 0x5678, 2, 0x12345678, 3);
+ do_cint_test (0xbeef, 0xbeef, 2, 0xdeadbeef, 3);
+
+ /* Destination and source are the same size. */
+ do_cint_test (0x8765432112345678, 0x8765432112345678, 8, 0x8765432112345678,
+ 8);
+ do_cint_test (0x432112345678, 0x432112345678, 6, 0x8765432112345678, 6);
+ do_cint_test (0xfeedbeaddeadbeef, 0xfeedbeaddeadbeef, 8, 0xfeedbeaddeadbeef,
+ 8);
+ do_cint_test (0xbeaddeadbeef, 0xbeaddeadbeef, 6, 0xfeedbeaddeadbeef, 6);
+
+ /* Destination is bigger than the source. Source is bigger than 32bits. */
+ do_cint_test (0x3412345678, 0x3412345678, 8, 0x3412345678, 6);
+ do_cint_test (0xff12345678, 0xff12345678, 8, 0xff12345678, 6);
+ do_cint_test (0x432112345678, 0x432112345678, 8, 0x8765432112345678, 6);
+ do_cint_test (0xff2112345678, 0xffffff2112345678, 8, 0xffffff2112345678, 6);
+}
+
+} // namespace selftests
+
+#endif
+
+void _initialize_extract_store_integer ();
+void
+_initialize_extract_store_integer ()
+{
+#if GDB_SELF_TEST
+ selftests::register_test ("copy_integer_to_size",
+ selftests::copy_integer_to_size_test);
+#endif
+}
diff --git a/gdb/extract-store-integer.h b/gdb/extract-store-integer.h
new file mode 100644
index 0000000..1ba5f82
--- /dev/null
+++ b/gdb/extract-store-integer.h
@@ -0,0 +1,111 @@
+/* Copyright (C) 2024 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 GDB_EXTRACT_STORE_INTEGER_H
+#define GDB_EXTRACT_STORE_INTEGER_H
+
+template<typename T, typename = RequireLongest<T>>
+T extract_integer (gdb::array_view<const gdb_byte>, enum bfd_endian byte_order);
+
+static inline LONGEST
+extract_signed_integer (gdb::array_view<const gdb_byte> buf,
+ enum bfd_endian byte_order)
+{
+ return extract_integer<LONGEST> (buf, byte_order);
+}
+
+static inline LONGEST
+extract_signed_integer (const gdb_byte *addr, int len,
+ enum bfd_endian byte_order)
+{
+ return extract_signed_integer (gdb::array_view<const gdb_byte> (addr, len),
+ byte_order);
+}
+
+static inline ULONGEST
+extract_unsigned_integer (gdb::array_view<const gdb_byte> buf,
+ enum bfd_endian byte_order)
+{
+ return extract_integer<ULONGEST> (buf, byte_order);
+}
+
+static inline ULONGEST
+extract_unsigned_integer (const gdb_byte *addr, int len,
+ enum bfd_endian byte_order)
+{
+ return extract_unsigned_integer (gdb::array_view<const gdb_byte> (addr, len),
+ byte_order);
+}
+
+extern int extract_long_unsigned_integer (const gdb_byte *, int,
+ enum bfd_endian, LONGEST *);
+
+extern CORE_ADDR extract_typed_address (const gdb_byte *buf,
+ struct type *type);
+
+/* All 'store' functions accept a host-format integer and store a
+ target-format integer at ADDR which is LEN bytes long. */
+
+template<typename T, typename = RequireLongest<T>>
+extern void store_integer (gdb::array_view<gdb_byte> dst,
+ bfd_endian byte_order, T val);
+
+template<typename T>
+static inline void
+store_integer (gdb_byte *addr, int len, bfd_endian byte_order, T val)
+{
+ return store_integer (gdb::make_array_view (addr, len), byte_order, val);
+}
+
+static inline void
+store_signed_integer (gdb::array_view<gdb_byte> dst, bfd_endian byte_order,
+ LONGEST val)
+{
+ return store_integer (dst, byte_order, val);
+}
+
+static inline void
+store_signed_integer (gdb_byte *addr, int len, bfd_endian byte_order,
+ LONGEST val)
+{
+ return store_signed_integer (gdb::make_array_view (addr, len), byte_order,
+ val);
+}
+
+static inline void
+store_unsigned_integer (gdb::array_view<gdb_byte> dst, bfd_endian byte_order,
+ ULONGEST val)
+{
+ return store_integer (dst, byte_order, val);
+}
+
+static inline void
+store_unsigned_integer (gdb_byte *addr, int len, bfd_endian byte_order,
+ ULONGEST val)
+{
+ return store_unsigned_integer (gdb::make_array_view (addr, len), byte_order,
+ val);
+}
+
+extern void store_typed_address (gdb_byte *buf, struct type *type,
+ CORE_ADDR addr);
+
+extern void copy_integer_to_size (gdb_byte *dest, int dest_size,
+ const gdb_byte *source, int source_size,
+ bool is_signed, enum bfd_endian byte_order);
+
+#endif /* GDB_EXTRACT_STORE_INTEGER_H */
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 593f5b4..a80f604 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "auxv.h"
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "inferior.h"
#include "objfiles.h"
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 7344949..660eb11 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "frame.h"
@@ -30,7 +31,6 @@
#include "block.h"
#include "objfiles.h"
#include "language.h"
-#include "gdbsupport/selftest.h"
/* Basic byte-swapping routines. All 'extract' functions return a
host-format integer from a target-format integer at ADDR which is
@@ -44,151 +44,6 @@
you lose
#endif
-template<typename T, typename>
-T
-extract_integer (gdb::array_view<const gdb_byte> buf, enum bfd_endian byte_order)
-{
- typename std::make_unsigned<T>::type retval = 0;
-
- if (buf.size () > (int) sizeof (T))
- error (_("\
-That operation is not available on integers of more than %d bytes."),
- (int) sizeof (T));
-
- /* Start at the most significant end of the integer, and work towards
- the least significant. */
- if (byte_order == BFD_ENDIAN_BIG)
- {
- size_t i = 0;
-
- if (std::is_signed<T>::value)
- {
- /* Do the sign extension once at the start. */
- retval = ((LONGEST) buf[i] ^ 0x80) - 0x80;
- ++i;
- }
- for (; i < buf.size (); ++i)
- retval = (retval << 8) | buf[i];
- }
- else
- {
- ssize_t i = buf.size () - 1;
-
- if (std::is_signed<T>::value)
- {
- /* Do the sign extension once at the start. */
- retval = ((LONGEST) buf[i] ^ 0x80) - 0x80;
- --i;
- }
- for (; i >= 0; --i)
- retval = (retval << 8) | buf[i];
- }
- return retval;
-}
-
-/* Explicit instantiations. */
-template LONGEST extract_integer<LONGEST> (gdb::array_view<const gdb_byte> buf,
- enum bfd_endian byte_order);
-template ULONGEST extract_integer<ULONGEST>
- (gdb::array_view<const gdb_byte> buf, enum bfd_endian byte_order);
-
-/* Treat the bytes at BUF as a pointer of type TYPE, and return the
- address it represents. */
-CORE_ADDR
-extract_typed_address (const gdb_byte *buf, struct type *type)
-{
- gdb_assert (type->is_pointer_or_reference ());
- return gdbarch_pointer_to_address (type->arch (), type, buf);
-}
-
-/* All 'store' functions accept a host-format integer and store a
- target-format integer at ADDR which is LEN bytes long. */
-template<typename T, typename>
-void
-store_integer (gdb::array_view<gdb_byte> dst, enum bfd_endian byte_order,
- T val)
-{
- gdb_byte *p;
- gdb_byte *startaddr = dst.data ();
- gdb_byte *endaddr = startaddr + dst.size ();
-
- /* Start at the least significant end of the integer, and work towards
- the most significant. */
- if (byte_order == BFD_ENDIAN_BIG)
- {
- for (p = endaddr - 1; p >= startaddr; --p)
- {
- *p = val & 0xff;
- val >>= 8;
- }
- }
- else
- {
- for (p = startaddr; p < endaddr; ++p)
- {
- *p = val & 0xff;
- val >>= 8;
- }
- }
-}
-
-/* Explicit instantiations. */
-template void store_integer (gdb::array_view<gdb_byte> dst,
- bfd_endian byte_order, LONGEST val);
-
-template void store_integer (gdb::array_view<gdb_byte> dst,
- bfd_endian byte_order, ULONGEST val);
-
-/* Store the address ADDR as a pointer of type TYPE at BUF, in target
- form. */
-void
-store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr)
-{
- gdb_assert (type->is_pointer_or_reference ());
- gdbarch_address_to_pointer (type->arch (), type, buf, addr);
-}
-
-/* Copy a value from SOURCE of size SOURCE_SIZE bytes to DEST of size DEST_SIZE
- bytes. If SOURCE_SIZE is greater than DEST_SIZE, then truncate the most
- significant bytes. If SOURCE_SIZE is less than DEST_SIZE then either sign
- or zero extended according to IS_SIGNED. Values are stored in memory with
- endianness BYTE_ORDER. */
-
-void
-copy_integer_to_size (gdb_byte *dest, int dest_size, const gdb_byte *source,
- int source_size, bool is_signed,
- enum bfd_endian byte_order)
-{
- signed int size_diff = dest_size - source_size;
-
- /* Copy across everything from SOURCE that can fit into DEST. */
-
- if (byte_order == BFD_ENDIAN_BIG && size_diff > 0)
- memcpy (dest + size_diff, source, source_size);
- else if (byte_order == BFD_ENDIAN_BIG && size_diff < 0)
- memcpy (dest, source - size_diff, dest_size);
- else
- memcpy (dest, source, std::min (source_size, dest_size));
-
- /* Fill the remaining space in DEST by either zero extending or sign
- extending. */
-
- if (size_diff > 0)
- {
- gdb_byte extension = 0;
- if (is_signed
- && ((byte_order != BFD_ENDIAN_BIG && source[source_size - 1] & 0x80)
- || (byte_order == BFD_ENDIAN_BIG && source[0] & 0x80)))
- extension = 0xff;
-
- /* Extend into MSBs of SOURCE. */
- if (byte_order == BFD_ENDIAN_BIG)
- memset (dest, extension, size_diff);
- else
- memset (dest + source_size, extension, size_diff);
- }
-}
-
/* See value.h. */
value *
@@ -800,95 +655,3 @@ address_from_register (int regnum, const frame_info_ptr &frame)
return value_as_address (v.get ());
}
-
-#if GDB_SELF_TEST
-namespace selftests {
-namespace findvar_tests {
-
-/* Function to test copy_integer_to_size. Store SOURCE_VAL with size
- SOURCE_SIZE to a buffer, making sure no sign extending happens at this
- stage. Copy buffer to a new buffer using copy_integer_to_size. Extract
- copied value and compare to DEST_VALU. Copy again with a signed
- copy_integer_to_size and compare to DEST_VALS. Do everything for both
- LITTLE and BIG target endians. Use unsigned values throughout to make
- sure there are no implicit sign extensions. */
-
-static void
-do_cint_test (ULONGEST dest_valu, ULONGEST dest_vals, int dest_size,
- ULONGEST src_val, int src_size)
-{
- for (int i = 0; i < 2 ; i++)
- {
- gdb_byte srcbuf[sizeof (ULONGEST)] = {};
- gdb_byte destbuf[sizeof (ULONGEST)] = {};
- enum bfd_endian byte_order = i ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE;
-
- /* Fill the src buffer (and later the dest buffer) with non-zero junk,
- to ensure zero extensions aren't hidden. */
- memset (srcbuf, 0xaa, sizeof (srcbuf));
-
- /* Store (and later extract) using unsigned to ensure there are no sign
- extensions. */
- store_unsigned_integer (srcbuf, src_size, byte_order, src_val);
-
- /* Test unsigned. */
- memset (destbuf, 0xaa, sizeof (destbuf));
- copy_integer_to_size (destbuf, dest_size, srcbuf, src_size, false,
- byte_order);
- SELF_CHECK (dest_valu == extract_unsigned_integer (destbuf, dest_size,
- byte_order));
-
- /* Test signed. */
- memset (destbuf, 0xaa, sizeof (destbuf));
- copy_integer_to_size (destbuf, dest_size, srcbuf, src_size, true,
- byte_order);
- SELF_CHECK (dest_vals == extract_unsigned_integer (destbuf, dest_size,
- byte_order));
- }
-}
-
-static void
-copy_integer_to_size_test ()
-{
- /* Destination is bigger than the source, which has the signed bit unset. */
- do_cint_test (0x12345678, 0x12345678, 8, 0x12345678, 4);
- do_cint_test (0x345678, 0x345678, 8, 0x12345678, 3);
-
- /* Destination is bigger than the source, which has the signed bit set. */
- do_cint_test (0xdeadbeef, 0xffffffffdeadbeef, 8, 0xdeadbeef, 4);
- do_cint_test (0xadbeef, 0xffffffffffadbeef, 8, 0xdeadbeef, 3);
-
- /* Destination is smaller than the source. */
- do_cint_test (0x5678, 0x5678, 2, 0x12345678, 3);
- do_cint_test (0xbeef, 0xbeef, 2, 0xdeadbeef, 3);
-
- /* Destination and source are the same size. */
- do_cint_test (0x8765432112345678, 0x8765432112345678, 8, 0x8765432112345678,
- 8);
- do_cint_test (0x432112345678, 0x432112345678, 6, 0x8765432112345678, 6);
- do_cint_test (0xfeedbeaddeadbeef, 0xfeedbeaddeadbeef, 8, 0xfeedbeaddeadbeef,
- 8);
- do_cint_test (0xbeaddeadbeef, 0xbeaddeadbeef, 6, 0xfeedbeaddeadbeef, 6);
-
- /* Destination is bigger than the source. Source is bigger than 32bits. */
- do_cint_test (0x3412345678, 0x3412345678, 8, 0x3412345678, 6);
- do_cint_test (0xff12345678, 0xff12345678, 8, 0xff12345678, 6);
- do_cint_test (0x432112345678, 0x432112345678, 8, 0x8765432112345678, 6);
- do_cint_test (0xff2112345678, 0xffffff2112345678, 8, 0xffffff2112345678, 6);
-}
-
-} // namespace findvar_test
-} // namespace selftests
-
-#endif
-
-void _initialize_findvar ();
-void
-_initialize_findvar ()
-{
-#if GDB_SELF_TEST
- selftests::register_test
- ("copy_integer_to_size",
- selftests::findvar_tests::copy_integer_to_size_test);
-#endif
-}
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index a80421a..e5f108d 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "dummy-frame.h"
diff --git a/gdb/frame.c b/gdb/frame.c
index f042bbb..719fa05 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "frame.h"
+#include "extract-store-integer.h"
#include "target.h"
#include "value.h"
#include "inferior.h"
diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c
index 0b13a81..4642445 100644
--- a/gdb/frv-linux-tdep.c
+++ b/gdb/frv-linux-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "target.h"
#include "frame.h"
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 5c026eb..1b5e15f 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "inferior.h"
#include "gdbcore.h"
#include "arch-utils.h"
diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c
index c5a48be..8f7aa51 100644
--- a/gdb/ft32-tdep.c
+++ b/gdb/ft32-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 90f5b29..1311a99 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "language.h"
#include "value.h"
#include "cp-abi.h"
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 32907e2..e91d664 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -22,6 +22,7 @@
sac@cygnus.com
*/
+#include "extract-store-integer.h"
#include "value.h"
#include "arch-utils.h"
#include "regcache.h"
diff --git a/gdb/hppa-bsd-tdep.c b/gdb/hppa-bsd-tdep.c
index dacda88..67fee6b 100644
--- a/gdb/hppa-bsd-tdep.c
+++ b/gdb/hppa-bsd-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "objfiles.h"
#include "target.h"
#include "value.h"
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 659c265..8f73f8d 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "osabi.h"
#include "target.h"
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 8becfd5..be8ea57 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -21,6 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "bfd.h"
+#include "extract-store-integer.h"
#include "inferior.h"
#include "regcache.h"
#include "completer.h"
diff --git a/gdb/i386-bsd-tdep.c b/gdb/i386-bsd-tdep.c
index db00e18..ba7817a 100644
--- a/gdb/i386-bsd-tdep.c
+++ b/gdb/i386-bsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "gdbcore.h"
#include "regcache.h"
diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c
index 5a5c8bf..0481296 100644
--- a/gdb/i386-darwin-tdep.c
+++ b/gdb/i386-darwin-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "gdbcore.h"
diff --git a/gdb/i386-gnu-tdep.c b/gdb/i386-gnu-tdep.c
index fb30821..98e1151 100644
--- a/gdb/i386-gnu-tdep.c
+++ b/gdb/i386-gnu-tdep.c
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "osabi.h"
#include "solib-svr4.h"
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 44730f2..a78f03f 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "frame.h"
#include "value.h"
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index 674d45f..6f34415 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "osabi.h"
#include "regcache.h"
diff --git a/gdb/i386-obsd-tdep.c b/gdb/i386-obsd-tdep.c
index 6e31567..3539c65 100644
--- a/gdb/i386-obsd-tdep.c
+++ b/gdb/i386-obsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbcore.h"
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 1b1efad..4b1c60e 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "opcode/i386.h"
#include "arch-utils.h"
#include "command.h"
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 00c9523..45bd43a 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "gdbcore.h"
#include "inferior.h"
diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c
index 676fdb8..12083e9 100644
--- a/gdb/ia64-linux-tdep.c
+++ b/gdb/ia64-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "ia64-tdep.h"
#include "arch-utils.h"
#include "gdbcore.h"
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index f49a8d6..6376cf8 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "inferior.h"
#include "gdbcore.h"
#include "arch-utils.h"
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index b9d95bb..5776c66 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -20,6 +20,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/jit.c b/gdb/jit.c
index 3843b84..92cac0d 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -19,6 +19,7 @@
#include "jit.h"
+#include "extract-store-integer.h"
#include "jit-reader.h"
#include "block.h"
#include "breakpoint.h"
diff --git a/gdb/linux-nat-trad.c b/gdb/linux-nat-trad.c
index d90d76f..b2c982d 100644
--- a/gdb/linux-nat-trad.c
+++ b/gdb/linux-nat-trad.c
@@ -19,6 +19,7 @@
#include "linux-nat-trad.h"
+#include "extract-store-integer.h"
#include "nat/gdb_ptrace.h"
#include "inf-ptrace.h"
#include "gdbarch.h"
diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index 6430c0e..549ea1b 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "target.h"
#include "gdbtypes.h"
#include "regcache.h"
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 478f1ed..98a0728 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/loongarch-linux-tdep.c b/gdb/loongarch-linux-tdep.c
index a57dc31..7157806 100644
--- a/gdb/loongarch-linux-tdep.c
+++ b/gdb/loongarch-linux-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "glibc-tdep.h"
#include "inferior.h"
#include "linux-tdep.h"
diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c
index 149fbd5..af0d689 100644
--- a/gdb/loongarch-tdep.c
+++ b/gdb/loongarch-tdep.c
@@ -20,6 +20,7 @@
#include "arch-utils.h"
#include "dwarf2/frame.h"
#include "elf-bfd.h"
+#include "extract-store-integer.h"
#include "frame-unwind.h"
#include "gdbcore.h"
#include "loongarch-tdep.h"
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 33ec443..d9890d0 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "sim/sim-m32c.h"
#include "gdbtypes.h"
#include "regcache.h"
diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c
index a28e113..8eea662 100644
--- a/gdb/m32r-linux-tdep.c
+++ b/gdb/m32r-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "frame.h"
#include "value.h"
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 215df88..e212940 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 70b3f12..e117d8e 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/m68k-linux-tdep.c b/gdb/m68k-linux-tdep.c
index 4874db7..7250ce0 100644
--- a/gdb/m68k-linux-tdep.c
+++ b/gdb/m68k-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "frame.h"
#include "target.h"
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index f73f58d..1b8cc92 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "dwarf2/frame.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index fdb5891..7d87d64 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index ab788a2..7f8a34b 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "target.h"
#include "inferior.h"
#include "infrun.h"
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index 1886c97..8d045c6 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -19,6 +19,7 @@
#include "arch-utils.h"
#include "dis-asm.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "trad-frame.h"
#include "symtab.h"
diff --git a/gdb/mips-fbsd-tdep.c b/gdb/mips-fbsd-tdep.c
index 188ef40..7452057 100644
--- a/gdb/mips-fbsd-tdep.c
+++ b/gdb/mips-fbsd-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "osabi.h"
#include "regset.h"
#include "trad-frame.h"
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 79508f0..7bd96a8 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "target.h"
#include "solib-svr4.h"
diff --git a/gdb/mips-netbsd-tdep.c b/gdb/mips-netbsd-tdep.c
index 63068a1..b8134a6 100644
--- a/gdb/mips-netbsd-tdep.c
+++ b/gdb/mips-netbsd-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "regcache.h"
#include "regset.h"
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index c34971c..0abac41 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -20,6 +20,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "symtab.h"
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index cd70f8a..d44eebf 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -19,6 +19,7 @@
#include "arch-utils.h"
#include "dis-asm.h"
+#include "extract-store-integer.h"
#include "gdbtypes.h"
#include "regcache.h"
#include "gdbcore.h"
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index a6b783e..3bfde1be 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index 9d90a6e..017ebb4 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -21,6 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "prologue-value.h"
#include "target.h"
#include "regcache.h"
diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
index bbbc80b..8ad51d0 100644
--- a/gdb/nds32-tdep.c
+++ b/gdb/nds32-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
index da2616b..956eb02 100644
--- a/gdb/nios2-tdep.c
+++ b/gdb/nios2-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 937902b..eeef52db 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -21,6 +21,7 @@
#include <sys/stat.h>
#include "nto-tdep.h"
+#include "extract-store-integer.h"
#include "top.h"
#include "inferior.h"
#include "infrun.h"
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index d4ac0ac..db74b59 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "symtab.h"
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index adc6402..ddacccc 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -19,6 +19,7 @@
/* This file is derived from c-lang.c */
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 7f6d7dc..87c0c35 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -19,6 +19,7 @@
/* This file is derived from c-valprint.c */
+#include "extract-store-integer.h"
#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/ppc-fbsd-tdep.c b/gdb/ppc-fbsd-tdep.c
index 8f86607..3f0f93f 100644
--- a/gdb/ppc-fbsd-tdep.c
+++ b/gdb/ppc-fbsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "gdbcore.h"
#include "frame-unwind.h"
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 2ed6e6e..c73c7c9 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "gdbthread.h"
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 2da2d32..e70eb2e 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "symtab.h"
diff --git a/gdb/ppc-obsd-tdep.c b/gdb/ppc-obsd-tdep.c
index b50a24c..1bd79b3 100644
--- a/gdb/ppc-obsd-tdep.c
+++ b/gdb/ppc-obsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbtypes.h"
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 9d0e8a9..47e6292 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -18,6 +18,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "language.h"
#include "gdbcore.h"
#include "inferior.h"
diff --git a/gdb/ppc64-tdep.c b/gdb/ppc64-tdep.c
index 8f91d06..79bc4da 100644
--- a/gdb/ppc64-tdep.c
+++ b/gdb/ppc64-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "gdbcore.h"
#include "infrun.h"
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index ae56b9d..79da7ea 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 77fdacf..d613404 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -20,6 +20,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "inferior.h"
#include "infrun.h"
#include "target.h"
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index ecc9235..55d54f4 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "ada-lang.h"
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 2e67cf5..9d8c4ee 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcmd.h"
#include "regcache.h"
#include "gdbthread.h"
diff --git a/gdb/regcache.c b/gdb/regcache.c
index c35a813..0e754ec 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "inferior.h"
#include "gdbthread.h"
#include "target.h"
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index eaa0d8f..9615ded 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -19,6 +19,7 @@
/* See the GDB User Guide for details of the GDB remote protocol. */
+#include "extract-store-integer.h"
#include "gdbcmd.h"
#include "remote.h"
#include "gdbsupport/gdb_wait.h"
diff --git a/gdb/riscv-fbsd-tdep.c b/gdb/riscv-fbsd-tdep.c
index 68f7267..4761edc 100644
--- a/gdb/riscv-fbsd-tdep.c
+++ b/gdb/riscv-fbsd-tdep.c
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "fbsd-tdep.h"
#include "osabi.h"
#include "riscv-tdep.h"
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index fe4da1a..8909168 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "symtab.h"
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index acd0731..46a7ee9 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "prologue-value.h"
#include "target.h"
#include "regcache.h"
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index 5111f4f..3faefe5 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "osabi.h"
#include "regcache.h"
#include "regset.h"
diff --git a/gdb/rs6000-lynx178-tdep.c b/gdb/rs6000-lynx178-tdep.c
index 550e068..17244b3 100644
--- a/gdb/rs6000-lynx178-tdep.c
+++ b/gdb/rs6000-lynx178-tdep.c
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "osabi.h"
#include "regcache.h"
#include "gdbcore.h"
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index b7ba004..e069892 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "inferior.h"
#include "infrun.h"
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 844e360..6b12fe0 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "prologue-value.h"
#include "target.h"
#include "regcache.h"
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index fa4aaf9..6bb84b2 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "regcache.h"
#include "inferior.h"
#include "target.h"
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 519e3eb..6687127 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -23,6 +23,7 @@
#include "dwarf2/frame.h"
#include "elf/s390.h"
#include "elf-bfd.h"
+#include "extract-store-integer.h"
#include "frame-base.h"
#include "frame-unwind.h"
#include "gdbarch.h"
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 1c67ea4..efbe156 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -20,6 +20,7 @@
/* Contributed by Steve Chamberlain
sac@cygnus.com. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index 6943b2d..f0828fd 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -19,6 +19,7 @@
#include "bfd.h"
+#include "extract-store-integer.h"
#include "objfiles.h"
#include "gdbcore.h"
#include "target.h"
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c
index 0208ed1..11225f7 100644
--- a/gdb/solib-dsbt.c
+++ b/gdb/solib-dsbt.c
@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "inferior.h"
#include "gdbcore.h"
#include "solib.h"
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index aef6093..39508fa 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "gdbcore.h"
#include "solib.h"
#include "solist.h"
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 49dd1e9..1dd04c2 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -22,6 +22,7 @@
#include "elf/common.h"
#include "elf/mips.h"
+#include "extract-store-integer.h"
#include "symtab.h"
#include "bfd.h"
#include "symfile.h"
diff --git a/gdb/solib.c b/gdb/solib.c
index 2f69c33..a656b62 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -19,6 +19,7 @@
#include <fcntl.h>
+#include "extract-store-integer.h"
#include "symtab.h"
#include "bfd.h"
#include "build-id.h"
diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
index fac4c7d..2cf83eb 100644
--- a/gdb/sparc-linux-tdep.c
+++ b/gdb/sparc-linux-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "dwarf2/frame.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbtypes.h"
diff --git a/gdb/sparc-obsd-tdep.c b/gdb/sparc-obsd-tdep.c
index d616671..3182a77 100644
--- a/gdb/sparc-obsd-tdep.c
+++ b/gdb/sparc-obsd-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbcore.h"
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index fbc27ff..edbc038 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -21,6 +21,7 @@
#include "dis-asm.h"
#include "dwarf2.h"
#include "dwarf2/frame.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index e91bba3..de44465 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "dwarf2/frame.h"
diff --git a/gdb/sparc64-obsd-tdep.c b/gdb/sparc64-obsd-tdep.c
index 6caeb10..cef6efd 100644
--- a/gdb/sparc64-obsd-tdep.c
+++ b/gdb/sparc64-obsd-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "gdbcore.h"
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index a55107f..9c8deaa 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -19,6 +19,7 @@
#include "arch-utils.h"
#include "dwarf2/frame.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/stack.c b/gdb/stack.c
index 9c67922..2922265 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "value.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 0b66554..8646f87 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "stap-probe.h"
+#include "extract-store-integer.h"
#include "probe.h"
#include "ui-out.h"
#include "objfiles.h"
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 2a7d41d..b7570a3 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -21,6 +21,7 @@
#include "arch-utils.h"
#include "bfdlink.h"
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcore.h"
diff --git a/gdb/target.c b/gdb/target.c
index d9ff7d6..091dc4c 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "target.h"
+#include "extract-store-integer.h"
#include "target-dcache.h"
#include "gdbcmd.h"
#include "symtab.h"
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 3a63b0c..ac6e291 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index d5ea93c..70a9561 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c
index 79af963..eb879c1 100644
--- a/gdb/tracefile-tfile.c
+++ b/gdb/tracefile-tfile.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "tracefile.h"
#include "readline/tilde.h"
#include "gdbsupport/filestuff.h"
diff --git a/gdb/tracefile.c b/gdb/tracefile.c
index 9db68bb..2d89ab7 100644
--- a/gdb/tracefile.c
+++ b/gdb/tracefile.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "tracefile.h"
+#include "extract-store-integer.h"
#include "tracectf.h"
#include "exec.h"
#include "regcache.h"
diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c
index fc92613..e64374a 100644
--- a/gdb/trad-frame.c
+++ b/gdb/trad-frame.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "trad-frame.h"
#include "regcache.h"
diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c
index 4b397cb..4f7c62d 100644
--- a/gdb/tramp-frame.c
+++ b/gdb/tramp-frame.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "tramp-frame.h"
+#include "extract-store-integer.h"
#include "frame-unwind.h"
#include "gdbcore.h"
#include "symtab.h"
diff --git a/gdb/unittests/gmp-utils-selftests.c b/gdb/unittests/gmp-utils-selftests.c
index 3c6b710..f8f9781 100644
--- a/gdb/unittests/gmp-utils-selftests.c
+++ b/gdb/unittests/gmp-utils-selftests.c
@@ -19,6 +19,7 @@
#include "gmp-utils.h"
#include "gdbsupport/selftest.h"
+#include "extract-store-integer.h"
#include <math.h>
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 6bda14f..531fdb4 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "trad-frame.h"
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 6b152ca..7034fa6 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "value.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/valops.c b/gdb/valops.c
index a17b937..f9b54a5 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 40ffdbe..13e80c0 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
diff --git a/gdb/value.c b/gdb/value.c
index 1bd180a..4df19fd 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "extract-store-integer.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index dd00898..a42c872 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -19,6 +19,7 @@
#include "arch-utils.h"
#include "dis-asm.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index f9585ad..af5ccd1 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "windows-tdep.h"
+#include "extract-store-integer.h"
#include "gdbsupport/gdb_obstack.h"
#include "xml-support.h"
#include "gdbarch.h"
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 166e6af..a0f6c31 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index 2c3d468..9dcd3ef 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "extract-store-integer.h"
#include "frame.h"
#include "solib-svr4.h"
#include "symtab.h"
diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c
index ee8e36b..530139d 100644
--- a/gdb/z80-tdep.c
+++ b/gdb/z80-tdep.c
@@ -19,6 +19,7 @@
#include "arch-utils.h"
#include "dis-asm.h"
+#include "extract-store-integer.h"
#include "frame.h"
#include "frame-unwind.h"
#include "frame-base.h"