]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: move store/extract integer functions to extract-store-integer.{c,h}
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 22 Apr 2024 20:10:14 +0000 (16:10 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 23 Apr 2024 01:34:19 +0000 (21:34 -0400)
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>
141 files changed:
gdb/Makefile.in
gdb/aarch64-fbsd-tdep.c
gdb/aarch64-linux-tdep.c
gdb/aarch64-tdep.c
gdb/ada-lang.c
gdb/ada-tasks.c
gdb/ada-valprint.c
gdb/alpha-tdep.c
gdb/amd64-darwin-tdep.c
gdb/amd64-linux-tdep.c
gdb/amd64-obsd-tdep.c
gdb/amd64-tdep.c
gdb/amd64-windows-tdep.c
gdb/arc-tdep.c
gdb/arch-utils.c
gdb/arm-linux-tdep.c
gdb/arm-none-tdep.c
gdb/arm-tdep.c
gdb/auxv.c
gdb/avr-tdep.c
gdb/bfin-linux-tdep.c
gdb/bfin-tdep.c
gdb/bsd-uthread.c
gdb/c-lang.c
gdb/c-valprint.c
gdb/corefile.c
gdb/cp-valprint.c
gdb/cris-tdep.c
gdb/csky-tdep.c
gdb/darwin-nat.c
gdb/defs.h
gdb/dtrace-probe.c
gdb/dwarf2/index-common.h
gdb/elfread.c
gdb/extract-store-integer.c [new file with mode: 0644]
gdb/extract-store-integer.h [new file with mode: 0644]
gdb/fbsd-tdep.c
gdb/findvar.c
gdb/frame-unwind.c
gdb/frame.c
gdb/frv-linux-tdep.c
gdb/frv-tdep.c
gdb/ft32-tdep.c
gdb/gnu-v3-abi.c
gdb/h8300-tdep.c
gdb/hppa-bsd-tdep.c
gdb/hppa-linux-tdep.c
gdb/hppa-tdep.c
gdb/i386-bsd-tdep.c
gdb/i386-darwin-tdep.c
gdb/i386-gnu-tdep.c
gdb/i386-linux-tdep.c
gdb/i386-nto-tdep.c
gdb/i386-obsd-tdep.c
gdb/i386-tdep.c
gdb/i387-tdep.c
gdb/ia64-linux-tdep.c
gdb/ia64-tdep.c
gdb/iq2000-tdep.c
gdb/jit.c
gdb/linux-nat-trad.c
gdb/linux-record.c
gdb/lm32-tdep.c
gdb/loongarch-linux-tdep.c
gdb/loongarch-tdep.c
gdb/m32c-tdep.c
gdb/m32r-linux-tdep.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-linux-tdep.c
gdb/m68k-tdep.c
gdb/mep-tdep.c
gdb/mi/mi-main.c
gdb/microblaze-tdep.c
gdb/mips-fbsd-tdep.c
gdb/mips-linux-tdep.c
gdb/mips-netbsd-tdep.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/moxie-tdep.c
gdb/msp430-tdep.c
gdb/nds32-tdep.c
gdb/nios2-tdep.c
gdb/nto-tdep.c
gdb/or1k-tdep.c
gdb/p-lang.c
gdb/p-valprint.c
gdb/ppc-fbsd-tdep.c
gdb/ppc-linux-nat.c
gdb/ppc-linux-tdep.c
gdb/ppc-obsd-tdep.c
gdb/ppc-sysv-tdep.c
gdb/ppc64-tdep.c
gdb/printcmd.c
gdb/procfs.c
gdb/ravenscar-thread.c
gdb/record-full.c
gdb/regcache.c
gdb/remote-fileio.c
gdb/riscv-fbsd-tdep.c
gdb/riscv-tdep.c
gdb/rl78-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-lynx178-tdep.c
gdb/rs6000-tdep.c
gdb/rx-tdep.c
gdb/s390-linux-nat.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/solib-darwin.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-svr4.c
gdb/solib.c
gdb/sparc-linux-tdep.c
gdb/sparc-obsd-tdep.c
gdb/sparc-tdep.c
gdb/sparc64-linux-tdep.c
gdb/sparc64-obsd-tdep.c
gdb/sparc64-tdep.c
gdb/stack.c
gdb/stap-probe.c
gdb/symfile.c
gdb/target.c
gdb/tic6x-tdep.c
gdb/tilegx-tdep.c
gdb/tracefile-tfile.c
gdb/tracefile.c
gdb/trad-frame.c
gdb/tramp-frame.c
gdb/unittests/gmp-utils-selftests.c
gdb/v850-tdep.c
gdb/valarith.c
gdb/valops.c
gdb/valprint.c
gdb/value.c
gdb/vax-tdep.c
gdb/windows-tdep.c
gdb/xstormy16-tdep.c
gdb/xtensa-tdep.c
gdb/z80-tdep.c

index 23894ea4a4da6c684c7f46d8522f7aaeabf85991..618c5bbb3399b5daa247c6635d9d92ba38d2d2fe 100644 (file)
@@ -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 \
index e2ff57e83900cd93d4c0367624d022880e7f2937..844023c2e7b7b87a4bdcb256fed1fd5ff3eaad26 100644 (file)
@@ -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"
index 359798759076afd76bd3451c961dd8b1721b1261..ad55cf2caa3bf79b60ae235c31221e200f6cc853 100644 (file)
@@ -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"
index 06eda102468a3153f57cf9514dfe8ead8678c9e7..a01ae39d25cf32f4a2250d5bbe54087bbe5a476d 100644 (file)
@@ -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"
index a3870020e8d829448e0ca6f6d6c4aa8410a35fcc..5ab6e8b14b72d6994d7c1d6d315f360973ebaa26 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include <ctype.h>
+#include "extract-store-integer.h"
 #include "gdbsupport/gdb_regex.h"
 #include "frame.h"
 #include "symtab.h"
index 864c5cfdf1c686538cc7715ce267aad83b6abffd..547395d36d60d13d6d0d3af11d82eada505f624a 100644 (file)
@@ -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"
index 6acfb9a48b69676cbb770283578faf472625b2f6..6d3fca9bdeba85d64727cdb75de6c355b34d1958 100644 (file)
@@ -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"
index c93bd69657f6ba62f027a37a9adb760a34b80ace..ada8afd37258ad02f562839bf44ea47510583623 100644 (file)
@@ -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"
index b0bead084fea08093e19da74a755b2e62e778e9b..f2741e2cff85dc79be5d93985d7c833b148c06b1 100644 (file)
@@ -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"
index 9d560ac4fbf4255233ff987ee41512e9a699ce13..c52b04368726232e6870a226254474e798116abf 100644 (file)
@@ -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"
index f6f63bbf8ed0d12a0c76dc5edd46076e1dd1fcbb..5b1e77b3e86e13f2bd310d7582092d358eae2cc2 100644 (file)
@@ -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"
index 0bb7a24cbd08c73ffce9955008ec6ed71e89046d..053067e2cf2362d37aee6ba8adbc68a9b802fc3b 100644 (file)
@@ -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"
index a559d967b3c98807e8848553b070e0bd5642b868..3dfc8000533985a1d1240c034b3855ed1bdc98fa 100644 (file)
@@ -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"
index 5684f324233c196256a68e282b23be7304d706e7..f35f4c4be74a1cfb2a4625559b9a776d668178d2 100644 (file)
@@ -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"
index cb149c36bc9409a7a7db7be11c8c091d4ddd801c..b8a18a58af2a91fd24a64b64e2f5bdb64b134c30 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include "arch-utils.h"
+#include "extract-store-integer.h"
 #include "gdbcmd.h"
 #include "inferior.h"
 #include "infrun.h"
index 8511abcd11d6e0a688b51e112b21a3fb954a05dd..43869e4fcfe262aea0c9ff04a4e9808e4b922b62 100644 (file)
@@ -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"
index 453e75234d4b574af27cf39f23caab25af38f6a8..4212af3c6f14f07e3df4d32c9d39fbf7467c196a 100644 (file)
@@ -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"
index b4062a8f92254edb259e3ab3d739000537fbad4c..97728d9100c7d07cbca8b52fb4112f9da78df610 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <ctype.h>
 
+#include "extract-store-integer.h"
 #include "frame.h"
 #include "language.h"
 #include "inferior.h"
index 1dc0587c0075ad80450b736e3297ee91bb392e94..616564c43a3faeb4ed7ee49dac7412fb44c7a682 100644 (file)
@@ -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"
index be95034abd5c3f543e77c7eb61f7c8a43411fe82..68b2646d202d226a1885d17c88218f97a6976d3a 100644 (file)
@@ -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"
index f67e06478eb118ad90eb6bb8ce90040d8873bef9..0b1b018e73670b0b09a4b735afbff07463d8b2d6 100644 (file)
@@ -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"
index dbc339d93366d61e36d6f286bebd56bff83f6d5e..b89b7dfa6d8b380761210759e55b3cd0e33935fa 100644 (file)
@@ -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"
index 576a9ec1cfbb276e03b1643b2e6a681cafb834af..a686f173fbf25e1f41ac027a5b78f155ec32c44d 100644 (file)
@@ -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"
index 922bf8c0de34cd8e9076856792bd57c17b62d42b..2b6cf087f548b10083afa1b546587b478a79eb59 100644 (file)
@@ -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"
index 28a6a6afea2f581070cba9eed383e217bc43ba41..ca24b1536bcf75ec432aaeaece70bfa859639bcc 100644 (file)
@@ -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"
index 16cd60f7106dd27ae0148ef32ca24a52853179bf..984c7bef8800ae938f86dde55cbde6e77c163177 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <signal.h>
 #include <fcntl.h>
+#include "extract-store-integer.h"
 #include "inferior.h"
 #include "symtab.h"
 #include "command.h"
index f2a2ca5288dac6b7064ba42cdbd186d6031c6423..2e776f40a637660e2e9b2f1cb1f8e3cb990447a0 100644 (file)
@@ -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"
index dd013d531abbc33e6c7821b20e9213c8b9da8717..8ca9fbc5251a25fcfaeaf6e91b4e478dcc280c3e 100644 (file)
@@ -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"
index 5f0fd3d7170d536eb82a3256586aa0b4f6983ee1..49aa1f680122dbdfa057215a2d04765a5e2b789f 100644 (file)
@@ -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"
index 0c5b54b40a3beb7ebc5adb9bfe1890cf0ea68ba8..33896a88d2b83a5d62e77bcff84e5d1947f68e99 100644 (file)
@@ -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"
index be5c9b7261b678dc26d4c1b0142e810ef11072e6..5da8ce7281533f135f7bdd1d07413a2c6a85abc1 100644 (file)
@@ -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;
index ad1a3f870b6365dd54c63f8e7823c2a89fc1afbc..0f4e1643483f1fc11f4e3856078dcf7f196197b3 100644 (file)
@@ -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"
index dca41517b3d81d2cfc26be1cab2488c97956519a..0a871a7e364a289f1f10b37d333593c5ca5eb245 100644 (file)
@@ -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"
index 9bfe12712db788c3f8f3a3cfa65df72623d49c7d..7a6a8cadcedd1f1fe5506d62c7c64f2b5f6fa718 100644 (file)
@@ -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 (file)
index 0000000..a3b7e40
--- /dev/null
@@ -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 (file)
index 0000000..1ba5f82
--- /dev/null
@@ -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 */
index 593f5b4fd4a111352663b83de7183c794974b14f..a80f604fa78077ca029c4e15fa13071ff1f9199e 100644 (file)
@@ -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"
index 734494961696f4e8058099efaa2c53dbec99a311..660eb11c8b8e76897ad16d3cab8f930548068882 100644 (file)
@@ -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
 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
-}
index a80421a9c5a86212489e38feec7aa421ff8649dd..e5f108d3257371a4df74b4281eeb79c5eafebde8 100644 (file)
@@ -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"
index f042bbb2ec256fe3161335035eb3b5f158d22ff4..719fa051afc6aed2361bd03f496d75dc98f03d35 100644 (file)
@@ -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"
index 0b13a81c06424276115aecbc2e17270d1f747c8f..46424453ef01c6c30a968b88ca4452a3fd198830 100644 (file)
@@ -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"
index 5c026ebd53a3aba2533a2e4aef19ce8aaa3b532c..1b5e15f831b7272265316e154a8e713f6330dee8 100644 (file)
@@ -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"
index c5a48bebe5f23a68227fd8b47e3c7f6a204fe4af..8f7aa51b58a645e0b0f4df7adba88847852561b4 100644 (file)
@@ -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"
index 90f5b29dd8e9dd20873b74fe242f2c1aaebfe531..1311a99ad8c2f95038ee41e93d26c7ce562deb6a 100644 (file)
@@ -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"
index 32907e29abfff53e251784d7b4220a33491e2261..e91d664ffa372de9b0a135736ac0fbbe01506c19 100644 (file)
@@ -22,6 +22,7 @@
    sac@cygnus.com
  */
 
