From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97413 invoked by alias); 20 Jun 2016 13:18:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 97398 invoked by uid 89); 20 Jun 2016 13:17:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=PING, UD:length, sk:free_ex, Read X-HELO: mailuogwdur.emc.com Received: from mailuogwdur.emc.com (HELO mailuogwdur.emc.com) (128.221.224.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 20 Jun 2016 13:17:48 +0000 Received: from maildlpprd55.lss.emc.com (maildlpprd55.lss.emc.com [10.106.48.159]) by mailuogwprd51.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u5KDHfcf002699 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 20 Jun 2016 09:17:45 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com u5KDHfcf002699 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com u5KDHfcf002699 Received: from mailusrhubprd02.lss.emc.com (mailusrhubprd02.lss.emc.com [10.253.24.20]) by maildlpprd55.lss.emc.com (RSA Interceptor) for ; Mon, 20 Jun 2016 09:17:04 -0400 Received: from MXHUB207.corp.emc.com (MXHUB207.corp.emc.com [10.253.68.33]) by mailusrhubprd02.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u5KDHRbm027784 (version=TLSv1.2 cipher=AES128-SHA256 bits=128 verify=FAIL) for ; Mon, 20 Jun 2016 09:17:27 -0400 Received: from MX203CL03.corp.emc.com ([fe80::4dee:b763:b476:8fbc]) by MXHUB207.corp.emc.com ([10.253.68.33]) with mapi id 14.03.0266.001; Mon, 20 Jun 2016 09:17:27 -0400 From: "taylor, david" To: "taylor, david" , "gdb-patches@sourceware.org" Subject: [PING] RE: [PATCH v2] Support structure offsets that are 512K bytes or larger. Date: Mon, 20 Jun 2016 13:18:00 -0000 Message-ID: <63F1AEE13FAE864586D589C671A6E18B063332@MX203CL03.corp.emc.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd02.lss.emc.com X-RSA-Classifications: public X-SW-Source: 2016-06/txt/msg00324.txt.bz2 Ping. Previous ping failed to add '[PING]' to subject line. > -----Original Message----- > From: David Taylor [mailto:dtaylor@emc.com] > Sent: Friday, June 03, 2016 5:16 PM > To: gdb-patches@sourceware.org > Cc: taylor, david > Subject: [PATCH v2] Support structure offsets that are 512K bytes or larg= er. >=20 > This patch was originally posted in Dec 2014. I got busy with other > things. It has been updated. I think I addressed the issues raised in > the original review (long lines, plongest vs %lld, ChangeLog entry, > copyright notice) and hopefully did not introduce any new issues. >=20 > We have a copyright assignment on file. >=20 > GDB historically uses a 32 bit integer for computing structure > offsets. And first computes the bit offset and then divides by 8 to > get the byte offset. This means that if the offset is 512K bytes or > larger, it overflows. This modifies GDB to use LONGEST instead. >=20 > No regressions on x86-64 GNU/Linux. >=20 > PR gdb/17520 Structure offset wrong when 1/4 GB or greater. > * c-lang.h: Change all parameters, variables, and struct or union > members used as struct or union fieild offsets from int to > LONGEST. > * c-valprint.c: Likewise. > * cp-abi.c: Likewise. > * cp-abi.h: Likewise. > * cp-valprint.c: Likewise. > * d-valprint.c: Likewise. > * dwarf2loc.c: Likewise. > * eval.c: Likewise. > * extension-priv.h: Likewise. > * extension.c: Likewise. > * extension.h: Likewise. > * findvar.c: Likewise. > * gdbtypes.h: Likewise. > * gnu-v2-abi.c: Likewise. > * gnu-v3-abi.c: Likewise. > * go-valprint.c: Likewise. > * guile/guile-internal.h: Likewise. > * guile/scm-pretty-print.c: Likewise. > * jv-valprint.c Likewise. > * opencl-lang.c: Likewise. > * p-lang.h: Likewise. > * python/py-prettyprint.c: Likewise. > * python/python-internal.h: Likewise. > * spu-tdep.c: Likewise. > * typeprint.c: Likewise. > * valarith.c: Likewise. > * valops.c: Likewise. > * valprint.c: Likewise. > * valprint.h: Likewise. > * value.c: Likewise. > * value.h: Likewise. > * p-valprint.c: Likewise. > * c-typeprint.c (c_type_print_base): When printing offset, use > plongest, not %d. > * gdbtypes.c (recursive_dump_type): Ditto. >=20 > * gdb.base/offsets.exp: New file. > * gdb.base/offsets.c: New file. > --- > gdb/ChangeLog | 40 ++++++++++++ > gdb/c-lang.h | 4 +- > gdb/c-typeprint.c | 11 ++-- > gdb/c-valprint.c | 3 +- > gdb/cp-abi.c | 4 +- > gdb/cp-abi.h | 8 +-- > gdb/cp-valprint.c | 15 ++--- > gdb/d-valprint.c | 2 +- > gdb/dwarf2loc.c | 7 ++- > gdb/eval.c | 3 +- > gdb/extension-priv.h | 2 +- > gdb/extension.c | 2 +- > gdb/extension.h | 2 +- > gdb/findvar.c | 4 +- > gdb/gdbtypes.c | 4 +- > gdb/gdbtypes.h | 2 +- > gdb/gnu-v2-abi.c | 6 +- > gdb/gnu-v3-abi.c | 4 +- > gdb/go-valprint.c | 2 +- > gdb/guile/guile-internal.h | 2 +- > gdb/guile/scm-pretty-print.c | 2 +- > gdb/jv-valprint.c | 2 +- > gdb/opencl-lang.c | 10 +-- > gdb/p-lang.h | 2 +- > gdb/p-valprint.c | 11 ++-- > gdb/python/py-prettyprint.c | 2 +- > gdb/python/python-internal.h | 2 +- > gdb/spu-tdep.c | 2 +- > gdb/testsuite/ChangeLog | 5 ++ > gdb/testsuite/gdb.base/offsets.c | 28 +++++++++ > gdb/testsuite/gdb.base/offsets.exp | 45 ++++++++++++++ > gdb/typeprint.c | 2 +- > gdb/valarith.c | 4 +- > gdb/valops.c | 65 ++++++++++---------- > gdb/valprint.c | 8 +-- > gdb/valprint.h | 4 +- > gdb/value.c | 122 +++++++++++++++++++------------= ------ > gdb/value.h | 79 ++++++++++++------------ > 38 files changed, 328 insertions(+), 194 deletions(-) > create mode 100644 gdb/testsuite/gdb.base/offsets.c > create mode 100644 gdb/testsuite/gdb.base/offsets.exp >=20 > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 04c1686..1a3b780 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,43 @@ > +2016-06-01 David Taylor > + > + PR gdb/17520 Structure offset wrong when 1/4 GB or greater. > + * c-lang.h: Change all parameters, variables, and struct or union > + members used as struct or union fie3ld offsets from int to > + LONGEST. > + * c-valprint.c: Likewise. > + * cp-abi.c: Likewise. > + * cp-abi.h: Likewise. > + * cp-valprint.c: Likewise. > + * d-valprint.c: Likewise. > + * dwarf2loc.c: Likewise. > + * eval.c: Likewise. > + * extension-priv.h: Likewise. > + * extension.c: Likewise. > + * extension.h: Likewise. > + * findvar.c: Likewise. > + * gdbtypes.h: Likewise. > + * gnu-v2-abi.c: Likewise. > + * gnu-v3-abi.c: Likewise. > + * go-valprint.c: Likewise. > + * guile/guile-internal.h: Likewise. > + * guile/scm-pretty-print.c: Likewise. > + * jv-valprint.c Likewise. > + * opencl-lang.c: Likewise. > + * p-lang.h: Likewise. > + * python/py-prettyprint.c: Likewise. > + * python/python-internal.h: Likewise. > + * spu-tdep.c: Likewise. > + * typeprint.c: Likewise. > + * valarith.c: Likewise. > + * valops.c: Likewise. > + * valprint.c: Likewise. > + * valprint.h: Likewise. > + * value.c: Likewise. > + * value.h: Likewise. > + * p-valprint.c: Likewise. > + * c-typeprint.c (c_type_print_base): When printing offset, use > plongest, not %d. > + * gdbtypes.c (recursive_dump_type): Ditto. > + > 2016-05-30 Jan Kratochvil >=20 > PR c++/15231 > diff --git a/gdb/c-lang.h b/gdb/c-lang.h > index bf50afc..12be8bf 100644 > --- a/gdb/c-lang.h > +++ b/gdb/c-lang.h > @@ -123,14 +123,14 @@ extern void cp_print_class_member (const > gdb_byte *, struct type *, > struct ui_file *, char *); >=20 > extern void cp_print_value_fields (struct type *, struct type *, > - const gdb_byte *, int, CORE_ADDR, > + const gdb_byte *, LONGEST, CORE_ADDR, > struct ui_file *, int, > const struct value *, > const struct value_print_options *, > struct type **, int); >=20 > extern void cp_print_value_fields_rtti (struct type *, > - const gdb_byte *, int, CORE_ADDR, > + const gdb_byte *, LONGEST, > CORE_ADDR, > struct ui_file *, int, > const struct value *, > const struct value_print_options *, > diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c > index ed16fc3..2564ebc 100644 > --- a/gdb/c-typeprint.c > +++ b/gdb/c-typeprint.c > @@ -1437,13 +1437,14 @@ c_type_print_base (struct type *type, struct > ui_file *stream, > TYPE_FIELD_NAME (type, i), > stream, show, level + 4, > &local_flags); > - fprintf_filtered (stream, " @%d", > - TYPE_FIELD_BITPOS (type, i)); > + fprintf_filtered (stream, " @%s", > + plongest (TYPE_FIELD_BITPOS (type, i))); > if (TYPE_FIELD_BITSIZE (type, i) > 1) > { > - fprintf_filtered (stream, "-%d", > - TYPE_FIELD_BITPOS (type, i) > - + TYPE_FIELD_BITSIZE (type, i) - 1); > + fprintf_filtered (stream, "-%s", > + plongest (TYPE_FIELD_BITPOS (type, i) > + + TYPE_FIELD_BITSIZE (type, > i) > + - 1)); > } > fprintf_filtered (stream, ";\n"); > } > diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c > index 61302a3..2cb418d 100644 > --- a/gdb/c-valprint.c > +++ b/gdb/c-valprint.c > @@ -567,7 +567,8 @@ c_value_print (struct value *val, struct ui_file > *stream, > const struct value_print_options *options) > { > struct type *type, *real_type, *val_type; > - int full, top, using_enc; > + int full, using_enc; > + LONGEST top; > struct value_print_options opts =3D *options; >=20 > opts.deref_ref =3D 1; > diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c > index 96533b1..afc4d4a 100644 > --- a/gdb/cp-abi.c > +++ b/gdb/cp-abi.c > @@ -66,7 +66,7 @@ is_operator_name (const char *name) >=20 > int > baseclass_offset (struct type *type, int index, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > const struct value *val) > { > int res =3D 0; > @@ -106,7 +106,7 @@ value_virtual_fn_field (struct value **arg1p, >=20 > struct type * > value_rtti_type (struct value *v, int *full, > - int *top, int *using_enc) > + LONGEST *top, int *using_enc) > { > struct type *ret =3D NULL; >=20 > diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h > index 6d038f3..4349a4a 100644 > --- a/gdb/cp-abi.h > +++ b/gdb/cp-abi.h > @@ -135,7 +135,7 @@ extern struct value *value_virtual_fn_field (struct > value **valuep, > FULL, TOP, and USING_ENC can each be zero, in which case we don't > provide the corresponding piece of information. */ > extern struct type *value_rtti_type (struct value *value, > - int *full, int *top, > + int *full, LONGEST *top, > int *using_enc); >=20 > /* Compute the offset of the baseclass which is the INDEXth baseclass > @@ -146,7 +146,7 @@ extern struct type *value_rtti_type (struct value > *value, >=20 > extern int baseclass_offset (struct type *type, > int index, const gdb_byte *valaddr, > - int embedded_offset, > + LONGEST embedded_offset, > CORE_ADDR address, > const struct value *val); >=20 > @@ -229,9 +229,9 @@ struct cp_abi_ops > int j, struct type * type, > int offset); > struct type *(*rtti_type) (struct value *v, int *full, > - int *top, int *using_enc); > + LONGEST *top, int *using_enc); > int (*baseclass_offset) (struct type *type, int index, > - const bfd_byte *valaddr, int embedded_offset, > + const bfd_byte *valaddr, LONGEST > embedded_offset, > CORE_ADDR address, const struct value *val); > void (*print_method_ptr) (const gdb_byte *contents, > struct type *type, > diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c > index effce30..7b0c19a 100644 > --- a/gdb/cp-valprint.c > +++ b/gdb/cp-valprint.c > @@ -80,7 +80,7 @@ static void cp_print_static_field (struct type *, struct > value *, > const struct value_print_options *); >=20 > static void cp_print_value (struct type *, struct type *, > - const gdb_byte *, int, > + const gdb_byte *, LONGEST, > CORE_ADDR, struct ui_file *, > int, const struct value *, > const struct value_print_options *, > @@ -154,7 +154,7 @@ cp_is_vtbl_member (struct type *type) >=20 > void > cp_print_value_fields (struct type *type, struct type *real_type, > - const gdb_byte *valaddr, int offset, > + const gdb_byte *valaddr, LONGEST offset, > CORE_ADDR address, struct ui_file *stream, > int recurse, const struct value *val, > const struct value_print_options *options, > @@ -417,7 +417,7 @@ cp_print_value_fields (struct type *type, struct type > *real_type, >=20 > void > cp_print_value_fields_rtti (struct type *type, > - const gdb_byte *valaddr, int offset, > + const gdb_byte *valaddr, LONGEST offset, > CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, > @@ -434,7 +434,8 @@ cp_print_value_fields_rtti (struct type *type, > TARGET_CHAR_BIT * TYPE_LENGTH > (type))) > { > struct value *value; > - int full, top, using_enc; > + int full, using_enc; > + LONGEST top; >=20 > /* Ugh, we have to convert back to a value here. */ > value =3D value_from_contents_and_address (type, valaddr + offset, > @@ -459,7 +460,7 @@ cp_print_value_fields_rtti (struct type *type, >=20 > static void > cp_print_value (struct type *type, struct type *real_type, > - const gdb_byte *valaddr, int offset, > + const gdb_byte *valaddr, LONGEST offset, > CORE_ADDR address, struct ui_file *stream, > int recurse, const struct value *val, > const struct value_print_options *options, > @@ -469,7 +470,7 @@ cp_print_value (struct type *type, struct type > *real_type, > =3D (struct type **) obstack_next_free (&dont_print_vb_obstack); > struct obstack tmp_obstack =3D dont_print_vb_obstack; > int i, n_baseclasses =3D TYPE_N_BASECLASSES (type); > - int thisoffset; > + LONGEST thisoffset; > struct type *thistype; >=20 > if (dont_print_vb =3D=3D 0) > @@ -483,7 +484,7 @@ cp_print_value (struct type *type, struct type > *real_type, >=20 > for (i =3D 0; i < n_baseclasses; i++) > { > - int boffset =3D 0; > + LONGEST boffset =3D 0; > int skip =3D 0; > struct type *baseclass =3D check_typedef (TYPE_BASECLASS (type, i)= ); > const char *basename =3D TYPE_NAME (baseclass); > diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c > index 8527424..620688b 100644 > --- a/gdb/d-valprint.c > +++ b/gdb/d-valprint.c > @@ -29,7 +29,7 @@ >=20 > static int > dynamic_array_type (struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options) > diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c > index bfe1173..f53b436 100644 > --- a/gdb/dwarf2loc.c > +++ b/gdb/dwarf2loc.c > @@ -1765,7 +1765,7 @@ read_pieced_value (struct value *v) > struct gdbarch *arch =3D get_frame_arch (frame); > int gdb_regnum =3D dwarf_reg_to_regnum_or_error (arch, p- > >v.regno); > int optim, unavail; > - int reg_offset =3D source_offset; > + LONGEST reg_offset =3D source_offset; >=20 > if (gdbarch_byte_order (arch) =3D=3D BFD_ENDIAN_BIG > && this_size < register_size (arch, gdb_regnum)) > @@ -2016,7 +2016,7 @@ write_pieced_value (struct value *to, struct value > *from) > a synthetic pointer. */ >=20 > static int > -check_pieced_synthetic_pointer (const struct value *value, int bit_offse= t, > +check_pieced_synthetic_pointer (const struct value *value, LONGEST > bit_offset, > int bit_length) > { > struct piece_closure *c > @@ -2072,7 +2072,8 @@ indirect_pieced_value (struct value *value) > struct type *type; > struct frame_info *frame; > struct dwarf2_locexpr_baton baton; > - int i, bit_offset, bit_length; > + int i, bit_length; > + LONGEST bit_offset; > struct dwarf_expr_piece *piece =3D NULL; > LONGEST byte_offset; > enum bfd_endian byte_order; > diff --git a/gdb/eval.c b/gdb/eval.c > index de1c663..00a107c 100644 > --- a/gdb/eval.c > +++ b/gdb/eval.c > @@ -1900,7 +1900,8 @@ evaluate_subexp_standard (struct type > *expect_type, > { > struct type *type =3D value_type (arg1); > struct type *real_type; > - int full, top, using_enc; > + int full, using_enc; > + LONGEST top; > struct value_print_options opts; >=20 > get_user_print_options (&opts); > diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h > index d7bc572..26bd21f 100644 > --- a/gdb/extension-priv.h > +++ b/gdb/extension-priv.h > @@ -181,7 +181,7 @@ struct extension_language_ops > enum ext_lang_rc (*apply_val_pretty_printer) > (const struct extension_language_defn *, > struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, const struct value_print_options *options, > const struct language_defn *language); > diff --git a/gdb/extension.c b/gdb/extension.c > index ae24518..c9f5664 100644 > --- a/gdb/extension.c > +++ b/gdb/extension.c > @@ -497,7 +497,7 @@ free_ext_lang_type_printers (struct > ext_lang_type_printers *printers) >=20 > int > apply_ext_lang_val_pretty_printer (struct type *type, const gdb_byte > *valaddr, > - int embedded_offset, CORE_ADDR > address, > + LONGEST embedded_offset, CORE_ADDR > address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > diff --git a/gdb/extension.h b/gdb/extension.h > index e9980a7..fa11f25 100644 > --- a/gdb/extension.h > +++ b/gdb/extension.h > @@ -226,7 +226,7 @@ extern void free_ext_lang_type_printers (struct > ext_lang_type_printers *); >=20 > extern int apply_ext_lang_val_pretty_printer > (struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, const struct value_print_options *options, > const struct language_defn *language); > diff --git a/gdb/findvar.c b/gdb/findvar.c > index a39d897..6733ff1 100644 > --- a/gdb/findvar.c > +++ b/gdb/findvar.c > @@ -834,8 +834,8 @@ void > read_frame_register_value (struct value *value, struct frame_info *frame) > { > struct gdbarch *gdbarch =3D get_frame_arch (frame); > - int offset =3D 0; > - int reg_offset =3D value_offset (value); > + LONGEST offset =3D 0; > + LONGEST reg_offset =3D value_offset (value); > int regnum =3D VALUE_REGNUM (value); > int len =3D type_length_units (check_typedef (value_type (value))); >=20 > diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c > index 9e1759b..d721d65 100644 > --- a/gdb/gdbtypes.c > +++ b/gdb/gdbtypes.c > @@ -4297,8 +4297,8 @@ recursive_dump_type (struct type *type, int > spaces) > idx, plongest (TYPE_FIELD_ENUMVAL (type, idx))); > else > printfi_filtered (spaces + 2, > - "[%d] bitpos %d bitsize %d type ", > - idx, TYPE_FIELD_BITPOS (type, idx), > + "[%d] bitpos %s bitsize %d type ", > + idx, plongest (TYPE_FIELD_BITPOS (type, idx)), > TYPE_FIELD_BITSIZE (type, idx)); > gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout); > printf_filtered (" name '%s' (", > diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h > index c651c88..bbf2672 100644 > --- a/gdb/gdbtypes.h > +++ b/gdb/gdbtypes.h > @@ -511,7 +511,7 @@ union field_location > gdbarch_bits_big_endian=3D0 targets, it is the bit offset to > the LSB. */ >=20 > - int bitpos; > + LONGEST bitpos; >=20 > /* * Enum value. */ > LONGEST enumval; > diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c > index 7618d48..d2a0e35 100644 > --- a/gdb/gnu-v2-abi.c > +++ b/gdb/gnu-v2-abi.c > @@ -183,7 +183,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct > fn_field * f, int j, >=20 >=20 > static struct type * > -gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_= enc) > +gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int > *using_enc) > { > struct type *known_type; > struct type *rtti_type; > @@ -340,7 +340,7 @@ vb_match (struct type *type, int index, struct type > *basetype) >=20 > static int > gnuv2_baseclass_offset (struct type *type, int index, > - const bfd_byte *valaddr, int embedded_offset, > + const bfd_byte *valaddr, LONGEST > embedded_offset, > CORE_ADDR address, const struct value *val) > { > struct type *basetype =3D TYPE_BASECLASS (type, index); > @@ -358,7 +358,7 @@ gnuv2_baseclass_offset (struct type *type, int index, > if (vb_match (type, i, basetype)) > { > struct type *field_type; > - int field_offset; > + LONGEST field_offset; > int field_length; > CORE_ADDR addr; >=20 > diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c > index ae84b36..5bf36a2 100644 > --- a/gdb/gnu-v3-abi.c > +++ b/gdb/gnu-v3-abi.c > @@ -286,7 +286,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarch, >=20 > static struct type * > gnuv3_rtti_type (struct value *value, > - int *full_p, int *top_p, int *using_enc_p) > + int *full_p, LONGEST *top_p, int *using_enc_p) > { > struct gdbarch *gdbarch; > struct type *values_type =3D check_typedef (value_type (value)); > @@ -443,7 +443,7 @@ gnuv3_virtual_fn_field (struct value **value_p, >=20 > static int > gnuv3_baseclass_offset (struct type *type, int index, > - const bfd_byte *valaddr, int embedded_offset, > + const bfd_byte *valaddr, LONGEST > embedded_offset, > CORE_ADDR address, const struct value *val) > { > struct gdbarch *gdbarch; > diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c > index 7bb7b55..34ed8e0 100644 > --- a/gdb/go-valprint.c > +++ b/gdb/go-valprint.c > @@ -37,7 +37,7 @@ >=20 > static void > print_go_string (struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options) > diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h > index b7f104d..0aa4a0a 100644 > --- a/gdb/guile/guile-internal.h > +++ b/gdb/guile/guile-internal.h > @@ -606,7 +606,7 @@ extern void gdbscm_preserve_values > extern enum ext_lang_rc gdbscm_apply_val_pretty_printer > (const struct extension_language_defn *, > struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c > index b1cbbdd..afdd0c7 100644 > --- a/gdb/guile/scm-pretty-print.c > +++ b/gdb/guile/scm-pretty-print.c > @@ -958,7 +958,7 @@ ppscm_print_children (SCM printer, enum > display_hint hint, > enum ext_lang_rc > gdbscm_apply_val_pretty_printer (const struct extension_language_defn > *extlang, > struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR > address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c > index 6f7ef4b..2988737 100644 > --- a/gdb/jv-valprint.c > +++ b/gdb/jv-valprint.c > @@ -266,7 +266,7 @@ java_value_print (struct value *val, struct ui_file > *stream, >=20 > static void > java_print_value_fields (struct type *type, const gdb_byte *valaddr, > - int offset, > + LONGEST offset, > CORE_ADDR address, struct ui_file *stream, > int recurse, > const struct value *val, > diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c > index 767d3bc..d304d44 100644 > --- a/gdb/opencl-lang.c > +++ b/gdb/opencl-lang.c > @@ -172,8 +172,8 @@ lval_func_read (struct value *v) > struct lval_closure *c =3D (struct lval_closure *) value_computed_clos= ure (v); > struct type *type =3D check_typedef (value_type (v)); > struct type *eltype =3D TYPE_TARGET_TYPE (check_typedef (value_type (c- > >val))); > - int offset =3D value_offset (v); > - int elsize =3D TYPE_LENGTH (eltype); > + LONGEST offset =3D value_offset (v); > + LONGEST elsize =3D TYPE_LENGTH (eltype); > int n, i, j =3D 0; > LONGEST lowb =3D 0; > LONGEST highb =3D 0; > @@ -201,8 +201,8 @@ lval_func_write (struct value *v, struct value > *fromval) > struct lval_closure *c =3D (struct lval_closure *) value_computed_clos= ure (v); > struct type *type =3D check_typedef (value_type (v)); > struct type *eltype =3D TYPE_TARGET_TYPE (check_typedef (value_type (c- > >val))); > - int offset =3D value_offset (v); > - int elsize =3D TYPE_LENGTH (eltype); > + LONGEST offset =3D value_offset (v); > + LONGEST elsize =3D TYPE_LENGTH (eltype); > int n, i, j =3D 0; > LONGEST lowb =3D 0; > LONGEST highb =3D 0; > @@ -243,7 +243,7 @@ lval_func_write (struct value *v, struct value > *fromval) >=20 > static int > lval_func_check_synthetic_pointer (const struct value *v, > - int offset, int length) > + LONGEST offset, int length) > { > struct lval_closure *c =3D (struct lval_closure *) value_computed_clos= ure (v); > /* Size of the target type in bits. */ > diff --git a/gdb/p-lang.h b/gdb/p-lang.h > index d862b49..287c0f4 100644 > --- a/gdb/p-lang.h > +++ b/gdb/p-lang.h > @@ -72,7 +72,7 @@ extern void > const struct type_print_options *); >=20 > extern void pascal_object_print_value_fields (struct type *, const gdb_b= yte > *, > - int, > + LONGEST, > CORE_ADDR, struct ui_file *, > int, > const struct value *, > diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c > index 3e840d8..dcd9f07 100644 > --- a/gdb/p-valprint.c > +++ b/gdb/p-valprint.c > @@ -469,7 +469,7 @@ static void pascal_object_print_static_field (struct > value *, > const struct value_print_options > *); >=20 > static void pascal_object_print_value (struct type *, const gdb_byte *, > - int, > + LONGEST, > CORE_ADDR, struct ui_file *, int, > const struct value *, > const struct value_print_options *, > @@ -528,7 +528,7 @@ pascal_object_is_vtbl_member (struct type *type) >=20 > void > pascal_object_print_value_fields (struct type *type, const gdb_byte > *valaddr, > - int offset, > + LONGEST offset, > CORE_ADDR address, struct ui_file *stream, > int recurse, > const struct value *val, > @@ -700,7 +700,7 @@ pascal_object_print_value_fields (struct type *type, > const gdb_byte *valaddr, >=20 > static void > pascal_object_print_value (struct type *type, const gdb_byte *valaddr, > - int offset, > + LONGEST offset, > CORE_ADDR address, struct ui_file *stream, > int recurse, > const struct value *val, > @@ -723,11 +723,12 @@ pascal_object_print_value (struct type *type, const > gdb_byte *valaddr, >=20 > for (i =3D 0; i < n_baseclasses; i++) > { > - int boffset =3D 0; > + LONGEST boffset =3D 0; > struct type *baseclass =3D check_typedef (TYPE_BASECLASS (type, i)= ); > const char *basename =3D type_name_no_tag (baseclass); > const gdb_byte *base_valaddr =3D NULL; > - int thisoffset; > + LONGEST thisoffset; > + volatile struct gdb_exception ex; /* XXX */ > int skip =3D 0; >=20 > if (BASETYPE_VIA_VIRTUAL (type, i)) > diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c > index e97769b..8834344 100644 > --- a/gdb/python/py-prettyprint.c > +++ b/gdb/python/py-prettyprint.c > @@ -703,7 +703,7 @@ print_children (PyObject *printer, const char *hint, > enum ext_lang_rc > gdbpy_apply_val_pretty_printer (const struct extension_language_defn > *extlang, > struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR > address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h > index 6a2619c..8606850 100644 > --- a/gdb/python/python-internal.h > +++ b/gdb/python/python-internal.h > @@ -316,7 +316,7 @@ extern int gdbpy_auto_load_enabled (const struct > extension_language_defn *); > extern enum ext_lang_rc gdbpy_apply_val_pretty_printer > (const struct extension_language_defn *, > struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c > index ea3229c..f62e8e7 100644 > --- a/gdb/spu-tdep.c > +++ b/gdb/spu-tdep.c > @@ -363,7 +363,7 @@ spu_value_from_register (struct gdbarch *gdbarch, > struct type *type, > { > struct value *value =3D default_value_from_register (gdbarch, type, > regnum, frame_id); > - int len =3D TYPE_LENGTH (type); > + LONGEST len =3D TYPE_LENGTH (type); >=20 > if (regnum < SPU_NUM_GPRS && len < 16) > { > diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog > index b91ddce..d8497e8 100644 > --- a/gdb/testsuite/ChangeLog > +++ b/gdb/testsuite/ChangeLog > @@ -1,3 +1,8 @@ > +2016-06-02 David Taylor > + > + * gdb.base/offsets.exp: New file. > + * gdb.base/offsets.c: New file. > + > 2016-05-30 Antoine Tremblay >=20 > * gdb.trace/trace-condition.exp: Add 64bit tests. > diff --git a/gdb/testsuite/gdb.base/offsets.c > b/gdb/testsuite/gdb.base/offsets.c > new file mode 100644 > index 0000000..4923d33 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/offsets.c > @@ -0,0 +1,28 @@ > +/* This testcase is part of GDB, the GNU debugger. > + > + Copyright 2015 Free Software Foundation, Inc. > + > + 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 .= */ > + > +struct big_struct > +{ > + char first[0x10000000 + 16]; > + long second; > +} big_struct; > + > +int > +main (int argc, char *argv[]) > +{ > + return (0); > +} > diff --git a/gdb/testsuite/gdb.base/offsets.exp > b/gdb/testsuite/gdb.base/offsets.exp > new file mode 100644 > index 0000000..42c0c5d > --- /dev/null > +++ b/gdb/testsuite/gdb.base/offsets.exp > @@ -0,0 +1,45 @@ > +# Test big offsets > + > +# Copyright (c) 2015 Free Software Foundation, Inc. > + > +# 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 . > + > +standard_testfile offsets.c > + > +if { [prepare_for_testing "failed to prepare for testing large offsets" \ > + ${testfile} ${srcfile}] } { > + untested offsets.exp > + return -1 > +} > + > +set test "print &big_struct test" > +gdb_test_multiple "print &big_struct" "$test" { > + -re "\\$\[0-9\]* =3D .* (0x\[0-9a-fA-F\]*) .*\[\r\n\]*$gdb_prompt $"= { > + set addr1 $expect_out(1,string) > + pass "$test ($addr1)" > + } > +} > + > +set test "print &big_struct.second test" > +gdb_test_multiple "print &big_struct.second" "$test" { > + -re "\\$\[0-9\]* =3D .* (0x\[0-9a-fA-F\]*) .*\[\r\n\]*$gdb_prompt $"= { > + set addr2 $expect_out(1,string) > + > + if {[expr $addr2 - $addr1] =3D=3D [expr 0x10000000 + 16]} { > + pass "big offsets" > + } else { > + fail "big offsets" > + } > + } > +} > diff --git a/gdb/typeprint.c b/gdb/typeprint.c > index 48a809b..e77513e 100644 > --- a/gdb/typeprint.c > +++ b/gdb/typeprint.c > @@ -406,7 +406,7 @@ whatis_exp (char *exp, int show) > struct type *real_type =3D NULL; > struct type *type; > int full =3D 0; > - int top =3D -1; > + LONGEST top =3D -1; > int using_enc =3D 0; > struct value_print_options opts; > struct type_print_options flags =3D default_ptype_flags; > diff --git a/gdb/valarith.c b/gdb/valarith.c > index 254d998..de6fcfd 100644 > --- a/gdb/valarith.c > +++ b/gdb/valarith.c > @@ -192,8 +192,8 @@ value_subscripted_rvalue (struct value *array, > LONGEST index, int lowerbound) > { > struct type *array_type =3D check_typedef (value_type (array)); > struct type *elt_type =3D check_typedef (TYPE_TARGET_TYPE (array_type)= ); > - unsigned int elt_size =3D type_length_units (elt_type); > - unsigned int elt_offs =3D elt_size * longest_to_int (index - lowerboun= d); > + ULONGEST elt_size =3D type_length_units (elt_type); > + ULONGEST elt_offs =3D elt_size * (index - lowerbound); > struct value *v; >=20 > if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED > (array_type) > diff --git a/gdb/valops.c b/gdb/valops.c > index 71fb1b3..dbc36cb 100644 > --- a/gdb/valops.c > +++ b/gdb/valops.c > @@ -51,7 +51,7 @@ static struct value *search_struct_field (const char *, > struct value *, >=20 > static struct value *search_struct_method (const char *, struct value **, > struct value **, > - int, int *, struct type *); > + LONGEST, int *, struct type *); >=20 > static int find_oload_champ_namespace (struct value **, int, > const char *, const char *, > @@ -96,9 +96,9 @@ static CORE_ADDR allocate_space_in_inferior (int); > static struct value *cast_into_complex (struct type *, struct value *); >=20 > static void find_method_list (struct value **, const char *, > - int, struct type *, struct fn_field **, int *, > + LONGEST, struct type *, struct fn_field **, int *, > VEC (xmethod_worker_ptr) **, > - struct type **, int *); > + struct type **, LONGEST *); >=20 > void _initialize_valops (void); >=20 > @@ -256,7 +256,8 @@ value_cast_structs (struct type *type, struct value > *v2) > if (TYPE_NAME (t2) !=3D NULL) > { > /* Try downcasting using the run-time type of the value. */ > - int full, top, using_enc; > + int full, using_enc; > + LONGEST top; > struct type *real_type; >=20 > real_type =3D value_rtti_type (v2, &full, &top, &using_enc); > @@ -635,7 +636,7 @@ value_reinterpret_cast (struct type *type, struct > value *arg) > static int > dynamic_cast_check_1 (struct type *desired_type, > const gdb_byte *valaddr, > - int embedded_offset, > + LONGEST embedded_offset, > CORE_ADDR address, > struct value *val, > struct type *search_type, > @@ -647,8 +648,9 @@ dynamic_cast_check_1 (struct type *desired_type, >=20 > for (i =3D 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2= ; ++i) > { > - int offset =3D baseclass_offset (search_type, i, valaddr, embedded= _offset, > - address, val); > + LONGEST offset =3D baseclass_offset (search_type, i, valaddr, > + embedded_offset, > + address, val); >=20 > if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, > i))) > { > @@ -682,7 +684,7 @@ dynamic_cast_check_1 (struct type *desired_type, > static int > dynamic_cast_check_2 (struct type *desired_type, > const gdb_byte *valaddr, > - int embedded_offset, > + LONGEST embedded_offset, > CORE_ADDR address, > struct value *val, > struct type *search_type, > @@ -692,7 +694,7 @@ dynamic_cast_check_2 (struct type *desired_type, >=20 > for (i =3D 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2= ; ++i) > { > - int offset; > + LONGEST offset; >=20 > if (! BASETYPE_VIA_PUBLIC (search_type, i)) > continue; > @@ -723,7 +725,8 @@ dynamic_cast_check_2 (struct type *desired_type, > struct value * > value_dynamic_cast (struct type *type, struct value *arg) > { > - int full, top, using_enc; > + int full, using_enc; > + LONGEST top; > struct type *resolved_type =3D check_typedef (type); > struct type *arg_type =3D check_typedef (value_type (arg)); > struct type *class_type, *rtti_type; > @@ -954,7 +957,7 @@ value_at_lazy (struct type *type, CORE_ADDR addr) > } >=20 > void > -read_value_memory (struct value *val, int embedded_offset, > +read_value_memory (struct value *val, LONGEST embedded_offset, > int stack, CORE_ADDR memaddr, > gdb_byte *buffer, size_t length) > { > @@ -1034,7 +1037,7 @@ value_assign (struct value *toval, struct value > *fromval) >=20 > case lval_internalvar_component: > { > - int offset =3D value_offset (toval); > + LONGEST offset =3D value_offset (toval); >=20 > /* Are we dealing with a bitfield? >=20 > @@ -1121,7 +1124,7 @@ value_assign (struct value *toval, struct value > *fromval) > if (value_bitsize (toval)) > { > struct value *parent =3D value_parent (toval); > - int offset =3D value_offset (parent) + value_offset (toval); > + LONGEST offset =3D value_offset (parent) + value_offset (toval); > int changed_len; > gdb_byte buffer[sizeof (LONGEST)]; > int optim, unavail; > @@ -1594,7 +1597,7 @@ value_array (int lowbound, int highbound, struct > value **elemvec) > { > int nelem; > int idx; > - unsigned int typelength; > + ULONGEST typelength; > struct value *val; > struct type *arraytype; >=20 > @@ -1770,7 +1773,7 @@ typecmp (int staticp, int varargs, int nargs, >=20 > static void > update_search_result (struct value **result_ptr, struct value *v, > - int *last_boffset, int boffset, > + LONGEST *last_boffset, LONGEST boffset, > const char *name, struct type *type) > { > if (v !=3D NULL) > @@ -1794,10 +1797,10 @@ update_search_result (struct value **result_ptr, > struct value *v, > lookup is ambiguous. */ >=20 > static void > -do_search_struct_field (const char *name, struct value *arg1, int offset, > +do_search_struct_field (const char *name, struct value *arg1, LONGEST > offset, > struct type *type, int looking_for_baseclass, > struct value **result_ptr, > - int *last_boffset, > + LONGEST *last_boffset, > struct type *outermost_type) > { > int i; > @@ -1844,7 +1847,7 @@ do_search_struct_field (const char *name, struct > value *arg1, int offset, > . */ >=20 > struct value *v =3D NULL; > - int new_offset =3D offset; > + LONGEST new_offset =3D offset; >=20 > /* This is pretty gross. In G++, the offset in an > anonymous union is relative to the beginning of the > @@ -1883,7 +1886,7 @@ do_search_struct_field (const char *name, struct > value *arg1, int offset, > && (strcmp_iw (name, > TYPE_BASECLASS_NAME (type, > i)) =3D=3D 0)); > - int boffset =3D value_embedded_offset (arg1) + offset; > + LONGEST boffset =3D value_embedded_offset (arg1) + offset; >=20 > if (BASETYPE_VIA_VIRTUAL (type, i)) > { > @@ -1959,7 +1962,7 @@ search_struct_field (const char *name, struct value > *arg1, > struct type *type, int looking_for_baseclass) > { > struct value *result =3D NULL; > - int boffset =3D 0; > + LONGEST boffset =3D 0; >=20 > do_search_struct_field (name, arg1, 0, type, looking_for_baseclass, > &result, &boffset, type); > @@ -1976,7 +1979,7 @@ search_struct_field (const char *name, struct value > *arg1, >=20 > static struct value * > search_struct_method (const char *name, struct value **arg1p, > - struct value **args, int offset, > + struct value **args, LONGEST offset, > int *static_memfuncp, struct type *type) > { > int i; > @@ -2040,8 +2043,8 @@ search_struct_method (const char *name, struct > value **arg1p, >=20 > for (i =3D TYPE_N_BASECLASSES (type) - 1; i >=3D 0; i--) > { > - int base_offset; > - int this_offset; > + LONGEST base_offset; > + LONGEST this_offset; >=20 > if (BASETYPE_VIA_VIRTUAL (type, i)) > { > @@ -2274,10 +2277,10 @@ value_struct_elt_bitpos (struct value **argp, int > bitpos, struct type *ftype, >=20 > static void > find_method_list (struct value **argp, const char *method, > - int offset, struct type *type, > + LONGEST offset, struct type *type, > struct fn_field **fn_list, int *num_fns, > VEC (xmethod_worker_ptr) **xm_worker_vec, > - struct type **basetype, int *boffset) > + struct type **basetype, LONGEST *boffset) > { > int i; > struct fn_field *f =3D NULL; > @@ -2334,7 +2337,7 @@ find_method_list (struct value **argp, const char > *method, > extension methods. */ > for (i =3D TYPE_N_BASECLASSES (type) - 1; i >=3D 0; i--) > { > - int base_offset; > + LONGEST base_offset; >=20 > if (BASETYPE_VIA_VIRTUAL (type, i)) > { > @@ -2374,10 +2377,10 @@ find_method_list (struct value **argp, const char > *method, >=20 > static void > value_find_oload_method_list (struct value **argp, const char *method, > - int offset, struct fn_field **fn_list, > + LONGEST offset, struct fn_field **fn_list, > int *num_fns, > VEC (xmethod_worker_ptr) **xm_worker_vec, > - struct type **basetype, int *boffset) > + struct type **basetype, LONGEST *boffset) > { > struct type *t; >=20 > @@ -2487,7 +2490,7 @@ find_overload_match (struct value **args, int > nargs, > /* Number of overloaded instances being considered. */ > int num_fns =3D 0; > struct type *basetype =3D NULL; > - int boffset; > + LONGEST boffset; >=20 > struct cleanup *all_cleanups =3D make_cleanup (null_cleanup, NULL); >=20 > @@ -3582,7 +3585,7 @@ value_maybe_namespace_elt (const struct type > *curtype, >=20 > struct type * > value_rtti_indirect_type (struct value *v, int *full, > - int *top, int *using_enc) > + LONGEST *top, int *using_enc) > { > struct value *target =3D NULL; > struct type *type, *real_type, *target_type; > @@ -3655,7 +3658,7 @@ value_full_object (struct value *argp, > { > struct type *real_type; > int full =3D 0; > - int top =3D -1; > + LONGEST top =3D -1; > int using_enc =3D 0; > struct value *new_val; >=20 > diff --git a/gdb/valprint.c b/gdb/valprint.c > index cea69f3..dc7e362 100644 > --- a/gdb/valprint.c > +++ b/gdb/valprint.c > @@ -303,7 +303,7 @@ val_print_scalar_type_p (struct type *type) > int > valprint_check_validity (struct ui_file *stream, > struct type *type, > - int embedded_offset, > + LONGEST embedded_offset, > const struct value *val) > { > type =3D check_typedef (type); > @@ -975,7 +975,7 @@ generic_val_print (struct type *type, const gdb_byte > *valaddr, > RECURSE. */ >=20 > void > -val_print (struct type *type, const gdb_byte *valaddr, int > embedded_offset, > +val_print (struct type *type, const gdb_byte *valaddr, LONGEST > embedded_offset, > CORE_ADDR address, struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > @@ -1236,7 +1236,7 @@ val_print_type_code_flags (struct type *type, > const gdb_byte *valaddr, >=20 > void > val_print_scalar_formatted (struct type *type, > - const gdb_byte *valaddr, int embedded_offset, > + const gdb_byte *valaddr, LONGEST > embedded_offset, > const struct value *val, > const struct value_print_options *options, > int size, > @@ -1898,7 +1898,7 @@ maybe_print_array_index (struct type > *index_type, LONGEST index, >=20 > void > val_print_array_elements (struct type *type, > - const gdb_byte *valaddr, int embedded_offset, > + const gdb_byte *valaddr, LONGEST > embedded_offset, > CORE_ADDR address, struct ui_file *stream, > int recurse, > const struct value *val, > diff --git a/gdb/valprint.h b/gdb/valprint.h > index 451b5fe..23a4c12 100644 > --- a/gdb/valprint.h > +++ b/gdb/valprint.h > @@ -115,7 +115,7 @@ extern void maybe_print_array_index (struct type > *index_type, LONGEST index, > struct ui_file *stream, > const struct value_print_options *); >=20 > -extern void val_print_array_elements (struct type *, const gdb_byte *, i= nt, > +extern void val_print_array_elements (struct type *, const gdb_byte *, > LONGEST, > CORE_ADDR, struct ui_file *, int, > const struct value *, > const struct value_print_options *, > @@ -125,7 +125,7 @@ extern void val_print_type_code_int (struct type *, > const gdb_byte *, > struct ui_file *); >=20 > extern void val_print_scalar_formatted (struct type *, > - const gdb_byte *, int, > + const gdb_byte *, LONGEST, > const struct value *, > const struct value_print_options *, > int, > diff --git a/gdb/value.c b/gdb/value.c > index 35fb503..cd59f43 100644 > --- a/gdb/value.c > +++ b/gdb/value.c > @@ -65,10 +65,10 @@ struct internal_function > struct range > { > /* Lowest offset in the range. */ > - int offset; > + LONGEST offset; >=20 > /* Length of the range. */ > - int length; > + LONGEST length; > }; >=20 > typedef struct range range_s; > @@ -79,8 +79,8 @@ DEF_VEC_O(range_s); > [offset2, offset2+len2) overlap. */ >=20 > static int > -ranges_overlap (int offset1, int len1, > - int offset2, int len2) > +ranges_overlap (LONGEST offset1, LONGEST len1, > + LONGEST offset2, LONGEST len2) > { > ULONGEST h, l; >=20 > @@ -104,10 +104,10 @@ range_lessthan (const range_s *r1, const range_s > *r2) > OFFSET+LENGTH). */ >=20 > static int > -ranges_contain (VEC(range_s) *ranges, int offset, int length) > +ranges_contain (VEC(range_s) *ranges, LONGEST offset, LONGEST length) > { > range_s what; > - int i; > + LONGEST i; >=20 > what.offset =3D offset; > what.length =3D length; > @@ -239,15 +239,15 @@ struct value > the address. If lval =3D=3D lval_register, this is a further offse= t from > location.address within the registers structure. Note also the mem= ber > embedded_offset below. */ > - int offset; > + LONGEST offset; >=20 > /* Only used for bitfields; number of bits contained in them. */ > - int bitsize; > + LONGEST bitsize; >=20 > /* Only used for bitfields; position of start of field. For > gdbarch_bits_big_endian=3D0 targets, it is the position of the LSB.= For > gdbarch_bits_big_endian=3D1 targets, it is the position of the MSB.= */ > - int bitpos; > + LONGEST bitpos; >=20 > /* The number of references to this value. When a value is created, > the value chain holds a reference, so REFERENCE_COUNT is 1. If > @@ -309,8 +309,8 @@ struct value > `type', and `embedded_offset' is zero, so everything works > normally. */ > struct type *enclosing_type; > - int embedded_offset; > - int pointed_to_offset; > + LONGEST embedded_offset; > + LONGEST pointed_to_offset; >=20 > /* Values are stored in a chain, so that they can be deleted easily > over calls to the inferior. Values assigned to internal > @@ -349,7 +349,7 @@ get_value_arch (const struct value *value) > } >=20 > int > -value_bits_available (const struct value *value, int offset, int length) > +value_bits_available (const struct value *value, LONGEST offset, LONGEST > length) > { > gdb_assert (!value->lazy); >=20 > @@ -357,7 +357,8 @@ value_bits_available (const struct value *value, int > offset, int length) > } >=20 > int > -value_bytes_available (const struct value *value, int offset, int length) > +value_bytes_available (const struct value *value, > + LONGEST offset, LONGEST length) > { > return value_bits_available (value, > offset * TARGET_CHAR_BIT, > @@ -427,7 +428,8 @@ value_entirely_optimized_out (struct value *value) > OFFSET bits, and extending for the next LENGTH bits. */ >=20 > static void > -insert_into_bit_range_vector (VEC(range_s) **vectorp, int offset, int > length) > +insert_into_bit_range_vector (VEC(range_s) **vectorp, > + LONGEST offset, LONGEST length) > { > range_s newr; > int i; > @@ -592,13 +594,15 @@ insert_into_bit_range_vector (VEC(range_s) > **vectorp, int offset, int length) > } >=20 > void > -mark_value_bits_unavailable (struct value *value, int offset, int length) > +mark_value_bits_unavailable (struct value *value, > + LONGEST offset, LONGEST length) > { > insert_into_bit_range_vector (&value->unavailable, offset, length); > } >=20 > void > -mark_value_bytes_unavailable (struct value *value, int offset, int lengt= h) > +mark_value_bytes_unavailable (struct value *value, > + LONGEST offset, LONGEST length) > { > mark_value_bits_unavailable (value, > offset * TARGET_CHAR_BIT, > @@ -612,7 +616,7 @@ mark_value_bytes_unavailable (struct value *value, > int offset, int length) >=20 > static int > find_first_range_overlap (VEC(range_s) *ranges, int pos, > - int offset, int length) > + LONGEST offset, LONGEST length) > { > range_s *r; > int i; > @@ -748,8 +752,8 @@ struct ranges_and_idx > static int > find_first_range_overlap_and_match (struct ranges_and_idx *rp1, > struct ranges_and_idx *rp2, > - int offset1, int offset2, > - int length, ULONGEST *l, ULONGEST *h) > + LONGEST offset1, LONGEST offset2, > + LONGEST length, ULONGEST *l, ULONGEST > *h) > { > rp1->idx =3D find_first_range_overlap (rp1->ranges, rp1->idx, > offset1, length); > @@ -870,9 +874,9 @@ value_contents_bits_eq (const struct value *val1, int > offset1, > } >=20 > int > -value_contents_eq (const struct value *val1, int offset1, > - const struct value *val2, int offset2, > - int length) > +value_contents_eq (const struct value *val1, LONGEST offset1, > + const struct value *val2, LONGEST offset2, > + LONGEST length) > { > return value_contents_bits_eq (val1, offset1 * TARGET_CHAR_BIT, > val2, offset2 * TARGET_CHAR_BIT, > @@ -1109,35 +1113,35 @@ deprecated_set_value_type (struct value > *value, struct type *type) > value->type =3D type; > } >=20 > -int > +LONGEST > value_offset (const struct value *value) > { > return value->offset; > } > void > -set_value_offset (struct value *value, int offset) > +set_value_offset (struct value *value, LONGEST offset) > { > value->offset =3D offset; > } >=20 > -int > +LONGEST > value_bitpos (const struct value *value) > { > return value->bitpos; > } > void > -set_value_bitpos (struct value *value, int bit) > +set_value_bitpos (struct value *value, LONGEST bit) > { > value->bitpos =3D bit; > } >=20 > -int > +LONGEST > value_bitsize (const struct value *value) > { > return value->bitsize; > } > void > -set_value_bitsize (struct value *value, int bit) > +set_value_bitsize (struct value *value, LONGEST bit) > { > value->bitsize =3D bit; > } > @@ -1330,10 +1334,10 @@ value_ranges_copy_adjusted (struct value *dst, > int dst_bit_offset, > DST_OFFSET+LENGTH) range are wholly available. */ >=20 > void > -value_contents_copy_raw (struct value *dst, int dst_offset, > - struct value *src, int src_offset, int length) > +value_contents_copy_raw (struct value *dst, LONGEST dst_offset, > + struct value *src, LONGEST src_offset, LONGEST > length) > { > - int src_bit_offset, dst_bit_offset, bit_length; > + LONGEST src_bit_offset, dst_bit_offset, bit_length; > struct gdbarch *arch =3D get_value_arch (src); > int unit_size =3D gdbarch_addressable_memory_unit_size (arch); >=20 > @@ -1377,8 +1381,8 @@ value_contents_copy_raw (struct value *dst, int > dst_offset, > DST_OFFSET+LENGTH) range are wholly available. */ >=20 > void > -value_contents_copy (struct value *dst, int dst_offset, > - struct value *src, int src_offset, int length) > +value_contents_copy (struct value *dst, LONGEST dst_offset, > + struct value *src, LONGEST src_offset, LONGEST length) > { > if (src->lazy) > value_fetch_lazy (src); > @@ -1462,14 +1466,15 @@ mark_value_bytes_optimized_out (struct value > *value, int offset, int length) > /* See value.h. */ >=20 > void > -mark_value_bits_optimized_out (struct value *value, int offset, int leng= th) > +mark_value_bits_optimized_out (struct value *value, > + LONGEST offset, LONGEST length) > { > insert_into_bit_range_vector (&value->optimized_out, offset, length); > } >=20 > int > value_bits_synthetic_pointer (const struct value *value, > - int offset, int length) > + LONGEST offset, LONGEST length) > { > if (value->lval !=3D lval_computed > || !value->location.computed.funcs->check_synthetic_pointer) > @@ -1479,26 +1484,26 @@ value_bits_synthetic_pointer (const struct value > *value, > length); > } >=20 > -int > +LONGEST > value_embedded_offset (const struct value *value) > { > return value->embedded_offset; > } >=20 > void > -set_value_embedded_offset (struct value *value, int val) > +set_value_embedded_offset (struct value *value, LONGEST val) > { > value->embedded_offset =3D val; > } >=20 > -int > +LONGEST > value_pointed_to_offset (const struct value *value) > { > return value->pointed_to_offset; > } >=20 > void > -set_value_pointed_to_offset (struct value *value, int val) > +set_value_pointed_to_offset (struct value *value, LONGEST val) > { > value->pointed_to_offset =3D val; > } > @@ -2371,8 +2376,9 @@ get_internalvar_function (struct internalvar *var, > } >=20 > void > -set_internalvar_component (struct internalvar *var, int offset, int bitp= os, > - int bitsize, struct value *newval) > +set_internalvar_component (struct internalvar *var, > + LONGEST offset, LONGEST bitpos, > + LONGEST bitsize, struct value *newval) > { > gdb_byte *addr; > struct gdbarch *arch; > @@ -3107,7 +3113,7 @@ set_value_enclosing_type (struct value *val, struct > type *new_encl_type) > FIELDNO says which field. */ >=20 > struct value * > -value_primitive_field (struct value *arg1, int offset, > +value_primitive_field (struct value *arg1, LONGEST offset, > int fieldno, struct type *arg_type) > { > struct value *v; > @@ -3137,8 +3143,8 @@ value_primitive_field (struct value *arg1, int offs= et, > bit. Assume that the address, offset, and embedded offset > are sufficiently aligned. */ >=20 > - int bitpos =3D TYPE_FIELD_BITPOS (arg_type, fieldno); > - int container_bitsize =3D TYPE_LENGTH (type) * 8; > + LONGEST bitpos =3D TYPE_FIELD_BITPOS (arg_type, fieldno); > + LONGEST container_bitsize =3D TYPE_LENGTH (type) * 8; >=20 > v =3D allocate_value_lazy (type); > v->bitsize =3D TYPE_FIELD_BITSIZE (arg_type, fieldno); > @@ -3159,7 +3165,7 @@ value_primitive_field (struct value *arg1, int offs= et, > /* This field is actually a base subobject, so preserve the > entire object's contents for later references to virtual > bases, etc. */ > - int boffset; > + LONGEST boffset; >=20 > /* Lazy register values with offsets are not supported. */ > if (VALUE_LVAL (arg1) =3D=3D lval_register && value_lazy (arg1)) > @@ -3248,7 +3254,7 @@ value_field (struct value *arg1, int fieldno) > struct value * > value_fn_field (struct value **arg1p, struct fn_field *f, > int j, struct type *type, > - int offset) > + LONGEST offset) > { > struct value *v; > struct type *ftype =3D TYPE_FN_FIELD_TYPE (f, j); > @@ -3318,14 +3324,14 @@ value_fn_field (struct value **arg1p, struct > fn_field *f, >=20 > static LONGEST > unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr, > - int bitpos, int bitsize) > + LONGEST bitpos, LONGEST bitsize) > { > enum bfd_endian byte_order =3D gdbarch_byte_order (get_type_arch > (field_type)); > ULONGEST val; > ULONGEST valmask; > int lsbcount; > - int bytes_read; > - int read_offset; > + LONGEST bytes_read; > + LONGEST read_offset; >=20 > /* Read the minimum number of bytes required; there may not be > enough bytes to read an entire ULONGEST. */ > @@ -3374,7 +3380,7 @@ unpack_bits_as_long (struct type *field_type, > const gdb_byte *valaddr, >=20 > int > unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, > - int embedded_offset, int fieldno, > + LONGEST embedded_offset, int fieldno, > const struct value *val, LONGEST *result) > { > int bitpos =3D TYPE_FIELD_BITPOS (type, fieldno); > @@ -3417,8 +3423,8 @@ unpack_field_as_long (struct type *type, const > gdb_byte *valaddr, int fieldno) >=20 > void > unpack_value_bitfield (struct value *dest_val, > - int bitpos, int bitsize, > - const gdb_byte *valaddr, int embedded_offset, > + LONGEST bitpos, LONGEST bitsize, > + const gdb_byte *valaddr, LONGEST embedded_offset, > const struct value *val) > { > enum bfd_endian byte_order; > @@ -3456,7 +3462,7 @@ unpack_value_bitfield (struct value *dest_val, > struct value * > value_field_bitfield (struct type *type, int fieldno, > const gdb_byte *valaddr, > - int embedded_offset, const struct value *val) > + LONGEST embedded_offset, const struct value *val) > { > int bitpos =3D TYPE_FIELD_BITPOS (type, fieldno); > int bitsize =3D TYPE_FIELD_BITSIZE (type, fieldno); > @@ -3477,12 +3483,12 @@ value_field_bitfield (struct type *type, int > fieldno, >=20 > void > modify_field (struct type *type, gdb_byte *addr, > - LONGEST fieldval, int bitpos, int bitsize) > + LONGEST fieldval, LONGEST bitpos, LONGEST bitsize) > { > enum bfd_endian byte_order =3D gdbarch_byte_order (get_type_arch > (type)); > ULONGEST oword; > ULONGEST mask =3D (ULONGEST) -1 >> (8 * sizeof (ULONGEST) - bitsize); > - int bytesize; > + LONGEST bytesize; >=20 > /* Normalize BITPOS. */ > addr +=3D bitpos / 8; > @@ -3498,7 +3504,7 @@ modify_field (struct type *type, gdb_byte *addr, > { > /* FIXME: would like to include fieldval in the message, but > we don't have a sprintf_longest. */ > - warning (_("Value does not fit in %d bits."), bitsize); > + warning (_("Value does not fit in %s bits."), plongest (bitsize)); >=20 > /* Truncate it, otherwise adjoining fields may be corrupted. */ > fieldval &=3D mask; > @@ -3526,7 +3532,7 @@ void > pack_long (gdb_byte *buf, struct type *type, LONGEST num) > { > enum bfd_endian byte_order =3D gdbarch_byte_order (get_type_arch > (type)); > - int len; > + LONGEST len; >=20 > type =3D check_typedef (type); > len =3D TYPE_LENGTH (type); > @@ -3560,7 +3566,7 @@ pack_long (gdb_byte *buf, struct type *type, > LONGEST num) > static void > pack_unsigned_long (gdb_byte *buf, struct type *type, ULONGEST num) > { > - int len; > + LONGEST len; > enum bfd_endian byte_order; >=20 > type =3D check_typedef (type); > diff --git a/gdb/value.h b/gdb/value.h > index f8ec854..0b417b4 100644 > --- a/gdb/value.h > +++ b/gdb/value.h > @@ -112,15 +112,15 @@ extern void deprecated_set_value_type (struct > value *value, >=20 > /* Only used for bitfields; number of bits contained in them. */ >=20 > -extern int value_bitsize (const struct value *); > -extern void set_value_bitsize (struct value *, int bit); > +extern LONGEST value_bitsize (const struct value *); > +extern void set_value_bitsize (struct value *, LONGEST bit); >=20 > /* Only used for bitfields; position of start of field. For > gdbarch_bits_big_endian=3D0 targets, it is the position of the LSB. = For > gdbarch_bits_big_endian=3D1 targets, it is the position of the MSB. = */ >=20 > -extern int value_bitpos (const struct value *); > -extern void set_value_bitpos (struct value *, int bit); > +extern LONGEST value_bitpos (const struct value *); > +extern void set_value_bitpos (struct value *, LONGEST bit); >=20 > /* Only used for bitfields; the containing value. This allows a > single read from the target when displaying multiple > @@ -135,8 +135,8 @@ extern void set_value_parent (struct value *value, > struct value *parent); > within the registers structure. Note also the member > embedded_offset below. */ >=20 > -extern int value_offset (const struct value *); > -extern void set_value_offset (struct value *, int offset); > +extern LONGEST value_offset (const struct value *); > +extern void set_value_offset (struct value *, LONGEST offset); >=20 > /* The comment from "struct value" reads: ``Is it modifiable? Only > relevant if lval !=3D not_lval.''. Shouldn't the value instead be > @@ -205,10 +205,10 @@ extern struct type *value_actual_type (struct value > *value, > int resolve_simple_types, > int *real_type_found); >=20 > -extern int value_pointed_to_offset (const struct value *value); > -extern void set_value_pointed_to_offset (struct value *value, int val); > -extern int value_embedded_offset (const struct value *value); > -extern void set_value_embedded_offset (struct value *value, int val); > +extern LONGEST value_pointed_to_offset (const struct value *value); > +extern void set_value_pointed_to_offset (struct value *value, LONGEST > val); > +extern LONGEST value_embedded_offset (const struct value *value); > +extern void set_value_embedded_offset (struct value *value, LONGEST > val); >=20 > /* For lval_computed values, this structure holds functions used to > retrieve and set the value (or portions of the value). > @@ -246,7 +246,7 @@ struct lval_funcs > /* If non-NULL, this is used to determine whether the indicated bits > of VALUE are a synthetic pointer. */ > int (*check_synthetic_pointer) (const struct value *value, > - int offset, int length); > + LONGEST offset, int length); >=20 > /* Return a duplicate of VALUE's closure, for use in a new value. > This may simply return the same closure, if VALUE's is > @@ -283,7 +283,7 @@ extern struct value *allocate_computed_value (struct > type *type, > Otherwise, return 1. */ >=20 > extern int valprint_check_validity (struct ui_file *stream, struct type = *type, > - int embedded_offset, > + LONGEST embedded_offset, > const struct value *val); >=20 > extern struct value *allocate_optimized_out_value (struct type *type); > @@ -393,7 +393,7 @@ extern void mark_value_bytes_optimized_out (struct > value *value, > LENGTH bits as optimized out. */ >=20 > extern void mark_value_bits_optimized_out (struct value *value, > - int offset, int length); > + LONGEST offset, LONGEST length); >=20 > /* Set or return field indicating whether a variable is initialized or > not, based on debugging information supplied by the compiler. > @@ -476,7 +476,7 @@ extern struct value *coerce_array (struct value > *value); > extending for LENGTH bits are a synthetic pointer. */ >=20 > extern int value_bits_synthetic_pointer (const struct value *value, > - int offset, int length); > + LONGEST offset, LONGEST length); >=20 > /* Given a value, determine whether the contents bytes starting at > OFFSET and extending for LENGTH bytes are available. This returns > @@ -484,7 +484,7 @@ extern int value_bits_synthetic_pointer (const struct > value *value, > byte is unavailable. */ >=20 > extern int value_bytes_available (const struct value *value, > - int offset, int length); > + LONGEST offset, LONGEST length); >=20 > /* Given a value, determine whether the contents bits starting at > OFFSET and extending for LENGTH bits are available. This returns > @@ -492,7 +492,7 @@ extern int value_bytes_available (const struct value > *value, > bit is unavailable. */ >=20 > extern int value_bits_available (const struct value *value, > - int offset, int length); > + LONGEST offset, LONGEST length); >=20 > /* Like value_bytes_available, but return false if any byte in the > whole object is unavailable. */ > @@ -506,13 +506,13 @@ extern int value_entirely_unavailable (struct value > *value); > LENGTH bytes as unavailable. */ >=20 > extern void mark_value_bytes_unavailable (struct value *value, > - int offset, int length); > + LONGEST offset, LONGEST length); >=20 > /* Mark VALUE's content bits starting at OFFSET and extending for > LENGTH bits as unavailable. */ >=20 > extern void mark_value_bits_unavailable (struct value *value, > - int offset, int length); > + LONGEST offset, LONGEST length); >=20 > /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with > LENGTH bytes of VAL2's contents starting at OFFSET2. > @@ -567,9 +567,9 @@ extern void mark_value_bits_unavailable (struct > value *value, > after the inferior is gone, it works with const values. Therefore, > this routine must not be called with lazy values. */ >=20 > -extern int value_contents_eq (const struct value *val1, int offset1, > - const struct value *val2, int offset2, > - int length); > +extern int value_contents_eq (const struct value *val1, LONGEST offset1, > + const struct value *val2, LONGEST offset2, > + LONGEST length); >=20 > /* Read LENGTH addressable memory units starting at MEMADDR into > BUFFER, > which is (or will be copied to) VAL's contents buffer offset by > @@ -578,7 +578,7 @@ extern int value_contents_eq (const struct value > *val1, int offset1, > memory is likewise unavailable. STACK indicates whether the memory > is known to be stack memory. */ >=20 > -extern void read_value_memory (struct value *val, int embedded_offset, > +extern void read_value_memory (struct value *val, LONGEST > embedded_offset, > int stack, CORE_ADDR memaddr, > gdb_byte *buffer, size_t length); >=20 > @@ -614,17 +614,18 @@ extern LONGEST unpack_field_as_long (struct type > *type, > const gdb_byte *valaddr, > int fieldno); > extern int unpack_value_field_as_long (struct type *type, const gdb_byte > *valaddr, > - int embedded_offset, int fieldno, > + LONGEST embedded_offset, int fieldno, > const struct value *val, LONGEST *result); >=20 > extern void unpack_value_bitfield (struct value *dest_val, > - int bitpos, int bitsize, > - const gdb_byte *valaddr, int > embedded_offset, > + LONGEST bitpos, LONGEST bitsize, > + const gdb_byte *valaddr, > + LONGEST embedded_offset, > const struct value *val); >=20 > extern struct value *value_field_bitfield (struct type *type, int fieldn= o, > const gdb_byte *valaddr, > - int embedded_offset, > + LONGEST embedded_offset, > const struct value *val); >=20 > extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num); > @@ -683,12 +684,12 @@ extern struct value *default_read_var_value > (struct symbol *var, >=20 > extern struct value *allocate_value (struct type *type); > extern struct value *allocate_value_lazy (struct type *type); > -extern void value_contents_copy (struct value *dst, int dst_offset, > - struct value *src, int src_offset, > - int length); > -extern void value_contents_copy_raw (struct value *dst, int dst_offset, > - struct value *src, int src_offset, > - int length); > +extern void value_contents_copy (struct value *dst, LONGEST dst_offset, > + struct value *src, LONGEST src_offset, > + LONGEST length); > +extern void value_contents_copy_raw (struct value *dst, LONGEST > dst_offset, > + struct value *src, LONGEST src_offset, > + LONGEST length); >=20 > extern struct value *allocate_repeat_value (struct type *type, int count= ); >=20 > @@ -766,12 +767,12 @@ extern int find_overload_match (struct value > **args, int nargs, >=20 > extern struct value *value_field (struct value *arg1, int fieldno); >=20 > -extern struct value *value_primitive_field (struct value *arg1, int offs= et, > +extern struct value *value_primitive_field (struct value *arg1, LONGEST > offset, > int fieldno, > struct type *arg_type); >=20 >=20 > -extern struct type *value_rtti_indirect_type (struct value *, int *, int= *, > +extern struct type *value_rtti_indirect_type (struct value *, int *, LON= GEST > *, > int *); >=20 > extern struct value *value_full_object (struct value *, struct type *, i= nt, > @@ -870,8 +871,8 @@ extern void set_internalvar_string (struct internalvar > *var, > extern void clear_internalvar (struct internalvar *var); >=20 > extern void set_internalvar_component (struct internalvar *var, > - int offset, > - int bitpos, int bitsize, > + LONGEST offset, > + LONGEST bitpos, LONGEST bitsize, > struct value *newvalue); >=20 > extern struct internalvar *lookup_only_internalvar (const char *name); > @@ -951,7 +952,7 @@ extern struct value *value_x_unop (struct value > *arg1, enum exp_opcode op, > enum noside noside); >=20 > extern struct value *value_fn_field (struct value **arg1p, struct fn_fie= ld *f, > - int j, struct type *type, int offset); > + int j, struct type *type, LONGEST offset); >=20 > extern int binop_types_user_defined_p (enum exp_opcode op, > struct type *type1, > @@ -979,7 +980,7 @@ extern void release_value_or_incref (struct value > *val); > extern int record_latest_value (struct value *val); >=20 > extern void modify_field (struct type *type, gdb_byte *addr, > - LONGEST fieldval, int bitpos, int bitsize); > + LONGEST fieldval, LONGEST bitpos, LONGEST > bitsize); >=20 > extern void type_print (struct type *type, const char *varstring, > struct ui_file *stream, int show); > @@ -1009,7 +1010,7 @@ extern void value_print_array_elements (struct > value *val, > extern struct value *value_release_to_mark (const struct value *mark); >=20 > extern void val_print (struct type *type, const gdb_byte *valaddr, > - int embedded_offset, CORE_ADDR address, > + LONGEST embedded_offset, CORE_ADDR address, > struct ui_file *stream, int recurse, > const struct value *val, > const struct value_print_options *options, > -- > 1.9.1