+#include "extract-store-integer.h"
 #include "value.h"
 #include "arch-utils.h"
 #include "regcache.h"
index dacda88c58664996fb0b6b4f2c1c4c71fab0f24b..67fee6bb1c809490ff684e52e71d4611cfd5d593 100644 (file)
@@ -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"
index 659c265bfb861da912499aa084e4c786dad46036..8f73f8d2374d4b58b632776f53865ecc749b03c1 100644 (file)
@@ -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"
index 8becfd5f9f9d172de461ae7557c54b08cdadca57..be8ea57989314886926088bdbc423455cfc9ed50 100644 (file)
@@ -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"
index db00e18bccfe3e41aa8f8ae5141da47614207676..ba7817a39b9ea6b47f5fdcd1d438bc8c71d01a3e 100644 (file)
@@ -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"
index 5a5c8bffc2100347a8ac6e6d09b2a69fd66344c9..0481296a46ba70c6c0a83659f3589f48ec1515e8 100644 (file)
@@ -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"
index fb308215a7a91c678e06d2253ed6c7d62ca06692..98e11518a91b762eee01150c269b1f80356dd724 100644 (file)
@@ -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"
index 44730f204db565fd9ca409295b8e7a1def34109a..a78f03fac8d11b838cdd13447abc7cd7e61ca3c4 100644 (file)
@@ -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"
index 674d45feba995d3b2f937c842fdba25205c0d695..6f3441597a2efe72216941543cc08f3f94ab7ea8 100644 (file)
@@ -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"
index 6e31567328eba493997bdfe15ee61f5bd0653f19..3539c6599a0108c14491e5e995ed2c3d293224fd 100644 (file)
@@ -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"
index 1b1efad6fa3e6ad6e8f391c9a1a00c4027cf64e2..4b1c60ee92463012b64c169bd817ed033e335d58 100644 (file)
@@ -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"
index 00c9523ff25816c4b5fad530373510b17d007f06..45bd43a50a9b944bc219ccb367c0a5a8a0b9c989 100644 (file)
@@ -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"
index 676fdb8edac7bfbf34d41031fe0eb065ecd2197f..12083e94ca37737385d3bcaac2a17097bda76c84 100644 (file)
@@ -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"
index f49a8d6b5586fd5c66f59679048c093c08707006..6376cf8d0699b7e49323c941a0d422b37e7b646c 100644 (file)
@@ -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"
index b9d95bbc2675d0d1e6382c3499ac09fe3f543a2f..5776c66f78ad76403dd44cb6558ecf249f8d6e20 100644 (file)
@@ -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"
index 3843b84b0e631b39ee0557750a3cb77bb8eab58d..92cac0d342a5115ccdf9614a3dd4edee865d9e99 100644 (file)
--- 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"
index d90d76fd9a038ee2e276d78b7915c75baf8831b4..b2c982d997e32c750ed28d426457b99172b65e75 100644 (file)
@@ -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"
index 6430c0e00884ef106c1cb20a9e0c00c4cc844205..549ea1bd713f1d897c2438f2d15f0b9aa6833c09 100644 (file)
@@ -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"
index 478f1edf3e649628b3518f5dfb54d901e648184b..98a0728105100dca2055358ce91509eee1620dd0 100644 (file)
@@ -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"
index a57dc31cde8a9763f381164c2a4202744b354156..715780603034c310f52071760741fc3245ad94ef 100644 (file)
@@ -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"
index 149fbd55db901493ea9e121a7ec13eae8463910c..af0d6896143c9ee69f5e050fce620ca456921268 100644 (file)
@@ -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"
index 33ec44349d76246c6c77b5a85e28bcd92b86ee46..d9890d0e46449c3c8c6e9eb001ba4bf47f4fcf10 100644 (file)
@@ -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"
index a28e113584021e1e7d2c7f06c5814cbecd16a52b..8eea6620df9edf44ec7055f1a32b30c9d5eb2dab 100644 (file)
@@ -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"
index 215df88b21c85a58b8224190f5255cfe6e898c88..e2129409c19c1a02554bcb3489188c4369837270 100644 (file)
@@ -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"
index 70b3f129d5aab7ff90131f9ba1ed3c863f853cac..e117d8e291970965e26d6d2028b5df06377e8c7f 100644 (file)
@@ -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"
index 4874db720db9e110a141fd5bf8d8264affafe06e..7250ce09826ff6a346562b2226b312d68f5091c6 100644 (file)
@@ -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"
index f73f58de90aa231b0d842ce7eb6be53d46a35de7..1b8cc927e0c9271585180ad32a4b70389a8a302d 100644 (file)
@@ -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"
index fdb589134da064b6c206b5918df8820da006a56a..7d87d64100866ab3e885738a26081753dc5285cd 100644 (file)
@@ -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"
index ab788a202310a06acf9a91c1860f991242ef0931..7f8a34ba18f153b5315317601181ad9c5d087460 100644 (file)
@@ -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"
index 1886c973bdc5ec82d0dd89e694993b70418b25d2..8d045c69c10987e725f7664f79e05950bb9ab541 100644 (file)
@@ -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"
index 188ef4099da8ff52c7d2088c4704528b8f1984fd..7452057e74bbca6196e4604530ca79429e414f25 100644 (file)
@@ -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"
index 79508f0fce75bf7595caf975a614f91fdcac04c3..7bd96a8e2007f9fce26df81742f45696dd75444b 100644 (file)
@@ -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"
index 63068a18fe8e93c41b5623e655fbd60d58711db3..b8134a671bfdf04b3d7ec56925fc38a037f33cf5 100644 (file)
@@ -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"
index c34971c60c1b90dc33796004ee504968eb32169d..0abac41e3f9eb1a73b82b5fc8dac08f6a22a0537 100644 (file)
@@ -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"
index cd70f8adb68de09ef6817e378817e6f81c62e843..d44eebfcb175e1e8a7254b3138b664b384b96fd2 100644 (file)
@@ -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"
index a6b783e5c84c1c3e2cfa4e335f37396ad69f7163..3bfde1be6659a398e49ff59b11b2a5566cd8fade 100644 (file)
@@ -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"
index 9d90a6e2784d9f2ff5e338a41de904c9f4f50dbb..017ebb432d4bd7d8991c7730df73d77f61e972c9 100644 (file)
@@ -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"
index bbbc80b37cd2132f3e3312e60993142b26dc9990..8ad51d0798bfeb8502bc069488fabf63258f13d0 100644 (file)
@@ -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"
index da2616b436eb90c933d9c7fa731fd7e4db32c7df..956eb023eb9fccfcf5cc19f2daff457fc84a235c 100644 (file)
@@ -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"
index 937902b4f0a52e034bdeccc158a404d77a6fd098..eeef52db4a16a5a2b2303cd7e3d692f4fa668561 100644 (file)
@@ -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"
index d4ac0ac1b9d146036f075b4ab53fe803c66157ac..db74b590f182e33b2e886085a6f9a555ef100159 100644 (file)
@@ -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"
index adc6402084d78f7932cd5fd273328275d9d1ed82..ddacccce1b297f92bda8724cd6e3af094c401826 100644 (file)
@@ -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"
index 7f6d7dc6e6bb8d92dc954e8984dd62a2ab5f4d9f..87c0c35cb997c513f002d045f97bc8d1347b6f29 100644 (file)
@@ -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"
index 8f86607d5d198f1f2ce108e93fd1cba7acf0aa12..3f0f93f1ac0e7522d6fbd6edaa8975d3e6efeed4 100644 (file)
@@ -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"
index 2ed6e6e5068549a7b2da1dda81f39a0c43c68662..c73c7c90b4cde1233e3288f6f545b7cb73565d1e 100644 (file)
@@ -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"
index 2da2d32eb2628a6330f437a645bb2fdef2e8e968..e70eb2e8b66f3ed81339c2d7f39b57c20d17d332 100644 (file)
@@ -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"
index b50a24c6af7944b0f508d59b7feba7828ad7fba5..1bd79b3b3e18cd2e419f35bbb24c30dad21bbf67 100644 (file)
@@ -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"
index 9d0e8a95a773298f6b964da52062e3adaf454fc0..47e6292992e786ef59ca13a293c7129edf5a0a9c 100644 (file)
@@ -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"
index 8f91d06a085dfa068be506ed472fed90a3d4064c..79bc4da71e2031b151e021382eebbd0ad5fca4ce 100644 (file)
@@ -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"
index ae56b9d2fa9123d3beb3ae0f4d39c1642dd599f5..79da7ea4e22edcdc3ad498d1b82b5dc6f53c9fa1 100644 (file)
@@ -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"
index 77fdacfd61e1ba94f203cc65acd566860255d0f0..d61340420e725ee3204adcf063a0cc170bdfbc3d 100644 (file)
@@ -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"
index ecc9235c9174dd767bc7a00392fd2ad551b966e3..55d54f4bdf137129cb7277783a8aa6cf3bf38258 100644 (file)
@@ -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"
index 2e67cf5b4280f9fb5c9aac9519c199f77c5aae12..9d8c4ee438fd0b00486ffb0314f9e7923b045dbe 100644 (file)
@@ -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"
index c35a8138a39a9f3d8a9d7962ccf3bb04324602c1..0e754ec54379db22e0f49b16ba17826936ad24d4 100644 (file)
@@ -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"
index eaa0d8f619a6986334211ba2f899e807cf685971..9615dedaebd5f6b66c6157bb29f172f6366405cb 100644 (file)
@@ -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"
index 68f726743d9c8a63fa8ce1b4d931cd6bd72d63d1..4761edc6667f53c4b91e3e9f91fb84d38d321f8b 100644 (file)
@@ -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"
index fe4da1a1f9d1e17581f314e758d2b7b29fb53b23..89091689f6e8ec531a31a2fdbb8b8915df437ae0 100644 (file)
@@ -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"
index acd0731dd9f4f994e95a3b7b8d60eda7790b7525..46a7ee9c3d4d40e9772188ec5d84b73fad32b035 100644 (file)
@@ -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"
index 5111f4f55c0ad86f9dd80e484e8c5f6f49a103bf..3faefe58cebdae33cd6a2b3f39324a73c1771172 100644 (file)
@@ -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"
index 550e068820313f6f3ffd147d6153f14c54f33547..17244b3c45a7f594a956cb152a205ec71d572fb9 100644 (file)
@@ -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"
index b7ba0042bb73b92e9f248e0094f79e6269512283..e0698928dc85bc830e3d9fc13a4fedab967a4c79 100644 (file)
@@ -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"
index 844e36023e0443301b428439bfdff747d0d2b71e..6b12fe0a3148533974cef99ff581be5c7ac71d6a 100644 (file)
@@ -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"
index fa4aaf9aa9aeabc87c122fd75c0bce2b80e5107b..6bb84b2ff69697558b422263ff40be762ec89a40 100644 (file)
@@ -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"
index 519e3eb0a423342695817ff461deaa0b2850a2fc..6687127d0aa4ec87947a4b745ae6a2d02fd2db82 100644 (file)
@@ -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"
index 1c67ea42b040aeefa845772177d5f6fa330907be..efbe156476791ea14b70bb48a0313386142df2c7 100644 (file)
@@ -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"
index 6943b2df586588972f35e8a97e6a473f7f753d3b..f0828fdf102d00eacda73eb8b7b5f05ff5dea1ff 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include "bfd.h"
+#include "extract-store-integer.h"
 #include "objfiles.h"
 #include "gdbcore.h"
 #include "target.h"
index 0208ed13effc3a920f7029e8e44d0e3bd44a92d4..11225f72ed0161d8664c59a1f95a39b438b4cc8e 100644 (file)
@@ -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"
index aef609378a423c8a39c10ee257134105421b1a50..39508fab4c8310c96332e06cec2910e3baa08bd2 100644 (file)
@@ -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"
index 49dd1e9aa3302c0133dc996a7d52c42a5c6ca292..1dd04c29c98519cd62988d4e01a8eb5e5c2de913 100644 (file)
@@ -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"
index 2f69c3372b0b0ec0ace53159e4bfaaacfe0f42f9..a656b623458bc6494d2be7c55a49014202b4f6d3 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include <fcntl.h>
+#include "extract-store-integer.h"
 #include "symtab.h"
 #include "bfd.h"
 #include "build-id.h"
index fac4c7d773dbd79e0fd02c7253ef8443035500c0..2cf83ebd90678ac4cf89a6b36cee627637adfbc8 100644 (file)
@@ -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"
index d6166710709c2453e66c7702a9a6730c1b0e210f..3182a7778d33c8a1aa066217970fcf1ee1078802 100644 (file)
@@ -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"
index fbc27ffcb5e686bff79ca749940dfe59503b2f0e..edbc03878dc240c81d2175eeb405c0474c2234c2 100644 (file)
@@ -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"
index e91bba3aadba9ee94532d529e938be6fe856ece6..de444659d9fa8ca1050c3941e20ba04e07b8e413 100644 (file)
@@ -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"
index 6caeb107b9f00114cff1f77d3abc18838a292d1e..cef6efd337956dedd9fe708a59c7f67cf686a9a0 100644 (file)
@@ -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"
index a55107fa32d9edc1912a7f11dd8149d7727f8be0..9c8deaac0210873b4bf6ea64327b6b9fde353904 100644 (file)
@@ -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"
index 9c679222708e014134f70443fbb47f582253c8f6..2922265515d50c5519b6b15420f4072e5f4c4f31 100644 (file)
@@ -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"
index 0b66554efae1acd9e68344584a0e9681084fb7c1..8646f874dcc9a9e70dcc66bdbf539190a01f2329 100644 (file)
@@ -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"
index 2a7d41dc9746bee0f0da4aa513ea705a32d9bc04..b7570a32dc0ba0ab3c89c122a9ba0a1799ae87fe 100644 (file)
@@ -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"
index d9ff7d648252aa03e6df7613e40db2bc54d74a9b..091dc4cc8ac056e58824740e89c4185f908074a2 100644 (file)
@@ -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"
index 3a63b0cc25db75d3df1a8887f2cf5bfdd4611b2b..ac6e291bacc291dd6e8c19d98ba130c4ef77955e 100644 (file)
@@ -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"
index d5ea93cf50386f7f4ac1fdbd4c707d54e4dfa7e0..70a956139a3fa7afe591ceeb49cf7efbcc5c1b56 100644 (file)
@@ -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"
index 79af963b049bfaaab3902991a4d6e72618881142..eb879c1797008ac2fa7bb04bfe1f607204db1b4f 100644 (file)
@@ -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"
index 9db68bbac510e0071f9eeacb6cc6b9ed5d4ea6fb..2d89ab739ffc91e06119626ac6f6bfa9fd1b0996 100644 (file)
@@ -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"
index fc9261314784e2d6fc653a62ea6a073086ce1d48..e64374a67af676ce493f55b6ae4f30ed296920c3 100644 (file)
@@ -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"
index 4b397cbf046dae0f9b7e69291b606242ca680a96..4f7c62d11fa00fc1312f8341f7d34c391908eee7 100644 (file)
@@ -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"
index 3c6b71062a7bf428c5baea7cfedf1aee70cb892c..f8f978179eadc0356a9bdd28872f205d1f637296 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "gmp-utils.h"
 #include "gdbsupport/selftest.h"
+#include "extract-store-integer.h"
 
 #include <math.h>
 
index 6bda14f0fa15bfd5d88fa416efefefb16c4b0f74..531fdb48ab0bc6f20b8f72c5297f7355eec9ef65 100644 (file)
@@ -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"
index 6b152cadcac9fd39594e185589989075c7afa335..7034fa6096b454d335981480122ef6805fd69eb0 100644 (file)
@@ -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"
index a17b937a963198d0f9a940197d08f2e8d450fcd8..f9b54a5d9a938f5cd5e3587f8e3014ef97c5ae9b 100644 (file)
@@ -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"
index 40ffdbe6146f9d1d1d54365b2edd2d19d477f050..13e80c06c9f778f78cd99f616e7bdde40ed3242c 100644 (file)
@@ -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"
index 1bd180a62ccc0fdc96f86abdcd2e80d754cee53f..4df19fde30464a85e6d9bab972e9cae0bc408fe0 100644 (file)
@@ -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"
index dd00898c298cb9fbf0b0b1759a235eaa48d6ba92..a42c872feff140b9a3bdd1d737f815820747097b 100644 (file)
@@ -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"
index f9585adf8fa365d4ee841a7c3503f79b083c1159..af5ccd1a6297cd9580be18c6c2325dfa93f34506 100644 (file)
@@ -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"
index 166e6af8527562ad676f0a708d410e3c022e08fd..a0f6c319b126cc4a5d369daf668d27d079dbc8b3 100644 (file)
@@ -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"
index 2c3d468d8be934efb2d45b6cbca71c8bf9d10854..9dcd3ef06fa1c90a2f468e75e451b149670faf61 100644 (file)
@@ -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"
index ee8e36b18670ea899c0a2c7e92a11b13a364bfa6..530139dbb61c0e0b9b2e7e560f19e83650cb6fd8 100644 (file)
@@ -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"