public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Fix `GDB cannot access struct member whose offset is larger than 256MB'
@ 2026-06-27 23:55 Jan Kratochvil
  0 siblings, 0 replies; only message in thread
From: Jan Kratochvil @ 2026-06-27 23:55 UTC (permalink / raw)
  To: git-commits

          A new commit has been pushed.

          Repo   : rpms/gdb
          Branch : gdb-17.2-rebase-f44
          Commit : 92b52c5e6f3f527cb692aa30b9c28a8fc4b23944
          Author : Jan Kratochvil <jan.kratochvil@redhat.com>
          Date   : 2012-11-09T19:03:10+01:00
          Stats  : +9967/-1 in 23 file(s)
          URL    : https://src.fedoraproject.org/rpms/gdb/c/92b52c5e6f3f527cb692aa30b9c28a8fc4b23944?branch=gdb-17.2-rebase-f44

          Log:
          Fix `GDB cannot access struct member whose offset is larger than 256MB'

(RH BZ 871066).

---
diff --git a/gdb-rhbz795424-bitpos-06of25.patch b/gdb-rhbz795424-bitpos-06of25.patch
new file mode 100644
index 0000000..f75ba9d
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-06of25.patch
@@ -0,0 +1,23 @@
+http://sourceware.org/ml/gdb-cvs/2012-07/msg00173.html
+
+### src/gdb/ChangeLog	2012/07/20 17:54:05	1.14507
+### src/gdb/ChangeLog	2012/07/22 16:52:39	1.14508
+## -1,3 +1,7 @@
++2012-07-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* sh-tdep.c (sh_treat_as_flt_p): Remove unused variable LEN.
++
+ 2012-07-20  Jeff Kenton  <jkenton@tilera.com>
+ 
+ 	* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Fix
+--- src/gdb/sh-tdep.c	2012/06/08 14:24:57	1.245
++++ src/gdb/sh-tdep.c	2012/07/22 16:52:41	1.246
+@@ -1032,8 +1032,6 @@
+ static int
+ sh_treat_as_flt_p (struct type *type)
+ {
+-  int len = TYPE_LENGTH (type);
+-
+   /* Ordinary float types are obviously treated as float.  */
+   if (TYPE_CODE (type) == TYPE_CODE_FLT)
+     return 1;

diff --git a/gdb-rhbz795424-bitpos-07of25.patch b/gdb-rhbz795424-bitpos-07of25.patch
new file mode 100644
index 0000000..dd9b6fd
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-07of25.patch
@@ -0,0 +1,64 @@
+http://sourceware.org/ml/gdb-cvs/2012-07/msg00182.html
+
+### src/gdb/ChangeLog	2012/07/23 15:25:11	1.14514
+### src/gdb/ChangeLog	2012/07/23 18:08:27	1.14515
+## -1,3 +1,9 @@
++2012-07-23  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* p-valprint.c (pascal_object_print_value): Replace potentially
++	unsafe alloca with xmalloc/xfree.
++	* valops.c (search_struct_method): Likewise.
++
+ 2012-07-23  Tom Tromey  <tromey@redhat.com>
+ 
+ 	* solib-svr4.c (enable_break): Update.
+--- src/gdb/p-valprint.c	2012/05/18 21:02:49	1.100
++++ src/gdb/p-valprint.c	2012/07/23 18:08:29	1.101
+@@ -797,8 +797,11 @@
+ 
+ 	  if (boffset < 0 || boffset >= TYPE_LENGTH (type))
+ 	    {
+-	      /* FIXME (alloc): not safe is baseclass is really really big. */
+-	      gdb_byte *buf = alloca (TYPE_LENGTH (baseclass));
++	      gdb_byte *buf;
++	      struct cleanup *back_to;
++
++	      buf = xmalloc (TYPE_LENGTH (baseclass));
++	      back_to = make_cleanup (xfree, buf);
+ 
+ 	      base_valaddr = buf;
+ 	      if (target_read_memory (address + boffset, buf,
+@@ -807,6 +810,7 @@
+ 	      address = address + boffset;
+ 	      thisoffset = 0;
+ 	      boffset = 0;
++	      do_cleanups (back_to);
+ 	    }
+ 	  else
+ 	    base_valaddr = valaddr;
+--- src/gdb/valops.c	2012/06/24 07:28:10	1.297
++++ src/gdb/valops.c	2012/07/23 18:08:29	1.298
+@@ -2281,8 +2281,13 @@
+ 
+ 	  if (offset < 0 || offset >= TYPE_LENGTH (type))
+ 	    {
+-	      gdb_byte *tmp = alloca (TYPE_LENGTH (baseclass));
+-	      CORE_ADDR address = value_address (*arg1p);
++	      gdb_byte *tmp;
++	      struct cleanup *back_to;
++	      CORE_ADDR address;
++
++	      tmp = xmalloc (TYPE_LENGTH (baseclass));
++	      back_to = make_cleanup (xfree, tmp);
++	      address = value_address (*arg1p);
+ 
+ 	      if (target_read_memory (address + offset,
+ 				      tmp, TYPE_LENGTH (baseclass)) != 0)
+@@ -2293,6 +2298,7 @@
+ 							  address + offset);
+ 	      base_valaddr = value_contents_for_printing (base_val);
+ 	      this_offset = 0;
++	      do_cleanups (back_to);
+ 	    }
+ 	  else
+ 	    {

diff --git a/gdb-rhbz795424-bitpos-08of25.patch b/gdb-rhbz795424-bitpos-08of25.patch
new file mode 100644
index 0000000..6f2f691
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-08of25.patch
@@ -0,0 +1,139 @@
+http://sourceware.org/ml/gdb-cvs/2012-07/msg00213.html
+
+### src/gdb/ChangeLog	2012/07/25 20:14:17	1.14531
+### src/gdb/ChangeLog	2012/07/26 02:03:14	1.14532
+## -1,3 +1,17 @@
++2012-07-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Expand parameter
++	SIZE to size_t.
++	(dwarf2_evaluate_loc_desc): Likewise.
++	(dwarf2_loc_desc_needs_frame): Likewise.
++	(locexpr_describe_location_1): Likewise.
++	* dwarf2loc.h (struct dwarf2_locexpr_baton): Make SIZE as
++	size_t.
++	(struct dwarf2_loclist_baton): Likewise.
++	* dwarf2read.c (struct dwarf_block): Likewise.
++	(dump_die_shallow): Use pulongest to print dwarf_block.size.
++	(decode_locdesc): Expand SIZE and I to size_t.
++
+ 2012-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
+ 
+ 	* contrib/cc-with-tweaks.sh: Put into comment path gdb/contrib/.
+--- src/gdb/dwarf2loc.c	2012/07/13 20:15:50	1.152
++++ src/gdb/dwarf2loc.c	2012/07/26 02:03:16	1.153
+@@ -54,8 +54,8 @@
+ static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
+ 						    struct frame_info *frame,
+ 						    const gdb_byte *data,
+-						    unsigned short size,
+-					      struct dwarf2_per_cu_data *per_cu,
++						    size_t size,
++						    struct dwarf2_per_cu_data *per_cu,
+ 						    LONGEST byte_offset);
+ 
+ /* Until these have formal names, we define these here.
+@@ -2111,7 +2111,7 @@
+ 
+ static struct value *
+ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
+-			       const gdb_byte *data, unsigned short size,
++			       const gdb_byte *data, size_t size,
+ 			       struct dwarf2_per_cu_data *per_cu,
+ 			       LONGEST byte_offset)
+ {
+@@ -2312,7 +2312,7 @@
+ 
+ struct value *
+ dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
+-			  const gdb_byte *data, unsigned short size,
++			  const gdb_byte *data, size_t size,
+ 			  struct dwarf2_per_cu_data *per_cu)
+ {
+   return dwarf2_evaluate_loc_desc_full (type, frame, data, size, per_cu, 0);
+@@ -2433,7 +2433,7 @@
+    requires a frame to evaluate.  */
+ 
+ static int
+-dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
++dwarf2_loc_desc_needs_frame (const gdb_byte *data, size_t size,
+ 			     struct dwarf2_per_cu_data *per_cu)
+ {
+   struct needs_frame_baton baton;
+@@ -3827,7 +3827,7 @@
+ static void
+ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr,
+ 			     struct ui_file *stream,
+-			     const gdb_byte *data, int size,
++			     const gdb_byte *data, size_t size,
+ 			     struct objfile *objfile, unsigned int addr_size,
+ 			     int offset_size, struct dwarf2_per_cu_data *per_cu)
+ {
+--- src/gdb/dwarf2loc.h	2012/05/22 18:45:22	1.33
++++ src/gdb/dwarf2loc.h	2012/07/26 02:03:16	1.34
+@@ -77,7 +77,7 @@
+ struct value *dwarf2_evaluate_loc_desc (struct type *type,
+ 					struct frame_info *frame,
+ 					const gdb_byte *data,
+-					unsigned short size,
++					size_t size,
+ 					struct dwarf2_per_cu_data *per_cu);
+ 
+ CORE_ADDR dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu,
+@@ -97,7 +97,7 @@
+ 
+   /* Length of the location expression.  For optimized out expressions it is
+      zero.  */
+-  unsigned long size;
++  size_t size;
+ 
+   /* The compilation unit containing the symbol whose location
+      we're computing.  */
+@@ -114,7 +114,7 @@
+   const gdb_byte *data;
+ 
+   /* Length of the location list.  */
+-  unsigned long size;
++  size_t size;
+ 
+   /* The compilation unit containing the symbol whose location
+      we're computing.  */
+--- src/gdb/dwarf2read.c	2012/07/20 17:38:04	1.697
++++ src/gdb/dwarf2read.c	2012/07/26 02:03:16	1.698
+@@ -990,7 +990,7 @@
+ /* Blocks are a bunch of untyped bytes.  */
+ struct dwarf_block
+   {
+-    unsigned int size;
++    size_t size;
+ 
+     /* Valid only if SIZE is not zero.  */
+     gdb_byte *data;
+@@ -16197,12 +16197,12 @@
+ 	case DW_FORM_block4:
+ 	case DW_FORM_block:
+ 	case DW_FORM_block1:
+-	  fprintf_unfiltered (f, "block: size %d",
+-			      DW_BLOCK (&die->attrs[i])->size);
++	  fprintf_unfiltered (f, "block: size %s",
++			      pulongest (DW_BLOCK (&die->attrs[i])->size));
+ 	  break;
+ 	case DW_FORM_exprloc:
+-	  fprintf_unfiltered (f, "expression: size %u",
+-			      DW_BLOCK (&die->attrs[i])->size);
++	  fprintf_unfiltered (f, "expression: size %s",
++			      pulongest (DW_BLOCK (&die->attrs[i])->size));
+ 	  break;
+ 	case DW_FORM_ref_addr:
+ 	  fprintf_unfiltered (f, "ref address: ");
+@@ -16746,8 +16746,8 @@
+ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
+ {
+   struct objfile *objfile = cu->objfile;
+-  int i;
+-  int size = blk->size;
++  size_t i;
++  size_t size = blk->size;
+   gdb_byte *data = blk->data;
+   CORE_ADDR stack[64];
+   int stacki;

diff --git a/gdb-rhbz795424-bitpos-09of25.patch b/gdb-rhbz795424-bitpos-09of25.patch
new file mode 100644
index 0000000..4b1866d
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-09of25.patch
@@ -0,0 +1,34 @@
+http://sourceware.org/ml/gdb-cvs/2012-08/msg00085.html
+
+### src/gdb/ChangeLog	2012/08/10 05:03:07	1.14574
+### src/gdb/ChangeLog	2012/08/10 18:55:16	1.14575
+## -1,3 +1,9 @@
++2012-08-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* python/py-type.c (convert_field): Use gdb_py_long_from_longest
++	for TYPE_FIELD_BITPOS.
++	(typy_get_sizeof): Likewise for TYPE_LENGTH.
++
+ 2012-08-10  Mike Frysinger  <vapier@gentoo.org>
+ 
+ 	PR cli/10436:
+--- src/gdb/python/py-type.c	2012/05/18 21:02:52	1.39
++++ src/gdb/python/py-type.c	2012/08/10 18:55:18	1.40
+@@ -176,7 +176,7 @@
+ 	}
+       else
+ 	{
+-	  arg = PyLong_FromLong (TYPE_FIELD_BITPOS (type, field));
++	  arg = gdb_py_long_from_longest (TYPE_FIELD_BITPOS (type, field));
+ 	  attrstring = "bitpos";
+ 	}
+ 
+@@ -683,7 +683,7 @@
+     }
+   /* Ignore exceptions.  */
+ 
+-  return PyLong_FromLong (TYPE_LENGTH (type));
++  return gdb_py_long_from_longest (TYPE_LENGTH (type));
+ }
+ 
+ static struct type *

diff --git a/gdb-rhbz795424-bitpos-10of25.patch b/gdb-rhbz795424-bitpos-10of25.patch
new file mode 100644
index 0000000..f70145a
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-10of25.patch
@@ -0,0 +1,119 @@
+http://sourceware.org/ml/gdb-cvs/2012-08/msg00187.html
+
+### src/gdb/ChangeLog	2012/08/24 03:17:12	1.14628
+### src/gdb/ChangeLog	2012/08/24 03:57:22	1.14629
+## -1,3 +1,11 @@
++2012-08-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* h8300-tdep.c (h8300_push_dummy_call): Replace unsafe alloca
++	with xmalloc/cleanup.
++	* mt-tdep.c (mt_push_dummy_call): Likewise.
++	* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
++	* xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
++
+ 2012-08-24  Yao Qi  <yao@codesourcery.com>
+ 
+ 	* jv-exp.y (push_expression_name): Add "." at the end of error
+--- src/gdb/h8300-tdep.c	2012/05/18 21:02:47	1.133
++++ src/gdb/h8300-tdep.c	2012/08/24 03:57:22	1.134
+@@ -666,13 +666,15 @@
+ 
+   for (argument = 0; argument < nargs; argument++)
+     {
++      struct cleanup *back_to;
+       struct type *type = value_type (args[argument]);
+       int len = TYPE_LENGTH (type);
+       char *contents = (char *) value_contents (args[argument]);
+ 
+       /* Pad the argument appropriately.  */
+       int padded_len = align_up (len, wordsize);
+-      gdb_byte *padded = alloca (padded_len);
++      gdb_byte *padded = xmalloc (padded_len);
++      back_to = make_cleanup (xfree, padded);
+ 
+       memset (padded, 0, padded_len);
+       memcpy (len < wordsize ? padded + padded_len - len : padded,
+@@ -720,6 +722,8 @@
+ 	     subsequent arguments go on the stack.  */
+ 	  reg = E_ARGLAST_REGNUM + 1;
+ 	}
++
++      do_cleanups (back_to);
+     }
+ 
+   /* Store return address.  */
+--- src/gdb/mt-tdep.c	2012/05/16 14:35:06	1.40
++++ src/gdb/mt-tdep.c	2012/08/24 03:57:22	1.41
+@@ -845,16 +845,20 @@
+   for (j = nargs - 1; j >= i; j--)
+     {
+       gdb_byte *val;
++      struct cleanup *back_to;
++      const gdb_byte *contents = value_contents (args[j]);
+       
+       /* Right-justify the value in an aligned-length buffer.  */
+       typelen = TYPE_LENGTH (value_type (args[j]));
+       slacklen = (wordsize - (typelen % wordsize)) % wordsize;
+-      val = alloca (typelen + slacklen);
+-      memcpy (val, value_contents (args[j]), typelen);
++      val = xmalloc (typelen + slacklen);
++      back_to = make_cleanup (xfree, val);
++      memcpy (val, contents, typelen);
+       memset (val + typelen, 0, slacklen);
+       /* Now write this data to the stack.  */
+       stack_dest -= typelen + slacklen;
+       write_memory (stack_dest, val, typelen + slacklen);
++      do_cleanups (back_to);
+     }
+ 
+   /* Finally, if a param needs to be split between registers and stack, 
+--- src/gdb/tilegx-tdep.c	2012/05/30 19:31:44	1.1
++++ src/gdb/tilegx-tdep.c	2012/08/24 03:57:22	1.2
+@@ -343,16 +343,20 @@
+   for (j = nargs - 1; j >= i; j--)
+     {
+       gdb_byte *val;
++      struct cleanup *back_to;
++      const gdb_byte *contents = value_contents (args[j]);
+ 
+       typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
+       slacklen = ((typelen + 3) & (~3)) - typelen;
+-      val = alloca (typelen + slacklen);
+-      memcpy (val, value_contents (args[j]), typelen);
++      val = xmalloc (typelen + slacklen);
++      back_to = make_cleanup (xfree, val);
++      memcpy (val, contents, typelen);
+       memset (val + typelen, 0, slacklen);
+ 
+       /* Now write data to the stack.  The stack grows downwards.  */
+       stack_dest -= typelen + slacklen;
+       write_memory (stack_dest, val, typelen + slacklen);
++      do_cleanups (back_to);
+     }
+ 
+   /* Add 2 words for linkage space to the stack.  */
+--- src/gdb/xstormy16-tdep.c	2012/05/16 14:35:08	1.118
++++ src/gdb/xstormy16-tdep.c	2012/08/24 03:57:22	1.119
+@@ -279,16 +279,20 @@
+   for (j = nargs - 1; j >= i; j--)
+     {
+       char *val;
++      struct cleanup *back_to;
++      const gdb_byte *bytes = value_contents (args[j]);
+ 
+       typelen = TYPE_LENGTH (value_enclosing_type (args[j]));
+       slacklen = typelen & 1;
+-      val = alloca (typelen + slacklen);
+-      memcpy (val, value_contents (args[j]), typelen);
++      val = xmalloc (typelen + slacklen);
++      back_to = make_cleanup (xfree, val);
++      memcpy (val, bytes, typelen);
+       memset (val + typelen, 0, slacklen);
+ 
+       /* Now write this data to the stack.  The stack grows upwards.  */
+       write_memory (stack_dest, val, typelen + slacklen);
+       stack_dest += typelen + slacklen;
++      do_cleanups (back_to);
+     }
+ 
+   store_unsigned_integer (buf, xstormy16_pc_size, byte_order, bp_addr);

diff --git a/gdb-rhbz795424-bitpos-11of25.patch b/gdb-rhbz795424-bitpos-11of25.patch
new file mode 100644
index 0000000..e58a5a8
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-11of25.patch
@@ -0,0 +1,34 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00065.html
+
+### src/gdb/ChangeLog	2012/09/14 00:54:57	1.14656
+### src/gdb/ChangeLog	2012/09/14 07:00:37	1.14657
+## -1,3 +1,8 @@
++2012-09-14  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* printcmd.c (ui_printf): Eliminate single-use variable
++	PARAM_LEN.
++
+ 2012-09-14  Yao Qi  <yao@codesourcery.com>
+ 	    Pedro Alves  <palves@redhat.com>
+ 
+--- src/gdb/printcmd.c	2012/09/11 21:26:16	1.211
++++ src/gdb/printcmd.c	2012/09/14 07:00:42	1.212
+@@ -2267,7 +2267,6 @@
+ 
+ 	      /* Parameter data.  */
+ 	      struct type *param_type = value_type (val_args[i]);
+-	      unsigned int param_len = TYPE_LENGTH (param_type);
+ 	      struct gdbarch *gdbarch = get_type_arch (param_type);
+ 	      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+ 
+@@ -2329,8 +2328,8 @@
+ 
+ 	      /* Conversion between different DFP types.  */
+ 	      if (TYPE_CODE (param_type) == TYPE_CODE_DECFLOAT)
+-		decimal_convert (param_ptr, param_len, byte_order,
+-				 dec, dfp_len, byte_order);
++		decimal_convert (param_ptr, TYPE_LENGTH (param_type),
++				 byte_order, dec, dfp_len, byte_order);
+ 	      else
+ 		/* If this is a non-trivial conversion, just output 0.
+ 		   A correct converted value can be displayed by explicitly

diff --git a/gdb-rhbz795424-bitpos-12of25.patch b/gdb-rhbz795424-bitpos-12of25.patch
new file mode 100644
index 0000000..50b19a1
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-12of25.patch
@@ -0,0 +1,66 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00068.html
+
+### src/gdb/ChangeLog	2012/09/14 12:10:21	1.14659
+### src/gdb/ChangeLog	2012/09/14 12:46:55	1.14660
+## -1,3 +1,8 @@
++2012-09-14  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* valarith.c (value_concat): Replace unsafe ALLOCA with
++	XMALLOC/XFREE.
++
+ 2012-09-14  Pedro Alves  <palves@redhat.com>
+ 
+ 	* gdb.1 (SEE ALSO): Expand pointer to GDB's Texinfo manual.
+Index: gdb-7.5.0.20120926/gdb/valarith.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valarith.c	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valarith.c	2012-11-07 22:02:18.661767281 +0100
+@@ -716,9 +716,12 @@ value_concat (struct value *arg1, struct
+       if (TYPE_CODE (type2) == TYPE_CODE_STRING
+ 	  || TYPE_CODE (type2) == TYPE_CODE_CHAR)
+ 	{
++	  struct cleanup *back_to;
++
+ 	  count = longest_to_int (value_as_long (inval1));
+ 	  inval2len = TYPE_LENGTH (type2);
+-	  ptr = (char *) alloca (count * inval2len);
++	  ptr = (char *) xmalloc (count * inval2len);
++	  back_to = make_cleanup (xfree, ptr);
+ 	  if (TYPE_CODE (type2) == TYPE_CODE_CHAR)
+ 	    {
+ 	      char_type = type2;
+@@ -741,6 +744,7 @@ value_concat (struct value *arg1, struct
+ 		}
+ 	    }
+ 	  outval = value_string (ptr, count * inval2len, char_type);
++	  do_cleanups (back_to);
+ 	}
+       else if (TYPE_CODE (type2) == TYPE_CODE_BITSTRING
+ 	       || TYPE_CODE (type2) == TYPE_CODE_BOOL)
+@@ -755,6 +759,8 @@ value_concat (struct value *arg1, struct
+   else if (TYPE_CODE (type1) == TYPE_CODE_STRING
+ 	   || TYPE_CODE (type1) == TYPE_CODE_CHAR)
+     {
++      struct cleanup *back_to;
++
+       /* We have two character strings to concatenate.  */
+       if (TYPE_CODE (type2) != TYPE_CODE_STRING
+ 	  && TYPE_CODE (type2) != TYPE_CODE_CHAR)
+@@ -763,7 +769,8 @@ value_concat (struct value *arg1, struct
+ 	}
+       inval1len = TYPE_LENGTH (type1);
+       inval2len = TYPE_LENGTH (type2);
+-      ptr = (char *) alloca (inval1len + inval2len);
++      ptr = (char *) xmalloc (inval1len + inval2len);
++      back_to = make_cleanup (xfree, ptr);
+       if (TYPE_CODE (type1) == TYPE_CODE_CHAR)
+ 	{
+ 	  char_type = type1;
+@@ -786,6 +793,7 @@ value_concat (struct value *arg1, struct
+ 	  memcpy (ptr + inval1len, value_contents (inval2), inval2len);
+ 	}
+       outval = value_string (ptr, inval1len + inval2len, char_type);
++      do_cleanups (back_to);
+     }
+   else if (TYPE_CODE (type1) == TYPE_CODE_BITSTRING
+ 	   || TYPE_CODE (type1) == TYPE_CODE_BOOL)

diff --git a/gdb-rhbz795424-bitpos-13of25.patch b/gdb-rhbz795424-bitpos-13of25.patch
new file mode 100644
index 0000000..4ae2098
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-13of25.patch
@@ -0,0 +1,28 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00082.html
+
+### src/gdb/ChangeLog	2012/09/17 07:15:47	1.14664
+### src/gdb/ChangeLog	2012/09/17 07:26:54	1.14665
+## -1,3 +1,8 @@
++2012-09-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* infrun.c (restore_infcall_suspend_state): Eliminate single-use
++	variable LEN.
++
+ 2012-09-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+ 
+ 	PR 14119
+--- src/gdb/infrun.c	2012/09/17 07:09:34	1.558
++++ src/gdb/infrun.c	2012/09/17 07:26:55	1.559
+@@ -6777,11 +6777,10 @@
+   if (inf_state->siginfo_gdbarch == gdbarch)
+     {
+       struct type *type = gdbarch_get_siginfo_type (gdbarch);
+-      size_t len = TYPE_LENGTH (type);
+ 
+       /* Errors ignored.  */
+       target_write (&current_target, TARGET_OBJECT_SIGNAL_INFO, NULL,
+-		    inf_state->siginfo_data, 0, len);
++		    inf_state->siginfo_data, 0, TYPE_LENGTH (type));
+     }
+ 
+   /* The inferior can be gone if the user types "print exit(0)"

diff --git a/gdb-rhbz795424-bitpos-14of25.patch b/gdb-rhbz795424-bitpos-14of25.patch
new file mode 100644
index 0000000..a09ad5e
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-14of25.patch
@@ -0,0 +1,209 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00084.html
+
+### src/gdb/ChangeLog	2012/09/17 08:42:07	1.14666
+### src/gdb/ChangeLog	2012/09/17 08:52:17	1.14667
+## -1,3 +1,23 @@
++2012-09-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* m2-valprint.c (m2_print_array_contents): Eliminate variable
++	ELTLEN and use TYPE_LENGTH directly.
++	(m2_val_print): Likewise.
++	* m68k-tdep.c (m68k_svr4_extract_return_value): Eliminate
++	variable LEN and use TYPE_LENGTH directly.
++	(m68k_svr4_store_return_value): Likewise.
++	* mips-tdep.c (mips_o32_push_dummy_call): Eliminate variable
++	ARGLEN and use TYPE_LENGTH directly.
++	(mips_o64_push_dummy_call): Likewise.
++	* s390-tdep (s390_function_arg_pass_by_reference): Eliminate
++	variable LENGTH and use TYPE_LENGTH directly.
++	(s390_function_arg_float): Likewise.
++	(s390_function_arg_integer): Likewise.
++	(s390_push_dummy_call): Likewise.
++	(s390_return_value_convention): Likewise.
++	* spu-tdep.c (spu_push_dummy_call): Eliminate LEN and use
++	TYPE_LENGTH directly.
++
+ 2012-09-17  Yao Qi  <yao@codesourcery.com>
+ 
+ 	* cli/cli-decode.c (add_setshow_zuinteger_unlimited_cmd): New.
+--- src/gdb/m2-valprint.c	2012/08/16 07:36:20	1.45
++++ src/gdb/m2-valprint.c	2012/09/17 08:52:18	1.46
+@@ -269,16 +269,14 @@
+ 			 const struct value_print_options *options,
+ 			 int len)
+ {
+-  int eltlen;
+   CHECK_TYPEDEF (type);
+ 
+   if (TYPE_LENGTH (type) > 0)
+     {
+-      eltlen = TYPE_LENGTH (type);
+       if (options->prettyprint_arrays)
+ 	print_spaces_filtered (2 + 2 * recurse, stream);
+       /* For an array of chars, print with string syntax.  */
+-      if (eltlen == 1 &&
++      if (TYPE_LENGTH (type) == 1 &&
+ 	  ((TYPE_CODE (type) == TYPE_CODE_INT)
+ 	   || ((current_language->la_language == language_m2)
+ 	       && (TYPE_CODE (type) == TYPE_CODE_CHAR)))
+@@ -320,7 +318,6 @@
+   unsigned int i = 0;	/* Number of characters printed.  */
+   unsigned len;
+   struct type *elttype;
+-  unsigned eltlen;
+   CORE_ADDR addr;
+ 
+   CHECK_TYPEDEF (type);
+@@ -330,12 +327,11 @@
+       if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
+ 	{
+ 	  elttype = check_typedef (TYPE_TARGET_TYPE (type));
+-	  eltlen = TYPE_LENGTH (elttype);
+-	  len = TYPE_LENGTH (type) / eltlen;
++	  len = TYPE_LENGTH (type) / TYPE_LENGTH (elttype);
+ 	  if (options->prettyprint_arrays)
+ 	    print_spaces_filtered (2 + 2 * recurse, stream);
+ 	  /* For an array of chars, print with string syntax.  */
+-	  if (eltlen == 1 &&
++	  if (TYPE_LENGTH (elttype) == 1 &&
+ 	      ((TYPE_CODE (elttype) == TYPE_CODE_INT)
+ 	       || ((current_language->la_language == language_m2)
+ 		   && (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
+--- src/gdb/m68k-tdep.c	2012/07/24 16:37:24	1.159
++++ src/gdb/m68k-tdep.c	2012/09/17 08:52:18	1.160
+@@ -315,7 +315,6 @@
+ m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache,
+ 				gdb_byte *valbuf)
+ {
+-  int len = TYPE_LENGTH (type);
+   gdb_byte buf[M68K_MAX_REGISTER_SIZE];
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+@@ -326,7 +325,7 @@
+       regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
+       convert_typed_floating (buf, fpreg_type, valbuf, type);
+     }
+-  else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
++  else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
+     regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
+   else
+     m68k_extract_return_value (type, regcache, valbuf);
+@@ -357,7 +356,6 @@
+ m68k_svr4_store_return_value (struct type *type, struct regcache *regcache,
+ 			      const gdb_byte *valbuf)
+ {
+-  int len = TYPE_LENGTH (type);
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ 
+@@ -368,7 +366,7 @@
+       convert_typed_floating (valbuf, type, buf, fpreg_type);
+       regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
+     }
+-  else if (TYPE_CODE (type) == TYPE_CODE_PTR && len == 4)
++  else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
+     {
+       regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
+       regcache_raw_write (regcache, M68K_D0_REGNUM, valbuf);
+--- src/gdb/mips-tdep.c	2012/08/19 22:22:49	1.561
++++ src/gdb/mips-tdep.c	2012/09/17 08:52:18	1.562
+@@ -5174,13 +5174,12 @@
+   for (argnum = 0; argnum < nargs; argnum++)
+     {
+       struct type *arg_type = check_typedef (value_type (args[argnum]));
+-      int arglen = TYPE_LENGTH (arg_type);
+ 
+       /* Align to double-word if necessary.  */
+       if (mips_type_needs_double_align (arg_type))
+ 	len = align_up (len, MIPS32_REGSIZE * 2);
+       /* Allocate space on the stack.  */
+-      len += align_up (arglen, MIPS32_REGSIZE);
++      len += align_up (TYPE_LENGTH (arg_type), MIPS32_REGSIZE);
+     }
+   sp -= align_up (len, 16);
+ 
+@@ -5703,10 +5702,9 @@
+   for (argnum = 0; argnum < nargs; argnum++)
+     {
+       struct type *arg_type = check_typedef (value_type (args[argnum]));
+-      int arglen = TYPE_LENGTH (arg_type);
+ 
+       /* Allocate space on the stack.  */
+-      len += align_up (arglen, MIPS64_REGSIZE);
++      len += align_up (TYPE_LENGTH (arg_type), MIPS64_REGSIZE);
+     }
+   sp -= align_up (len, 16);
+ 
+--- src/gdb/s390-tdep.c	2012/05/18 21:02:50	1.206
++++ src/gdb/s390-tdep.c	2012/09/17 08:52:18	1.207
+@@ -2489,8 +2489,7 @@
+ static int
+ s390_function_arg_pass_by_reference (struct type *type)
+ {
+-  unsigned length = TYPE_LENGTH (type);
+-  if (length > 8)
++  if (TYPE_LENGTH (type) > 8)
+     return 1;
+ 
+   return (is_struct_like (type) && !is_power_of_two (TYPE_LENGTH (type)))
+@@ -2503,8 +2502,7 @@
+ static int
+ s390_function_arg_float (struct type *type)
+ {
+-  unsigned length = TYPE_LENGTH (type);
+-  if (length > 8)
++  if (TYPE_LENGTH (type) > 8)
+     return 0;
+ 
+   return is_float_like (type);
+@@ -2515,13 +2513,12 @@
+ static int
+ s390_function_arg_integer (struct type *type)
+ {
+-  unsigned length = TYPE_LENGTH (type);
+-  if (length > 8)
++  if (TYPE_LENGTH (type) > 8)
+     return 0;
+ 
+    return is_integer_like (type)
+ 	  || is_pointer_like (type)
+-	  || (is_struct_like (type) && is_power_of_two (length));
++	  || (is_struct_like (type) && is_power_of_two (TYPE_LENGTH (type)));
+ }
+ 
+ /* Return ARG, a `SIMPLE_ARG', sign-extended or zero-extended to a full
+@@ -2616,11 +2613,10 @@
+     {
+       struct value *arg = args[i];
+       struct type *type = check_typedef (value_type (arg));
+-      unsigned length = TYPE_LENGTH (type);
+ 
+       if (s390_function_arg_pass_by_reference (type))
+         {
+-          sp -= length;
++          sp -= TYPE_LENGTH (type);
+           sp = align_down (sp, alignment_of (type));
+           copy_addr[i] = sp;
+         }
+@@ -2799,8 +2795,7 @@
+ static enum return_value_convention
+ s390_return_value_convention (struct gdbarch *gdbarch, struct type *type)
+ {
+-  int length = TYPE_LENGTH (type);
+-  if (length > 8)
++  if (TYPE_LENGTH (type) > 8)
+     return RETURN_VALUE_STRUCT_CONVENTION;
+ 
+   switch (TYPE_CODE (type))
+--- src/gdb/spu-tdep.c	2012/05/18 21:02:50	1.81
++++ src/gdb/spu-tdep.c	2012/09/17 08:52:18	1.82
+@@ -1373,8 +1373,7 @@
+       struct value *arg = args[i];
+       struct type *type = check_typedef (value_type (arg));
+       const gdb_byte *contents = value_contents (arg);
+-      int len = TYPE_LENGTH (type);
+-      int n_regs = align_up (len, 16) / 16;
++      int n_regs = align_up (TYPE_LENGTH (type), 16) / 16;
+ 
+       /* If the argument doesn't wholly fit into registers, it and
+ 	 all subsequent arguments go to the stack.  */

diff --git a/gdb-rhbz795424-bitpos-15of25.patch b/gdb-rhbz795424-bitpos-15of25.patch
new file mode 100644
index 0000000..bfcba69
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-15of25.patch
@@ -0,0 +1,36 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00132.html
+
+### src/gdb/ChangeLog	2012/09/22 13:04:54	1.14691
+### src/gdb/ChangeLog	2012/09/24 10:25:07	1.14692
+## -1,3 +1,8 @@
++2012-09-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
++	* p-valprint.c (pascal_type_print_base): Likewise.
++
+ 2012-09-22  Yao Qi  <yao@codesourcery.com>
+ 
+ 	* remote.c (remote_get_trace_status): Remove setting default
+--- src/gdb/m2-typeprint.c	2012/04/18 06:46:46	1.30
++++ src/gdb/m2-typeprint.c	2012/09/24 10:25:09	1.31
+@@ -587,7 +587,8 @@
+ void
+ m2_enum (struct type *type, struct ui_file *stream, int show, int level)
+ {
+-  int lastval, i, len;
++  LONGEST lastval;
++  int i, len;
+ 
+   if (show < 0)
+     {
+--- src/gdb/p-typeprint.c	2012/08/16 07:36:20	1.47
++++ src/gdb/p-typeprint.c	2012/09/24 10:25:09	1.48
+@@ -440,7 +440,7 @@
+ {
+   int i;
+   int len;
+-  int lastval;
++  LONGEST lastval;
+   enum
+     {
+       s_none, s_public, s_private, s_protected

diff --git a/gdb-rhbz795424-bitpos-16of25.patch b/gdb-rhbz795424-bitpos-16of25.patch
new file mode 100644
index 0000000..a91d815
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-16of25.patch
@@ -0,0 +1,27 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00138.html
+
+### src/gdb/ChangeLog	2012/09/24 10:25:07	1.14692
+### src/gdb/ChangeLog	2012/09/25 12:20:35	1.14693
+## -1,3 +1,8 @@
++2012-09-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* c-typeprint.c (c_type_print_varspec_suffix): Remove cast and
++	use plongest to print the array size.
++
+ 2012-09-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
+ 
+ 	* m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
+Index: gdb-7.5.0.20120926/gdb/c-typeprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/c-typeprint.c	2012-11-07 22:00:40.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/c-typeprint.c	2012-11-07 22:03:39.269650157 +0100
+@@ -631,7 +631,8 @@ c_type_print_varspec_suffix (struct type
+ 	    fprintf_filtered (stream, "variable");
+ 	  }
+ 	else if (get_array_bounds (type, &low_bound, &high_bound))
+-	  fprintf_filtered (stream, "%d", (int) (high_bound - low_bound + 1));
++	  fprintf_filtered (stream, "%s", 
++			    plongest (high_bound - low_bound + 1));
+ 	fprintf_filtered (stream, "]");
+ 
+ 	c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream,

diff --git a/gdb-rhbz795424-bitpos-17of25.patch b/gdb-rhbz795424-bitpos-17of25.patch
new file mode 100644
index 0000000..9fada4e
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-17of25.patch
@@ -0,0 +1,729 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00142.html
+
+### src/gdb/ChangeLog	2012/09/25 12:38:55	1.14696
+### src/gdb/ChangeLog	2012/09/25 12:48:52	1.14697
+## -1,3 +1,36 @@
++2012-09-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* ada-valprint.c (ada_val_print_1): Eliminate single-use
++	variable LEN.
++	* alpha-tdep.c (alpha_extract_return_value): Use TYPE_LENGTH
++	directly.
++	(alpha_store_return_value): Likewise.
++	* amd64-tdep.c (amd64_classify_aggregate): Likewise.
++	(amd64_push_arguments): Likewise.
++	* ax-gdb.c (gen_trace_static_fields): Likewise.
++	(gen_traced_pop): Likewise.
++	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
++	* breakpoint.c (update_watchpoint): Likewise.
++	* findcmd.c (parse_find_args): Use local variable for type
++	instead of length.
++	* findvar.c (default_read_var_value): Use TYPE_LENGTH directly.
++	* h8300-tdep.c (h8300h_extract_return_value): Likewise.
++	(h8300_store_return_value): Likewise.
++	* i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
++	Use i386_darwin_arg_type_alignment directly.
++	* infcall.c (call_function_by_hand): Use TYPE_LENGTH directly.
++	* lm32-tdep.c (lm32_push_dummy_call): Likewise.
++	* m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
++	(m68hc11_extract_return_value): Likewise.
++	* mep-tdep.c (mep_push_dummy_call): Likewise.
++	* printcmd.c (float_type_from_length): Likewise.
++	* s390-tdep.c (s390_value_from_register): Likewise.
++	* stack.c (read_frame_arg): Likewise.
++	* tracepoint.c (encode_actions_1): Likewise.
++	* valops.c (value_fetch_lazy): Use local variable for type
++	instead of length.  Use TYPE_LENGTH directly.
++	* value.c (value_contents_equal): Use TYPE_LENGTH directly.
++
+ 2012-09-25  Joel Brobecker  <brobecker@adacore.com>
+ 
+ 	* symtab.c (skip_prologue_sal): Fix typo in comment.
+Index: gdb-7.5.0.20120926/gdb/ada-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ada-valprint.c	2012-04-18 08:46:46.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ada-valprint.c	2012-11-07 22:03:57.600623522 +0100
+@@ -730,9 +730,8 @@ ada_val_print_1 (struct type *type, cons
+       if (ada_is_fixed_point_type (type))
+ 	{
+ 	  LONGEST v = unpack_long (type, valaddr + offset_aligned);
+-	  int len = TYPE_LENGTH (type);
+ 
+-	  fprintf_filtered (stream, len < 4 ? "%.11g" : "%.17g",
++	  fprintf_filtered (stream, TYPE_LENGTH (type) < 4 ? "%.11g" : "%.17g",
+ 			    (double) ada_fixed_to_float (type, v));
+ 	  return;
+ 	}
+Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/alpha-tdep.c	2012-05-16 16:35:02.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/alpha-tdep.c	2012-11-07 22:03:57.602623520 +0100
+@@ -475,14 +475,13 @@ alpha_extract_return_value (struct type
+ {
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+-  int length = TYPE_LENGTH (valtype);
+   gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
+   ULONGEST l;
+ 
+   switch (TYPE_CODE (valtype))
+     {
+     case TYPE_CODE_FLT:
+-      switch (length)
++      switch (TYPE_LENGTH (valtype))
+ 	{
+ 	case 4:
+ 	  regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, raw_buffer);
+@@ -505,7 +504,7 @@ alpha_extract_return_value (struct type
+       break;
+ 
+     case TYPE_CODE_COMPLEX:
+-      switch (length)
++      switch (TYPE_LENGTH (valtype))
+ 	{
+ 	case 8:
+ 	  /* ??? This isn't correct wrt the ABI, but it's what GCC does.  */
+@@ -531,7 +530,7 @@ alpha_extract_return_value (struct type
+     default:
+       /* Assume everything else degenerates to an integer.  */
+       regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
+-      store_unsigned_integer (valbuf, length, byte_order, l);
++      store_unsigned_integer (valbuf, TYPE_LENGTH (valtype), byte_order, l);
+       break;
+     }
+ }
+@@ -544,14 +543,13 @@ alpha_store_return_value (struct type *v
+ 			  const gdb_byte *valbuf)
+ {
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+-  int length = TYPE_LENGTH (valtype);
+   gdb_byte raw_buffer[ALPHA_REGISTER_SIZE];
+   ULONGEST l;
+ 
+   switch (TYPE_CODE (valtype))
+     {
+     case TYPE_CODE_FLT:
+-      switch (length)
++      switch (TYPE_LENGTH (valtype))
+ 	{
+ 	case 4:
+ 	  alpha_lds (gdbarch, raw_buffer, valbuf);
+@@ -575,7 +573,7 @@ alpha_store_return_value (struct type *v
+       break;
+ 
+     case TYPE_CODE_COMPLEX:
+-      switch (length)
++      switch (TYPE_LENGTH (valtype))
+ 	{
+ 	case 8:
+ 	  /* ??? This isn't correct wrt the ABI, but it's what GCC does.  */
+@@ -603,7 +601,7 @@ alpha_store_return_value (struct type *v
+       /* Assume everything else degenerates to an integer.  */
+       /* 32-bit values must be sign-extended to 64 bits
+ 	 even if the base data type is unsigned.  */
+-      if (length == 4)
++      if (TYPE_LENGTH (valtype) == 4)
+ 	valtype = builtin_type (gdbarch)->builtin_int32;
+       l = unpack_long (valtype, valbuf);
+       regcache_cooked_write_unsigned (regcache, ALPHA_V0_REGNUM, l);
+Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/amd64-tdep.c	2012-11-07 22:00:42.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/amd64-tdep.c	2012-11-07 22:03:57.623623489 +0100
+@@ -446,12 +446,10 @@ amd64_non_pod_p (struct type *type)
+ static void
+ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
+ {
+-  int len = TYPE_LENGTH (type);
+-
+   /* 1. If the size of an object is larger than two eightbytes, or in
+         C++, is a non-POD structure or union type, or contains
+         unaligned fields, it has class memory.  */
+-  if (len > 16 || amd64_non_pod_p (type))
++  if (TYPE_LENGTH (type) > 16 || amd64_non_pod_p (type))
+     {
+       class[0] = class[1] = AMD64_MEMORY;
+       return;
+@@ -471,7 +469,7 @@ amd64_classify_aggregate (struct type *t
+ 
+       /* All fields in an array have the same type.  */
+       amd64_classify (subtype, class);
+-      if (len > 8 && class[1] == AMD64_NO_CLASS)
++      if (TYPE_LENGTH (type) > 8 && class[1] == AMD64_NO_CLASS)
+ 	class[1] = class[0];
+     }
+   else
+@@ -839,10 +837,9 @@ amd64_push_arguments (struct regcache *r
+     {
+       struct type *type = value_type (stack_args[i]);
+       const gdb_byte *valbuf = value_contents (stack_args[i]);
+-      int len = TYPE_LENGTH (type);
+       CORE_ADDR arg_addr = sp + element * 8;
+ 
+-      write_memory (arg_addr, valbuf, len);
++      write_memory (arg_addr, valbuf, TYPE_LENGTH (type));
+       if (arg_addr_regno[i] >= 0)
+         {
+           /* We also need to store the address of that argument in
+@@ -853,7 +850,7 @@ amd64_push_arguments (struct regcache *r
+           store_unsigned_integer (buf, 8, byte_order, arg_addr);
+           regcache_cooked_write (regcache, arg_addr_regno[i], buf);
+         }
+-      element += ((len + 7) / 8);
++      element += ((TYPE_LENGTH (type) + 7) / 8);
+     }
+ 
+   /* The psABI says that "For calls that may call functions that use
+Index: gdb-7.5.0.20120926/gdb/ax-gdb.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ax-gdb.c	2012-07-05 03:03:01.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ax-gdb.c	2012-11-07 22:03:57.626623484 +0100
+@@ -367,9 +367,9 @@ gen_trace_static_fields (struct gdbarch
+ 	    {
+ 	    case axs_lvalue_memory:
+ 	      {
+-		int length = TYPE_LENGTH (check_typedef (value.type));
+-
+-		ax_const_l (ax, length);
++	        /* Initialize the TYPE_LENGTH if it is a typedef.  */
++	        check_typedef (value.type);
++		ax_const_l (ax, TYPE_LENGTH (value.type));
+ 		ax_simple (ax, aop_trace);
+ 	      }
+ 	      break;
+@@ -425,17 +425,18 @@ gen_traced_pop (struct gdbarch *gdbarch,
+ 
+       case axs_lvalue_memory:
+ 	{
+-	  int length = TYPE_LENGTH (check_typedef (value->type));
+-
+ 	  if (string_trace)
+ 	    ax_simple (ax, aop_dup);
+ 
++	  /* Initialize the TYPE_LENGTH if it is a typedef.  */
++	  check_typedef (value->type);
++
+ 	  /* There's no point in trying to use a trace_quick bytecode
+ 	     here, since "trace_quick SIZE pop" is three bytes, whereas
+ 	     "const8 SIZE trace" is also three bytes, does the same
+ 	     thing, and the simplest code which generates that will also
+ 	     work correctly for objects with large sizes.  */
+-	  ax_const_l (ax, length);
++	  ax_const_l (ax, TYPE_LENGTH (value->type));
+ 	  ax_simple (ax, aop_trace);
+ 
+ 	  if (string_trace)
+Index: gdb-7.5.0.20120926/gdb/bfin-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/bfin-tdep.c	2012-05-16 16:35:03.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/bfin-tdep.c	2012-11-07 22:03:57.643623460 +0100
+@@ -513,9 +513,8 @@ bfin_push_dummy_call (struct gdbarch *gd
+   for (i = nargs - 1; i >= 0; i--)
+     {
+       struct type *value_type = value_enclosing_type (args[i]);
+-      int len = TYPE_LENGTH (value_type);
+ 
+-      total_len += (len + 3) & ~3;
++      total_len += (TYPE_LENGTH (value_type) + 3) & ~3;
+     }
+ 
+   /* At least twelve bytes of stack space must be allocated for the function's
+@@ -531,8 +530,7 @@ bfin_push_dummy_call (struct gdbarch *gd
+     {
+       struct type *value_type = value_enclosing_type (args[i]);
+       struct type *arg_type = check_typedef (value_type);
+-      int len = TYPE_LENGTH (value_type);
+-      int container_len = (len + 3) & ~3;
++      int container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
+ 
+       sp -= container_len;
+       write_memory (sp, value_contents_writeable (args[i]), container_len);
+Index: gdb-7.5.0.20120926/gdb/breakpoint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/breakpoint.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/breakpoint.c	2012-11-07 22:03:57.660623434 +0100
+@@ -1844,11 +1844,10 @@ update_watchpoint (struct watchpoint *b,
+ 		      && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
+ 		{
+ 		  CORE_ADDR addr;
+-		  int len, type;
++		  int type;
+ 		  struct bp_location *loc, **tmp;
+ 
+ 		  addr = value_address (v);
+-		  len = TYPE_LENGTH (value_type (v));
+ 		  type = hw_write;
+ 		  if (b->base.type == bp_read_watchpoint)
+ 		    type = hw_read;
+@@ -1863,7 +1862,7 @@ update_watchpoint (struct watchpoint *b,
+ 
+ 		  loc->pspace = frame_pspace;
+ 		  loc->address = addr;
+-		  loc->length = len;
++		  loc->length = TYPE_LENGTH (value_type (v));
+ 		  loc->watchpoint_type = type;
+ 		}
+ 	    }
+Index: gdb-7.5.0.20120926/gdb/findcmd.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/findcmd.c	2012-07-06 17:51:39.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/findcmd.c	2012-11-07 22:03:57.676623411 +0100
+@@ -169,19 +169,19 @@ parse_find_args (char *args, ULONGEST *m
+   while (*s != '\0')
+     {
+       LONGEST x;
+-      int val_bytes;
++      struct type *t;
+       ULONGEST pattern_buf_size_need;
+ 
+       while (isspace (*s))
+ 	++s;
+ 
+       v = parse_to_comma_and_eval (&s);
+-      val_bytes = TYPE_LENGTH (value_type (v));
++      t = value_type (v);
+ 
+       /* Keep it simple and assume size == 'g' when watching for when we
+ 	 need to grow the pattern buf.  */
+       pattern_buf_size_need = (pattern_buf_end - pattern_buf
+-			       + max (val_bytes, sizeof (int64_t)));
++			       + max (TYPE_LENGTH (t), sizeof (int64_t)));
+       if (pattern_buf_size_need > pattern_buf_size)
+ 	{
+ 	  size_t current_offset = pattern_buf_end - pattern_buf;
+@@ -215,8 +215,8 @@ parse_find_args (char *args, ULONGEST *m
+ 	}
+       else
+ 	{
+-	  memcpy (pattern_buf_end, value_contents (v), val_bytes);
+-	  pattern_buf_end += val_bytes;
++	  memcpy (pattern_buf_end, value_contents (v), TYPE_LENGTH (t));
++	  pattern_buf_end += TYPE_LENGTH (t);
+ 	}
+ 
+       if (*s == ',')
+Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/h8300-tdep.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/h8300-tdep.c	2012-11-07 22:03:57.679623409 +0100
+@@ -785,16 +785,15 @@ h8300h_extract_return_value (struct type
+ {
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+-  int len = TYPE_LENGTH (type);
+   ULONGEST c;
+ 
+-  switch (len)
++  switch (TYPE_LENGTH (type))
+     {
+     case 1:
+     case 2:
+     case 4:
+       regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+-      store_unsigned_integer (valbuf, len, byte_order, c);
++      store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
+       break;
+     case 8:			/* long long is now 8 bytes.  */
+       if (TYPE_CODE (type) == TYPE_CODE_INT)
+@@ -852,18 +851,17 @@ h8300_store_return_value (struct type *t
+ {
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+-  int len = TYPE_LENGTH (type);
+   ULONGEST val;
+ 
+-  switch (len)
++  switch (TYPE_LENGTH (type))
+     {
+     case 1:
+     case 2:			/* short...  */
+-      val = extract_unsigned_integer (valbuf, len, byte_order);
++      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+       regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
+       break;
+     case 4:			/* long, float */
+-      val = extract_unsigned_integer (valbuf, len, byte_order);
++      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+       regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
+ 				      (val >> 16) & 0xffff);
+       regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM, val & 0xffff);
+@@ -882,19 +880,18 @@ h8300h_store_return_value (struct type *
+ {
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+-  int len = TYPE_LENGTH (type);
+   ULONGEST val;
+ 
+-  switch (len)
++  switch (TYPE_LENGTH (type))
+     {
+     case 1:
+     case 2:
+     case 4:			/* long, float */
+-      val = extract_unsigned_integer (valbuf, len, byte_order);
++      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+       regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
+       break;
+     case 8:
+-      val = extract_unsigned_integer (valbuf, len, byte_order);
++      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+       regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
+ 				      (val >> 32) & 0xffffffff);
+       regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM,
+Index: gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/i386-darwin-tdep.c	2012-04-02 15:15:48.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c	2012-11-07 22:03:57.680623407 +0100
+@@ -196,13 +196,12 @@ i386_darwin_push_dummy_call (struct gdba
+             }
+           else
+             {
+-              int len = TYPE_LENGTH (arg_type);
+-              int align = i386_darwin_arg_type_alignment (arg_type);
+-
+-              args_space = align_up (args_space, align);
++              args_space = align_up (args_space,
++				     i386_darwin_arg_type_alignment (arg_type));
+               if (write_pass)
+                 write_memory (sp + args_space,
+-                              value_contents_all (args[i]), len);
++                              value_contents_all (args[i]),
++			      TYPE_LENGTH (arg_type));
+ 
+               /* The System V ABI says that:
+                  
+@@ -211,7 +210,7 @@ i386_darwin_push_dummy_call (struct gdba
+                  depending on the size of the argument."
+                  
+                  This makes sure the stack stays word-aligned.  */
+-              args_space += align_up (len, 4);
++              args_space += align_up (TYPE_LENGTH (arg_type), 4);
+             }
+         }
+ 
+Index: gdb-7.5.0.20120926/gdb/infcall.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/infcall.c	2012-07-31 09:34:39.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/infcall.c	2012-11-07 22:03:57.694623385 +0100
+@@ -709,13 +709,11 @@ call_function_by_hand (struct value *fun
+ 
+   if (struct_return || hidden_first_param_p)
+     {
+-      int len = TYPE_LENGTH (values_type);
+-
+       if (gdbarch_inner_than (gdbarch, 1, 2))
+ 	{
+ 	  /* Stack grows downward.  Align STRUCT_ADDR and SP after
+              making space for the return value.  */
+-	  sp -= len;
++	  sp -= TYPE_LENGTH (values_type);
+ 	  if (gdbarch_frame_align_p (gdbarch))
+ 	    sp = gdbarch_frame_align (gdbarch, sp);
+ 	  struct_addr = sp;
+@@ -727,7 +725,7 @@ call_function_by_hand (struct value *fun
+ 	  if (gdbarch_frame_align_p (gdbarch))
+ 	    sp = gdbarch_frame_align (gdbarch, sp);
+ 	  struct_addr = sp;
+-	  sp += len;
++	  sp += TYPE_LENGTH (values_type);
+ 	  if (gdbarch_frame_align_p (gdbarch))
+ 	    sp = gdbarch_frame_align (gdbarch, sp);
+ 	}
+Index: gdb-7.5.0.20120926/gdb/lm32-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/lm32-tdep.c	2012-05-18 23:02:48.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/lm32-tdep.c	2012-11-07 22:03:57.695623384 +0100
+@@ -261,7 +261,6 @@ lm32_push_dummy_call (struct gdbarch *gd
+       struct value *arg = args[i];
+       struct type *arg_type = check_typedef (value_type (arg));
+       gdb_byte *contents;
+-      int len;
+       ULONGEST val;
+ 
+       /* Promote small integer types to int.  */
+@@ -283,8 +282,8 @@ lm32_push_dummy_call (struct gdbarch *gd
+       /* FIXME: Handle structures.  */
+ 
+       contents = (gdb_byte *) value_contents (arg);
+-      len = TYPE_LENGTH (arg_type);
+-      val = extract_unsigned_integer (contents, len, byte_order);
++      val = extract_unsigned_integer (contents, TYPE_LENGTH (arg_type),
++				      byte_order);
+ 
+       /* First num_arg_regs parameters are passed by registers, 
+          and the rest are passed on the stack.  */
+@@ -292,7 +291,7 @@ lm32_push_dummy_call (struct gdbarch *gd
+ 	regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val);
+       else
+ 	{
+-	  write_memory (sp, (void *) &val, len);
++	  write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
+ 	  sp -= 4;
+ 	}
+     }
+Index: gdb-7.5.0.20120926/gdb/m68hc11-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m68hc11-tdep.c	2012-05-16 16:35:06.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/m68hc11-tdep.c	2012-11-07 22:03:57.724623347 +0100
+@@ -1174,7 +1174,6 @@ m68hc11_push_dummy_call (struct gdbarch
+   int first_stack_argnum;
+   struct type *type;
+   char *val;
+-  int len;
+   char buf[2];
+   
+   first_stack_argnum = 0;
+@@ -1185,19 +1184,18 @@ m68hc11_push_dummy_call (struct gdbarch
+   else if (nargs > 0)
+     {
+       type = value_type (args[0]);
+-      len = TYPE_LENGTH (type);
+ 
+       /* First argument is passed in D and X registers.  */
+-      if (len <= 4)
++      if (TYPE_LENGTH (type) <= 4)
+         {
+           ULONGEST v;
+ 
+           v = extract_unsigned_integer (value_contents (args[0]),
+-					len, byte_order);
++					TYPE_LENGTH (type), byte_order);
+           first_stack_argnum = 1;
+ 
+           regcache_cooked_write_unsigned (regcache, HARD_D_REGNUM, v);
+-          if (len > 2)
++          if (TYPE_LENGTH (type) > 2)
+             {
+               v >>= 16;
+               regcache_cooked_write_unsigned (regcache, HARD_X_REGNUM, v);
+@@ -1208,9 +1206,8 @@ m68hc11_push_dummy_call (struct gdbarch
+   for (argnum = nargs - 1; argnum >= first_stack_argnum; argnum--)
+     {
+       type = value_type (args[argnum]);
+-      len = TYPE_LENGTH (type);
+ 
+-      if (len & 1)
++      if (TYPE_LENGTH (type) & 1)
+         {
+           static char zero = 0;
+ 
+@@ -1218,8 +1215,8 @@ m68hc11_push_dummy_call (struct gdbarch
+           write_memory (sp, &zero, 1);
+         }
+       val = (char*) value_contents (args[argnum]);
+-      sp -= len;
+-      write_memory (sp, val, len);
++      sp -= TYPE_LENGTH (type);
++      write_memory (sp, val, TYPE_LENGTH (type));
+     }
+ 
+   /* Store return address.  */
+@@ -1291,11 +1288,10 @@ static void
+ m68hc11_extract_return_value (struct type *type, struct regcache *regcache,
+                               void *valbuf)
+ {
+-  int len = TYPE_LENGTH (type);
+   char buf[M68HC11_REG_SIZE];
+ 
+   regcache_raw_read (regcache, HARD_D_REGNUM, buf);
+-  switch (len)
++  switch (TYPE_LENGTH (type))
+     {
+     case 1:
+       memcpy (valbuf, buf + 1, 1);
+Index: gdb-7.5.0.20120926/gdb/mep-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/mep-tdep.c	2012-05-16 16:35:06.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/mep-tdep.c	2012-11-07 22:03:57.727623334 +0100
+@@ -2337,11 +2337,10 @@ mep_push_dummy_call (struct gdbarch *gdb
+ 
+   for (i = 0; i < argc; i++)
+     {
+-      unsigned arg_size = TYPE_LENGTH (value_type (argv[i]));
+       ULONGEST value;
+ 
+       /* Arguments that fit in a GPR get expanded to fill the GPR.  */
+-      if (arg_size <= MEP_GPR_SIZE)
++      if (TYPE_LENGTH (value_type (argv[i])) <= MEP_GPR_SIZE)
+         value = extract_unsigned_integer (value_contents (argv[i]),
+                                           TYPE_LENGTH (value_type (argv[i])),
+ 					  byte_order);
+Index: gdb-7.5.0.20120926/gdb/printcmd.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/printcmd.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/printcmd.c	2012-11-07 22:03:57.730623334 +0100
+@@ -347,13 +347,12 @@ float_type_from_length (struct type *typ
+ {
+   struct gdbarch *gdbarch = get_type_arch (type);
+   const struct builtin_type *builtin = builtin_type (gdbarch);
+-  unsigned int len = TYPE_LENGTH (type);
+ 
+-  if (len == TYPE_LENGTH (builtin->builtin_float))
++  if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_float))
+     type = builtin->builtin_float;
+-  else if (len == TYPE_LENGTH (builtin->builtin_double))
++  else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_double))
+     type = builtin->builtin_double;
+-  else if (len == TYPE_LENGTH (builtin->builtin_long_double))
++  else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_long_double))
+     type = builtin->builtin_long_double;
+ 
+   return type;
+Index: gdb-7.5.0.20120926/gdb/s390-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/s390-tdep.c	2012-11-07 22:02:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/s390-tdep.c	2012-11-07 22:03:57.733623329 +0100
+@@ -376,9 +376,11 @@ s390_value_from_register (struct type *t
+ 			  struct frame_info *frame)
+ {
+   struct value *value = default_value_from_register (type, regnum, frame);
+-  int len = TYPE_LENGTH (check_typedef (type));
+ 
+-  if (regnum >= S390_F0_REGNUM && regnum <= S390_F15_REGNUM && len < 8)
++  check_typedef (type);
++
++  if (regnum >= S390_F0_REGNUM && regnum <= S390_F15_REGNUM
++      && TYPE_LENGTH (type) < 8)
+     set_value_offset (value, 0);
+ 
+   return value;
+Index: gdb-7.5.0.20120926/gdb/stack.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/stack.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/stack.c	2012-11-07 22:03:57.737623322 +0100
+@@ -354,14 +354,15 @@ read_frame_arg (struct symbol *sym, stru
+ 
+ 	  if (val && entryval && !ui_out_is_mi_like_p (current_uiout))
+ 	    {
+-	      unsigned len = TYPE_LENGTH (value_type (val));
++	      struct type *type = value_type (val);
+ 
+ 	      if (!value_optimized_out (val) && value_lazy (val))
+ 		value_fetch_lazy (val);
+ 	      if (!value_optimized_out (val) && value_lazy (entryval))
+ 		value_fetch_lazy (entryval);
+ 	      if (!value_optimized_out (val)
+-		  && value_available_contents_eq (val, 0, entryval, 0, len))
++		  && value_available_contents_eq (val, 0, entryval, 0,
++						  TYPE_LENGTH (type)))
+ 		{
+ 		  /* Initialize it just to avoid a GCC false warning.  */
+ 		  struct value *val_deref = NULL, *entryval_deref;
+@@ -373,12 +374,12 @@ read_frame_arg (struct symbol *sym, stru
+ 
+ 		  TRY_CATCH (except, RETURN_MASK_ERROR)
+ 		    {
+-		      unsigned len_deref;
++		      struct type *type_deref;
+ 
+ 		      val_deref = coerce_ref (val);
+ 		      if (value_lazy (val_deref))
+ 			value_fetch_lazy (val_deref);
+-		      len_deref = TYPE_LENGTH (value_type (val_deref));
++		      type_deref = value_type (val_deref);
+ 
+ 		      entryval_deref = coerce_ref (entryval);
+ 		      if (value_lazy (entryval_deref))
+@@ -389,7 +390,7 @@ read_frame_arg (struct symbol *sym, stru
+ 		      if (val != val_deref
+ 			  && value_available_contents_eq (val_deref, 0,
+ 							  entryval_deref, 0,
+-							  len_deref))
++						      TYPE_LENGTH (type_deref)))
+ 			val_equal = 1;
+ 		    }
+ 
+Index: gdb-7.5.0.20120926/gdb/tracepoint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/tracepoint.c	2012-06-30 00:46:46.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/tracepoint.c	2012-11-07 22:03:57.741623318 +0100
+@@ -1450,7 +1450,7 @@ encode_actions_1 (struct command_line *a
+ 		}
+ 	      else
+ 		{
+-		  unsigned long addr, len;
++		  unsigned long addr;
+ 		  struct cleanup *old_chain = NULL;
+ 		  struct cleanup *old_chain1 = NULL;
+ 
+@@ -1480,8 +1480,10 @@ encode_actions_1 (struct command_line *a
+ 		      /* Safe because we know it's a simple expression.  */
+ 		      tempval = evaluate_expression (exp);
+ 		      addr = value_address (tempval);
+-		      len = TYPE_LENGTH (check_typedef (exp->elts[1].type));
+-		      add_memrange (collect, memrange_absolute, addr, len);
++		      /* Initialize the TYPE_LENGTH if it is a typedef.  */
++		      check_typedef (exp->elts[1].type);
++		      add_memrange (collect, memrange_absolute, addr,
++				    TYPE_LENGTH (exp->elts[1].type));
+ 		      break;
+ 
+ 		    case OP_VAR_VALUE:
+Index: gdb-7.5.0.20120926/gdb/valops.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valops.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valops.c	2012-11-07 22:06:35.899393539 +0100
+@@ -1055,7 +1055,6 @@ value_fetch_lazy (struct value *val)
+       struct value *parent = value_parent (val);
+       LONGEST offset = value_offset (val);
+       LONGEST num;
+-      int length = TYPE_LENGTH (type);
+ 
+       if (!value_bits_valid (val,
+ 			     TARGET_CHAR_BIT * offset + value_bitpos (val),
+@@ -1069,9 +1068,9 @@ value_fetch_lazy (struct value *val)
+ 				      value_bitsize (val), parent, &num))
+ 	mark_value_bytes_unavailable (val,
+ 				      value_embedded_offset (val),
+-				      length);
++				      TYPE_LENGTH (type));
+       else
+-	store_signed_integer (value_contents_raw (val), length,
++	store_signed_integer (value_contents_raw (val), TYPE_LENGTH (type),
+ 			      byte_order, num);
+     }
+   else if (VALUE_LVAL (val) == lval_memory)
+@@ -1080,16 +1079,16 @@ value_fetch_lazy (struct value *val)
+ 
+       if (object_address_get_data (value_type (val), &addr))
+ 	{
+-	  struct type *type = value_enclosing_type (val);
+-	  int length = TYPE_LENGTH (check_typedef (type));
++	  struct type *type = check_typedef (value_enclosing_type (val));
+ 
+-	  if (length)
++	  if (TYPE_LENGTH (type))
+ 	    {
+ 	      /* Delay it after object_address_get_data above.  */
+ 	      allocate_value_contents (val);
+ 	      addr += value_offset (val);
+ 	      read_value_memory (val, 0, value_stack (val),
+-				 addr, value_contents_all_raw (val), length);
++				 addr, value_contents_all_raw (val),
++				 TYPE_LENGTH (type));
+ 	    }
+ 	}
+       /* Just to be sure it has been called.  */
+Index: gdb-7.5.0.20120926/gdb/value.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/value.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/value.c	2012-11-07 22:03:57.751623303 +0100
+@@ -1034,15 +1034,14 @@ value_contents_equal (struct value *val1
+ {
+   struct type *type1;
+   struct type *type2;
+-  int len;
+ 
+   type1 = check_typedef (value_type (val1));
+   type2 = check_typedef (value_type (val2));
+-  len = TYPE_LENGTH (type1);
+-  if (len != TYPE_LENGTH (type2))
++  if (TYPE_LENGTH (type1) != TYPE_LENGTH (type2))
+     return 0;
+ 
+-  return (memcmp (value_contents (val1), value_contents (val2), len) == 0);
++  return (memcmp (value_contents (val1), value_contents (val2),
++		  TYPE_LENGTH (type1)) == 0);
+ }
+ 
+ int

diff --git a/gdb-rhbz795424-bitpos-18of25.patch b/gdb-rhbz795424-bitpos-18of25.patch
new file mode 100644
index 0000000..162b556
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-18of25.patch
@@ -0,0 +1,45 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00145.html
+
+### src/gdb/ChangeLog	2012/09/25 12:48:52	1.14697
+### src/gdb/ChangeLog	2012/09/26 02:06:51	1.14698
+## -1,3 +1,8 @@
++2012-09-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* breakpoint.c (invalidate_bp_value_on_memory_change): Expand
++	parameter LEN to ssize_t.
++
+ 2012-09-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
+ 
+ 	* ada-valprint.c (ada_val_print_1): Eliminate single-use
+--- src/gdb/breakpoint.c	2012/09/25 12:48:52	1.705
++++ src/gdb/breakpoint.c	2012/09/26 02:06:54	1.706
+@@ -14718,7 +14718,7 @@
+    GDB itself.  */
+ 
+ static void
+-invalidate_bp_value_on_memory_change (CORE_ADDR addr, int len,
++invalidate_bp_value_on_memory_change (CORE_ADDR addr, ssize_t len,
+ 				      const bfd_byte *data)
+ {
+   struct breakpoint *bp;
+### src/gdb/doc/ChangeLog	2012/09/21 01:46:42	1.1370
+### src/gdb/doc/ChangeLog	2012/09/26 02:06:55	1.1371
+## -1,3 +1,7 @@
++2012-09-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* observer.texi (memory_changed): Expand parameter LEN to ssize_t.
++
+ 2012-09-21  Yao Qi  <yao@codesourcery.com>
+             Pedro Alves  <palves@redhat.com>
+ 
+--- src/gdb/doc/observer.texi	2012/09/21 01:46:43	1.40
++++ src/gdb/doc/observer.texi	2012/09/26 02:06:55	1.41
+@@ -230,7 +230,7 @@
+ This method is called immediately before freeing @var{inf}.
+ @end deftypefun
+ 
+-@deftypefun void memory_changed (CORE_ADDR @var{addr}, int @var{len}, const bfd_byte *@var{data})
++@deftypefun void memory_changed (CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data})
+ Bytes from @var{data} to @var{data} + @var{len} have been written
+ to the current inferior at @var{addr}.
+ @end deftypefun

diff --git a/gdb-rhbz795424-bitpos-19of25.patch b/gdb-rhbz795424-bitpos-19of25.patch
new file mode 100644
index 0000000..ea50ec7
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-19of25.patch
@@ -0,0 +1,260 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00147.html
+
+### src/gdb/ChangeLog	2012/09/26 02:06:51	1.14698
+### src/gdb/ChangeLog	2012/09/26 07:52:44	1.14699
+## -1,5 +1,19 @@
+ 2012-09-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
+ 
++	* amd64-tdep.c (amd64_return_value): Use TYPE_LENGTH directly.
++	* bfin-tdep.c (bfin_extract_return_value): Likewise.
++	(bfin_store_return_value): Likewise.
++	* cris-tdep.c (cris_store_return_value): Likewise.
++	(cris_extract_return_value): Likewise.
++	* h8300-tdep.c (h8300_extract_return_value): Likewise.
++	* hppa-tdep.c (hppa64_return_value): Likewise.
++	* lm32-tdep.c (lm32_store_return_value): Likewise.
++	* microblaze-tdep.c (microblaze_store_return_value): Likewise.
++	* spu-tdep.c (spu_value_from_register): Likewise.
++	* vax-tdep.c (vax_return_value): Likewise.
++
++2012-09-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
+ 	* breakpoint.c (invalidate_bp_value_on_memory_change): Expand
+ 	parameter LEN to ssize_t.
+ 
+--- src/gdb/amd64-tdep.c	2012/09/25 12:48:52	1.110
++++ src/gdb/amd64-tdep.c	2012/09/26 07:52:47	1.111
+@@ -637,7 +637,7 @@
+     }
+ 
+   gdb_assert (class[1] != AMD64_MEMORY);
+-  gdb_assert (len <= 16);
++  gdb_assert (TYPE_LENGTH (type) <= 16);
+ 
+   for (i = 0; len > 0; i++, len -= 8)
+     {
+--- src/gdb/bfin-tdep.c	2012/09/25 12:48:52	1.11
++++ src/gdb/bfin-tdep.c	2012/09/26 07:52:47	1.12
+@@ -615,7 +615,7 @@
+   ULONGEST tmp;
+   int regno = BFIN_R0_REGNUM;
+ 
+-  gdb_assert (len <= 8);
++  gdb_assert (TYPE_LENGTH (type) <= 8);
+ 
+   while (len > 0)
+     {
+@@ -643,7 +643,7 @@
+   int len = TYPE_LENGTH (type);
+   int regno = BFIN_R0_REGNUM;
+ 
+-  gdb_assert (len <= 8);
++  gdb_assert (TYPE_LENGTH (type) <= 8);
+ 
+   while (len > 0)
+     {
+--- src/gdb/cris-tdep.c	2012/05/18 21:02:47	1.185
++++ src/gdb/cris-tdep.c	2012/09/26 07:52:47	1.186
+@@ -1662,20 +1662,20 @@
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   ULONGEST val;
+-  int len = TYPE_LENGTH (type);
+   
+-  if (len <= 4)
++  if (TYPE_LENGTH (type) <= 4)
+     {
+       /* Put the return value in R10.  */
+-      val = extract_unsigned_integer (valbuf, len, byte_order);
++      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+       regcache_cooked_write_unsigned (regcache, ARG1_REGNUM, val);
+     }
+-  else if (len <= 8)
++  else if (TYPE_LENGTH (type) <= 8)
+     {
+       /* Put the return value in R10 and R11.  */
+       val = extract_unsigned_integer (valbuf, 4, byte_order);
+       regcache_cooked_write_unsigned (regcache, ARG1_REGNUM, val);
+-      val = extract_unsigned_integer ((char *)valbuf + 4, len - 4, byte_order);
++      val = extract_unsigned_integer ((char *)valbuf + 4,
++				      TYPE_LENGTH (type) - 4, byte_order);
+       regcache_cooked_write_unsigned (regcache, ARG2_REGNUM, val);
+     }
+   else
+@@ -1833,21 +1833,21 @@
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   ULONGEST val;
+-  int len = TYPE_LENGTH (type);
+   
+-  if (len <= 4)
++  if (TYPE_LENGTH (type) <= 4)
+     {
+       /* Get the return value from R10.  */
+       regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &val);
+-      store_unsigned_integer (valbuf, len, byte_order, val);
++      store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, val);
+     }
+-  else if (len <= 8)
++  else if (TYPE_LENGTH (type) <= 8)
+     {
+       /* Get the return value from R10 and R11.  */
+       regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &val);
+       store_unsigned_integer (valbuf, 4, byte_order, val);
+       regcache_cooked_read_unsigned (regcache, ARG2_REGNUM, &val);
+-      store_unsigned_integer ((char *)valbuf + 4, len - 4, byte_order, val);
++      store_unsigned_integer ((char *)valbuf + 4, TYPE_LENGTH (type) - 4,
++			      byte_order, val);
+     }
+   else
+     error (_("cris_extract_return_value: type length too large"));
+--- src/gdb/h8300-tdep.c	2012/09/25 12:48:53	1.136
++++ src/gdb/h8300-tdep.c	2012/09/26 07:52:48	1.137
+@@ -751,12 +751,12 @@
+   int len = TYPE_LENGTH (type);
+   ULONGEST c, addr;
+ 
+-  switch (len)
++  switch (TYPE_LENGTH (type))
+     {
+     case 1:
+     case 2:
+       regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+-      store_unsigned_integer (valbuf, len, byte_order, c);
++      store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
+       break;
+     case 4:			/* Needs two registers on plain H8/300 */
+       regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+@@ -768,8 +768,9 @@
+       if (TYPE_CODE (type) == TYPE_CODE_INT)
+ 	{
+ 	  regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
+-	  c = read_memory_unsigned_integer ((CORE_ADDR) addr, len, byte_order);
+-	  store_unsigned_integer (valbuf, len, byte_order, c);
++	  c = read_memory_unsigned_integer ((CORE_ADDR) addr,
++					    TYPE_LENGTH (type), byte_order);
++	  store_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order, c);
+ 	}
+       else
+ 	{
+--- src/gdb/hppa-tdep.c	2012/05/18 21:02:48	1.281
++++ src/gdb/hppa-tdep.c	2012/09/26 07:52:48	1.282
+@@ -1160,7 +1160,7 @@
+   int len = TYPE_LENGTH (type);
+   int regnum, offset;
+ 
+-  if (len > 16)
++  if (TYPE_LENGTH (type) > 16)
+     {
+       /* All return values larget than 128 bits must be aggregate
+          return values.  */
+--- src/gdb/lm32-tdep.c	2012/09/25 12:48:53	1.13
++++ src/gdb/lm32-tdep.c	2012/09/26 07:52:48	1.14
+@@ -349,18 +349,18 @@
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   ULONGEST val;
+-  int len = TYPE_LENGTH (type);
+ 
+-  if (len <= 4)
++  if (TYPE_LENGTH (type) <= 4)
+     {
+-      val = extract_unsigned_integer (valbuf, len, byte_order);
++      val = extract_unsigned_integer (valbuf, TYPE_LENGTH (type), byte_order);
+       regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
+     }
+-  else if (len <= 8)
++  else if (TYPE_LENGTH (type) <= 8)
+     {
+       val = extract_unsigned_integer (valbuf, 4, byte_order);
+       regcache_cooked_write_unsigned (regcache, SIM_LM32_R1_REGNUM, val);
+-      val = extract_unsigned_integer (valbuf + 4, len - 4, byte_order);
++      val = extract_unsigned_integer (valbuf + 4, TYPE_LENGTH (type) - 4,
++				      byte_order);
+       regcache_cooked_write_unsigned (regcache, SIM_LM32_R2_REGNUM, val);
+     }
+   else
+--- src/gdb/microblaze-tdep.c	2012/08/02 09:36:39	1.13
++++ src/gdb/microblaze-tdep.c	2012/09/26 07:52:48	1.14
+@@ -590,22 +590,21 @@
+ microblaze_store_return_value (struct type *type, struct regcache *regcache,
+ 			       const gdb_byte *valbuf)
+ {
+-  int len = TYPE_LENGTH (type);
+   gdb_byte buf[8];
+ 
+   memset (buf, 0, sizeof(buf));
+ 
+   /* Integral and pointer return values.  */
+ 
+-  if (len > 4)
++  if (TYPE_LENGTH (type) > 4)
+     {
+-       gdb_assert (len == 8);
++       gdb_assert (TYPE_LENGTH (type) == 8);
+        memcpy (buf, valbuf, 8);
+        regcache_cooked_write (regcache, MICROBLAZE_RETVAL_REGNUM+1, buf + 4);
+     }
+   else
+     /* ??? Do we need to do any sign-extension here?  */
+-    memcpy (buf + 4 - len, valbuf, len);
++    memcpy (buf + 4 - TYPE_LENGTH (type), valbuf, TYPE_LENGTH (type));
+ 
+   regcache_cooked_write (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
+ }
+--- src/gdb/spu-tdep.c	2012/09/17 08:52:18	1.82
++++ src/gdb/spu-tdep.c	2012/09/26 07:52:48	1.83
+@@ -316,11 +316,10 @@
+ 			 struct frame_info *frame)
+ {
+   struct value *value = default_value_from_register (type, regnum, frame);
+-  int len = TYPE_LENGTH (type);
+ 
+-  if (regnum < SPU_NUM_GPRS && len < 16)
++  if (regnum < SPU_NUM_GPRS && TYPE_LENGTH (type) < 16)
+     {
+-      int preferred_slot = len < 4 ? 4 - len : 0;
++      int preferred_slot = TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0;
+       set_value_offset (value, preferred_slot);
+     }
+ 
+--- src/gdb/vax-tdep.c	2012/05/16 14:35:08	1.112
++++ src/gdb/vax-tdep.c	2012/09/26 07:52:48	1.113
+@@ -208,7 +208,6 @@
+ 		  struct type *type, struct regcache *regcache,
+ 		  gdb_byte *readbuf, const gdb_byte *writebuf)
+ {
+-  int len = TYPE_LENGTH (type);
+   gdb_byte buf[8];
+ 
+   if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+@@ -224,7 +223,7 @@
+ 	  ULONGEST addr;
+ 
+ 	  regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
+-	  read_memory (addr, readbuf, len);
++	  read_memory (addr, readbuf, TYPE_LENGTH (type));
+ 	}
+ 
+       return RETURN_VALUE_ABI_RETURNS_ADDRESS;
+@@ -234,16 +233,16 @@
+     {
+       /* Read the contents of R0 and (if necessary) R1.  */
+       regcache_cooked_read (regcache, VAX_R0_REGNUM, buf);
+-      if (len > 4)
++      if (TYPE_LENGTH (type) > 4)
+ 	regcache_cooked_read (regcache, VAX_R1_REGNUM, buf + 4);
+-      memcpy (readbuf, buf, len);
++      memcpy (readbuf, buf, TYPE_LENGTH (type));
+     }
+   if (writebuf)
+     {
+       /* Read the contents to R0 and (if necessary) R1.  */
+-      memcpy (buf, writebuf, len);
++      memcpy (buf, writebuf, TYPE_LENGTH (type));
+       regcache_cooked_write (regcache, VAX_R0_REGNUM, buf);
+-      if (len > 4)
++      if (TYPE_LENGTH (type) > 4)
+ 	regcache_cooked_write (regcache, VAX_R1_REGNUM, buf + 4);
+     }
+ 

diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch
new file mode 100644
index 0000000..1210127
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-20of25.patch
@@ -0,0 +1,4532 @@
+http://sourceware.org/ml/gdb-patches/2012-09/msg00631.html
+Subject: [PATCH 1/4] Expand bitpos and type.length to LONGEST and ULONGEST
+
+
+--MP_/yp5f+W_ED2JtUlSyBi8xujr
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+Hi,
+
+This is patch 1/4, which implements the bulk of the changes in type
+length and bitpos/type offset. I have verified that there are no
+regressions resulting from this patch by running the testsuite on
+Fedora 16 x86_64.  Patch and changelog attached.
+
+Regards,
+Siddhesh
+
+--MP_/yp5f+W_ED2JtUlSyBi8xujr
+Content-Type: text/plain
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=ChangeLog-main
+
+gdb/ChangeLog
+
+2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* ada-lang.c (fat_pntr_bounds_bitpos): Return LONGEST.
+	(fat_pntr_data_bitpos): Likewise.
+	(desc_bound_bitpos): Likewise.
+	(constrained_packed_array_type): Expand ELT_BITS parameter to
+	LONGEST.
+	(move_bits): Expand parameters SRC_OFFSET and N to LONGEST.
+	(cond_offset_host): Expand parameter OFFSET to LONGEST.
+	(cond_offset_target): Likewise.
+	(ada_type_of_array): Expand ARRAY_BITSIZE to LONGEST.
+	(decode_constrained_packed_array_type): Expand BITS to LONGEST.
+	(decode_constrained_packed_array): Expand BIT_POS to LONGEST.
+	(ada_value_primitive_packed_val): Expand parameter OFFSET to
+	LONGEST.  Expand TARG, NTARG and NEW_OFFSET to LONGEST.
+	(ada_value_assign): Expand FROM_SIZE to LONGEST.
+	(value_assign_to_component): Expand BITS to LONGEST.
+	(ensure_lval): Expand LEN to LONGEST.
+	(value_pointer): Expand LEN to ULONGEST.
+	(value_tag_from_contents_and_address): Expand TAG_BYTE_OFFSET to
+	LONGEST.
+	(ada_value_primitive_field): Expand parameter OFFSET to LONGEST.
+	Expand bit_pos to LONGEST.
+	(find_struct_field): Expand parameters OFFSET and BYTE_OFFSET_P to
+	LONGEST.  Expand BIT_POS and FLD_OFFSET to LONGEST.
+	(ada_search_struct_field): Expand parameter OFFSET to LONGEST.
+	Expand VAR_OFFSET to LONGEST.
+	(ada_index_struct_field): Expand parameters INDEX and OFFSET to
+	LONGEST.
+	(ada_index_struct_field_1): Expand parameters INDEX_P and OFFSET
+	to LONGEST.
+	(ada_value_struct_elt): Expand BYTE_OFFSET to LONGEST.
+	(align_value): Return ULONGEST.  Expand parameter OFF and
+	ALIGNMENT to ULONGEST.
+	(ada_template_to_fixed_record_type_1): Expand OFF, BIT_LEN and
+	fld_bit_len to LONGEST.  Expand FIELD_OFFSET to LONGEST.  Use
+	pulongest function to print TYPE_LENGTH.
+	(to_fixed_array_type): Expand LEN to LONGEST.
+	* ada-lang.h (ada_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	(ada_printstr): Expand parameter LENGTH to ULONGEST.
+	(ada_value_primitive_packed_val): Expand parameter OFFSET to
+	LONGEST.
+	* ada-typeprint.c (ada_print_type): Use pulongest to print
+	TYPE_LENGTH.
+	* ada-valprint.c (val_print_packed_array_elements): Expand ELTLEN
+	to ULONGEST.
+	(char_at): Expand parameter I to LONGEST.
+	(printstr): Expand parameter LENGTH, I, REP1, REPS to ULONGEST.
+	Use pulongest to format print REPS.
+	(ada_printstr): Expand parameter LENGTH to LONGEST.
+	(ada_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	(ada_val_print_array): Expand ELTLEN, LEN to ULONGEST and TEMP_LEN
+	to LONGEST.
+	(ada_val_print_1): Expand parameter OFFSET to LONGEST.
+	(print_variant_part): Expand parameters OFFSET and OUTER_OFFSET to
+	LONGEST.
+	(print_field_values): Likewise.  Expand BIT_POS to LONGEST.
+	* annotate.c (annotate_array_section_begin): Expand parameter
+	IDX to LONGEST.  Use plongest to format-print IDX.
+	(annotate_elt_rep): Expand parameter REPCOUNT to ULONGEST.  Use
+	plongest to format-print REPCOUNT.
+	* annotate.h: Likewise.
+	* arm-linux-nat.c (arm_linux_region_ok_for_hw_watchpoint):
+	Expand parameter parameter LEN to LONGEST.
+	* ax-gdb.c (gen_left_shift): Expand parameter DISTANCE to LONGEST.
+	(gen_offset): Expand parameter OFFSET to LONGEST.
+	(gen_bitfield_ref): Expand parameters START, END to LONGEST.
+	Expand BOUND_START, BOUND_END, OFFSET to LONGEST.
+	(gen_primitive_field): Expand parameter OFFSET to LONGEST.
+	(gen_struct_ref_recursive): Likewise.
+	* ax-general.c (ax_trace_quick): Expand parameter N to LONGEST.
+	* ax.h (ax_trace_quick): Likewise.
+	* breakpoint.c (breakpoint_address_match_range): Expand parameter
+	LEN1 to LONGEST.
+	(can_use_hardware_watchpoint): Expand LEN to LONGEST.
+	* breakpoint.h (struct bp_target_info): Expand member LENGTH to
+	LONGEST.
+	(struct bp_location): Likewise.
+	* c-lang.c (c_printstr): Expand parameter LENGTH to ULONGEST.
+	(evaluate_subexp_c): Expand ELEMENT_SIZE, I to LONGEST.
+	* c-lang.h (c_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	(c_printstr): Expand parameter LENGTH to ULONGEST.
+	(cp_print_value_fields): Expand parameter OFFSET to LONGEST.
+	(cp_print_value_fields_rtti): Likewise.
+	* c-typeprint.c (c_type_print_varspec_suffix): Remove cast down to
+	int and use plongest to print LONGEST.
+	* c-valprint.c (c_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.  Expand OFFSET to LONGEST, ELTLEN to ULONGEST.
+	(c_value_print): Expand TOP to LONGEST.
+	* cp-abi.c (baseclass_offset): Return LONGEST.  Expand parameter
+	EMBEDDED_OFFSET to LONGEST.  Expand RES to LONGEST.
+	(value_virtual_fn_field): Expand parameter OFFSET to LONGEST.
+	(value_rtti_type): Expand parameter TOP to point to LONGEST.
+	* cp-abi.h (value_virtual_fn_field): Expand OFFSET to LONGEST.
+	(value_rtti_type): Expand TOP to point to LONGEST.
+	(baseclass_offset): Return LONGEST.  Expand parameter
+	EMBEDDED_OFFSET to LONGEST.
+	(struct cp_abi_ops): Expand parameter OFFSET for VIRTUAL_FN_FIELD
+	to LONGEST.  Expand parameter TOP to point to LONGEST in
+	VALUE_RTTI_TYPE.  Return LONGEST from BASECLASS_OFFSET and expand
+	parameter EMBEDDED_OFFSET to LONGEST.
+	* cp-valprint.c (cp_print_value_fields): Expand parameter OFFSET
+	to LONGEST.  Expand I_OFFSET to LONGEST.
+	(cp_print_value_fields_rtti): Expand parameter OFFSET to
+	LONGEST.  Expand TOP to LONGEST.
+	(cp_print_value): Expand parameter OFFSET to LONGEST.  Expand
+	THISOFFSET, BOFFSET to LONGEST.
+	* d-lang.h (d_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	* d-valprint.c (dynamic_array_type): Likewise.
+	(d_val_print): Likewise.
+	* doublest.c (floatformat_from_length): Expand parameter LEN to
+	LONGEST.  Use plongest to format string for LONGEST.
+	* dwarf2loc.c (copy_bitwise): Expand parameters DEST_OFFSET_BITS,
+	BIT_COUNT to ULONGEST.  Rename parameter SOURCE_OFFSET_BITS to
+	SOURCE_OFFSET and expand to ULONGEST.  New variable
+	SOURCE_OFFSET_BITS.
+	(read_pieced_value): Expand OFFSET, DEST_OFFSET_BITS,
+	SOURCE_OFFSET_BITS, SOURCE_OFFSET to LONGEST.  Expand TYPE_LEN,
+	THIS_SIZE, THIS_SIZE_BITS to ULONGEST.
+	(write_pieced_value): Likewise.
+	(check_pieced_value_bits): Expand parameters BIT_OFFSET and
+	BIT_LENGTH to LONGEST.  Expand THIS_SIZE_BITS to ULONGEST.
+	(check_pieced_value_validity): Expand parameters BIT_OFFSET and
+	BIT_LENGTH to LONGEST.
+	(check_pieced_synthetic_pointer): Likewise.
+	(indirect_pieced_value): Expand BIT_LENGTH, BYTE_OFFSET and
+	BIT_OFFSET to LONGEST.
+	(dwarf2_evaluate_loc_desc_full): Expand N to ULONGEST.
+	* dwarf2read.c (dwarf2_const_value_length_mismatch_complaint):
+	Expand parameters ARG2 and ARG3 to LONGEST.  Use plongest to
+	print ARG2 and ARG3.
+	(dwarf2_add_field): Expand ANONYMOUS_SIZE, BIT_OFFSET to
+	LONGEST.
+	* eval.c (evaluate_struct_tuple): Expand BITPOS to LONGEST.
+	(init_array_element): Expand ELEMENT_SIZE to LONGEST.
+	(binop_promote): Expand PROMOTED_LEN1, PROMOTED_LEN2, RESULT_LEN
+	to ULONGEST.
+	(evaluate_subexp_standard): Expand MEM_OFFSET, TOP, ELEMENT_SIZE
+	to LONGEST.
+	* f-lang.c (f_printstr): Expand parameter LENGTH to ULONGEST.
+	* f-lang.h (f_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	* f-valprint.c (f77_array_offset_tbl): Make LONGEST.
+	(f77_create_arrayprint_offset_tbl): Expand ELTLEN to LONGEST.
+	(f77_print_array_1): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.  Expand I to LONGEST.
+	(f77_print_array): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	(f_val_print): Likewise.  Expand OFFSET to LONGEST.
+	* findvar.c (default_value_from_register): Expand LEN to LONGEST.
+	(read_frame_register_value): Expand OFFSET, REG_OFFSET, LEN,
+	REG_LEN to LONGEST.
+	* frame.c (get_frame_register_bytes): Expand parameter LEN to
+	LONGEST.
+	* frame.h (get_frame_register_bytes): Likewise.
+	* gdbtypes.c (init_type): Expand parameter LENGTH to LONGEST.
+	(is_unique_ancestor_worker): Expand parameters OFFSET,
+	EMBEDDED_OFFSET to LONGEST.  Expand THIS_OFFSET to LONGEST.
+	(is_unique_ancestor): Expand OFFSET to LONGEST.
+	(recursive_dump_type): Use pulongest to format print TYPE_LENGTH.
+	Use plongest to format print TYPE_FIELD_BITPOS.
+	(arch_type): Expand parameter LENGTH to LONGEST.
+	* gdbtypes.h (struct type.main_type.fld_bnds.fields): Expand
+	member BITPOS to LONGEST.
+	(struct type): Expand member LENGTH to ULONGEST.
+	(init_type): Expand parameter LENGTH to LONGEST.
+	(arch_type): Likewise.
+	* gnu-v2-abi.c (gnuv2_virtual_fn_field): Expand parameter OFFSET
+	to LONGEST.
+	(gnuv2_value_rtti_type): Expand parameter TOP to point to LONGEST.
+	(gnuv2_baseclass_offset): Return LONGEST.  Expand parameter
+	EMBEDDED_OFFSET to LONGEST.  Expand FIELD_OFFSET, BOFFSET,
+	FIELD_LENGTH to LONGEST.
+	* gnu-v3-abi.c (build_gdb_vtable_type): Expand OFFSET to LONGEST.
+	(vtable_address_point_offset): Return LONGEST.
+	(gnuv3_rtti_type): Expand parameter TOP_P to point to LONGEST.
+	(gnuv3_virtual_fn_field): Expand parameter OFFSET to LONGEST.
+	(gnuv3_baseclass_offset): Return LONGEST.  Expand parameter
+	EMBEDDED_OFSET to LONGEST.  Expand CUR_BASE_OFFSET, BASE_OFFSET to
+	LONGEST.
+	(gnuv3_find_method_in): Expand POS to LONGEST.
+	* go-lang.h (go_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	* go-valprint.c (print_go_string): Likewise.
+	(go_val_print): Likewise.
+	* i386-nat.c (i386_handle_nonaligned_watchpoint): Expand
+	parameter LEN to LONGEST.
+	(i386_region_ok_for_watchpoint): Likewise.
+	* inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): Expand
+	parameter LEN to LONGEST.
+	* jv-lang.c (java_link_class_type): Expand BOFFSET to LONGEST.
+	(java_printstr): Expand parameter LENGTH to ULONGEST.
+	* jv-lang.h (java_val_print): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	* jv-valprint.c (java_print_value_fields): Expand parameter OFFSET
+	to LONGEST.
+	(java_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	* language.c (unk_lang_printstr): Expand parameter LENGTH to
+	ULONGEST.
+	(unk_lang_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	* language.h (language_defn): Expand parameter LENGTH of
+	LA_PRINTSTR to ULONGEST.  Expand parameter EMBEDDED_OFFSET of
+	LA_VAL_PRINT to LONGEST.
+	* m2-lang.c (m2_printstr): Expand parameter LENGTH to ULONGEST.
+	Expand I, REP1, REPS to ULONGEST.  Use pulongest to format print
+	REPS.
+	* m2-lang.h (m2_val_print): Expand parameter embedded_offset to
+	LONGEST.
+	* m2-typeprint.c (m2_array): New variable VAL.  Use pulongest to
+	* format print VAL.
+	(m2_enum): expand LASTVAL to LONGEST.
+	* m2-valprint.c (m2_print_long_set): Expand parameter
+	EMBEDDED_OFFSET to LONGEST.
+	(m2_print_unbounded_array): Likewise.
+	(m2_print_array_contents): Likewise.
+	(m2_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	Expand I, LEN, TEMP_LEN to ULONGEST.
+	* memrange.c (mem_ranges_overlap): Expand parameters LEN1, LEN2 to
+	LONGEST.
+	* memrange.h (struct mem_range): Expand member LENGTH to LONGEST.
+	(mem_ranges_overlap): Expand parameters LEN1, LEN2 to LONGEST.
+	* mips-linux-nat.c (mips_linux_region_ok_for_hw_watchpoint):
+	Expand parameter LEN to LONGEST.
+	* objc-lang.c (objc_printstr): Expand parameter LENGTH to
+	ULONGEST.  Expand I, REP1, REPS to ULONGEST.  use pulongest to
+	format print REPS.
+	* opencl-lang.c (lookup_opencl_vector_type): Expand parameter
+	EL_LENGTH to ULONGEST.  Expand LENGTH to ULONGEST.
+	(lval_func_read): Expand OFFSET, N, I, J and ELSIZE to LONGEST.
+	(lval_func_write): Likewise.
+	(lval_func_check_validity): Expand parameter LENGTH to LONGEST.
+	Expand ELSIZE, START, END, I, STARTREST, ENDREST, COMP_OFFSET,
+	COMP_LENGTH to LONGEST.
+	(lval_func_check_any_valid): Expand ELSIZE to LONGEST.
+	(lval_func_check_synthetic_pointer): Expand parameters OFFSET and
+	LENGTH to LONGEST.  Expand ELSIZE, START, END, I, STARTREST,
+	ENDREST, COMP_LENGTH, COMP_OFFSET to LONGEST.
+	* p-lang.c (is_pascal_string_type): Expand parameters LENGTH_POS,
+	STRING_POS, LENGTH_SIZE to point to LONGEST.
+	(pascal_printstr): Expand parameter LENGTH to ULONGEST.  Expand
+	I, REP1, REPS to ULONGEST.  Use pulongest to format print REPS.
+	* p-lang.h (pascal_val_print): Expand parameter EMBEDDED_OFFSET
+	to LONGEST.
+	(is_pascal_string_type): Expand parameters LENGTH_POS, STRING_POS,
+	LENGTH_SIZE to point to LONGEST.
+	(pascal_printstr): Expand parameter LENGTH to ULONGEST.
+	(pascal_object_print_value_fields): Expand parameter OFFSET to
+	LONGEST.
+	* p-valprint.c (pascal_val_print): Expand parameter
+	EMBEDDED_OFFSET to LONGEST.  Expand ELTLEN to ULONGEST.  Expand
+	LENGTH_SIZE, LENGTH_POS, STRING_POS to LONGEST.
+	(pascal_object_print_value_fields): Expand parameter OFFSET to
+	LONGEST.
+	(pascal_object_print_value): Likewise.  Expand BOFFSET,
+	THISOFFSET to LONGEST.
+	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint):
+	Expand parameter LEN to point to LONGEST.
+	* printcmd.c (print_formatted): Expand LEN to LONGEST.
+	(print_scalar_formatted): Likewise.
+	* procfs.c (procfs_region_ok_for_hw_watchpoint): Expand
+	parameter LEN to LONGEST.
+	* python/py-prettyprint.c (apply_val_pretty_printer): Expand
+	parameter EMBEDDED_OFFSET to LONGEST.
+	* python/python.h (apply_val_pretty_printer): Likewise.
+	* regcache.c (regcache_xfer_part): Expand parameter OFFSET to
+	LONGEST.
+	(regcache_raw_read_part): Likewise.
+	(regcache_raw_write_part): Likewise.
+	(regcache_cooked_read_part): Likewise.
+	(regcache_cooked_write_part): Likewise.
+	* regcache.h (regcache_raw_read_part): Likewise.
+	(regcache_raw_write_part): Likewise.
+	(regcache_cooked_read_part): Likewise.
+	(regcache_cooked_write_part): Likewise.
+	* remote.c (remote_region_ok_for_hw_watchpoint): Expand
+	parameter LEN to LONGEST.
+	* s390-nat.c (s390_region_ok_for_hw_watchpoint): Expand
+	parameter LEN to LONGEST.
+	* spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Expand
+	parameter len to LONGEST.
+	* stack.c (print_frame_nameless_args): Expand parameter START to
+	LONGEST.
+	(print_frame_args): Expand HIGHEST_OFFSET, CURRENT_OFFSET,
+	ARG_SIZE, START to LONGEST.
+	* symmisc.c (print_symbol): Expand I to ULONGEST.  Use pulongest
+	to format print TYPE_LENGTH.
+	* target.c (default_region_ok_for_hw_watchpoint): Expand parameter
+	LEN to LONGEST.
+	(debug_to_region_ok_for_hw_watchpoint): Likewise.
+	* target.h (struct target_ops): Expand parameter LEN to LONGEST
+	for TO_REGION_OK_FOR_HW_WATCHPOINT.
+	* tracepoint.c (add_memrange): Expand parameter LEN to LONGEST.
+	Use plongest to format print LEN.
+	(collect_symbol): Expand LEN to ULONGEST.  Use pulongest to
+	format print LEN.
+	(scope_info): Expand J to LONGEST.  Use pulongest to format
+	print TYPE_LENGTH.
+	* typeprint.c (whatis_exp): Expand TOP to LONGEST.
+	* valarith.c (value_subscripted_rvalue): Expand parameters INDEX
+	and LOWERBOUND to LONGEST.  Expand ELT_SIZE, ELT_OFFS to ULONGEST.
+	(value_concat): expand INVAL1LEN and INVAL2LEN to ssize_t.
+	(value_logical_not): Expand LEN to LONGEST.
+	(value_strcmp): Expand LEN1, LEN2, I, LEN to LONGEST.
+	* valops.c (value_allocate_space_in_inferior): Expand parameter
+	LEN to LONGEST.
+	(value_cast_structs): Expand TOP to LONGEST.
+	(value_cast): Expand ELEMENT_LENGTH to ULONGEST.  Expand
+	VAL_LENGTH to LONGEST.
+	(dynamic_cast_check_1): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.  Expand OFFSET to LONGEST.
+	(dynamic_cast_check_2): Likewise.
+	(value_dynamic_cast): Expand TOP to LONGEST.
+	(read_value_memory): Expand EMBEDDED_OFFSET to LONGEST.
+	(value_assign): Expand CHANGED_LEN, OFFSET to LONGEST.
+	(value_array): Expand TYPELENGTH to ULONGEST.
+	(update_search_result): Expand parameters LAST_BOFFSET, BOFFSET
+	to LONGEST.
+	(do_search_struct_field): Expand parameter OFFSET, LAST_BOFFSET
+	to LONGEST.  Expand NEW_OFFSET, BOFFSET to LONGEST.
+	(search_struct_field): Expand parameter OFFSET to LONGEST.
+	Expand BOFFSET to LONGEST.
+	(search_struct_method): Expand parameter OFFSET to LONGEST.
+	Expand BASE_OFFSET, THIS_OFFSET to LONGEST.
+	(find_method_list): Expand parameters OFFSET, BOFFSET to
+	LONGEST.  Expand BASE_OFFSET to LONGEST.
+	(value_find_oload_method_list): Expand parameter BOFFSET to point
+	to LONGEST.
+	(find_overload_match): Expand BOFFSET to LONGEST.
+	(value_struct_elt_for_reference): Expand parameter OFFSET to
+	LONGEST.  Remove unneeded cast.  Expand BASE_OFFSET to LONGEST.
+	(value_rtti_indirect_type): Expand parameter TOP to point to
+	LONGEST.
+	(value_full_object): Expand parameter XTOP to LONGEST.  Expand
+	TOP to LONGEST.
+	* valprint.c (valprint_check_validity): Expand parameter
+	EMBEDDED_OFFSET to LONGEST.
+	(generic_val_print): Likewise.
+	(val_print): Likewise.
+	(val_print_scalar_formatted): Likewise.
+	(print_hex_chars): Expand parameter LEN to ULONGEST.
+	(val_print_array_elements): Expand parameter EMBEDDED_OFFSET to
+	LONGEST, I to ULONGEST.  Expand LEN, ELTLEN, REP1, REPS to
+	ULONGEST.  Use pulongest to format print REPS.
+	(generic_printstr): Expand parameter LENGTH to ULONGEST.
+	* valprint.h (val_print_array_elements): Expand parameter
+	EMBEDDED_OFFSET to LONGEST.
+	(val_print_scalar_formatted): Likewise.
+	(print_hex_chars): Expand parameter LEN to ULONGEST.
+	(generic_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	(generic_printstr): Expand parameter LENGTH to ULONGEST.
+	* value.c (struct range): Expand members OFFSET, LENGTH to
+	LONGEST.
+	(ranges_overlap): Expand parameters OFFSET1, OFFSET2, LEN1 AND
+	LEN2 to LONGEST.
+	(range_contain): Expand parameter OFFSET, LENGTH to LONGEST.
+	(struct value): Expand members OFFSET, EMBEDDED_OFFSET,
+	POINTED_TO_OFFSET to LONGEST.
+	(value_bytes_available): Expand parameters OFFSET, LENGTH to
+	LONGEST.
+	(mark_value_bytes_unavailable): Likewise.
+	(find_first_range_overlap): Likewise.
+	(value_available_contents_eq): Expand parameters OFFSET1, OFFSET2
+	and LENGTH to LONGEST.
+	(value_offset): Return LONGEST.
+	(set_value_offset): Expand parameter OFFSET to LONGEST.
+	(value_contents_copy_raw): Expand parameters SRC_OFFSET,
+	DST_OFFSET, LENGTH to ssize_t.
+	(value_contents_copy): Likewise.
+	(value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST.
+	(value_bits_synthetic_pointer): Likewise.
+	(value_embedded_offset): Return LONGEST.
+	(set_value_embedded_offset): Expand parameter VAL to LONGEST.
+	(value_pointed_to_offset): Return LONGEST.
+	(set_value_pointed_to_offset): Expand parameter VAL to LONGEST.
+	(set_internalvar_component): Expand parameter OFFSET to LONGEST.
+	(value_primitive_field): Likewise.  Expand BITPOS, BOFFSET,
+	CONTAINER_BITSIZE to LONGEST.
+	(value_fn_field): Expand parameter OFFSET to LONGEST.
+	(unpack_value_bits_as_long_1): Expand parameters EMBEDDED_OFFSET,
+	BITPOS to LONGEST.  Expand READ_OFFSET to LONGEST.
+	(unpack_value_bits_as_long): Expand parameter EMBEDED_OFFSET to
+	LONGEST.
+	(unpack_value_field_as_long_1): Likewise.  Expand BITPOS to
+	LONGEST.
+	(unpack_value_field_as_long): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	(value_field_bitfield): Likewise.
+	(modify_field): Expand parameter BITPOS to LONGEST.  Expand
+	BYTESIZE to LONGEST.
+	* value.h (value_offset): Return LONGEST.
+	(set_value_offset): Expand parameter OFFSET to LONGEST.
+	(value_pointed_to_offset): Return LONGEST.
+	(set_value_pointed_to_offset): Expand parameter VAL to LONGEST.
+	(value_embedded_offset): Return LONGEST.
+	(set_value_embedded_offset): Expand parameter VAL to LONGEST.
+	(struct lval_funcs): Expand parameters OFFSET and LENGTH to
+	LONGEST for CHECK_VALIDITY.  Likewise for CHECK_SYNTHETIC_POINTER.
+	(valprint_check_validity): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	(value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST.
+	(value_bits_synthetic_pointer): Likewise.
+	(value_bytes_available): Likewise.
+	(mark_value_bytes_unavailable): Likewise.
+	(value_available_contents_eq): Fix comment.  Expand parameters
+	OFFSET1, OFFSET2, LENGTH to LONGEST.
+	(read_value_memory): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	(unpack_value_bits_as_long): Expand parameter EMBEDDED_OFFSET to
+	LONGEST.
+	(unpack_value_field_as_long): Likewise.
+	(value_field_bitfield): Likewise.
+	(value_contents_copy_raw): Expand parameters SRC_OFFSET,
+	DST_OFFSET, LENGTH to LONGEST.
+	(value_contents_copy): Likewise.
+	(value_primitive_field): Expand parameter OFFSET to LONGEST.
+	(value_rtti_indirect_type): Expand parameter TOP to point to
+	LONGEST.
+	(value_full_object): Expand parameter XTOP to LONGEST.
+	(set_internalvar_component): Expand parameter OFFSET to LONGEST.
+	(value_fn_field): Expand parameter OFFSET to LONGEST.
+	(modify_field): Expand parameter BITPOS to LONGEST.
+	(val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
+	(value_allocate_space_in_inferior): Expand parameter LEN to
+	LONGEST.
+
+gdb/testsuite/ChangeLog:
+
+2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* gdb.base/longest-types.exp: Add test case to get offset of
+	BUF2.
+
+--MP_/yp5f+W_ED2JtUlSyBi8xujr
+Content-Type: text/x-patch
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment; filename=bitpos-main.patch
+
+Index: gdb-7.5.0.20120926/gdb/ada-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ada-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/ada-lang.c	2012-11-07 22:09:29.668141036 +0100
+@@ -80,7 +80,7 @@ static struct type *desc_bounds_type (st
+ 
+ static struct value *desc_bounds (struct value *);
+ 
+-static int fat_pntr_bounds_bitpos (struct type *);
++static LONGEST fat_pntr_bounds_bitpos (struct type *);
+ 
+ static int fat_pntr_bounds_bitsize (struct type *);
+ 
+@@ -88,13 +88,13 @@ static struct type *desc_data_target_typ
+ 
+ static struct value *desc_data (struct value *);
+ 
+-static int fat_pntr_data_bitpos (struct type *);
++static LONGEST fat_pntr_data_bitpos (struct type *);
+ 
+ static int fat_pntr_data_bitsize (struct type *);
+ 
+ static struct value *desc_one_bound (struct value *, int, int);
+ 
+-static int desc_bound_bitpos (struct type *, int, int);
++static LONGEST desc_bound_bitpos (struct type *, int, int);
+ 
+ static int desc_bound_bitsize (struct type *, int, int);
+ 
+@@ -174,7 +174,7 @@ static struct type *static_unwrap_type (
+ 
+ static struct value *unwrap_value (struct value *);
+ 
+-static struct type *constrained_packed_array_type (struct type *, long *);
++static struct type *constrained_packed_array_type (struct type *, LONGEST *);
+ 
+ static struct type *decode_constrained_packed_array_type (struct type *);
+ 
+@@ -189,7 +189,8 @@ static int ada_is_unconstrained_packed_a
+ static struct value *value_subscript_packed (struct value *, int,
+                                              struct value **);
+ 
+-static void move_bits (gdb_byte *, int, const gdb_byte *, int, int, int);
++static void move_bits (gdb_byte *, int, const gdb_byte *, LONGEST, LONGEST,
++		       int);
+ 
+ static struct value *coerce_unspec_val_to_type (struct value *,
+                                                 struct type *);
+@@ -217,14 +218,14 @@ static struct value *value_val_atr (stru
+ static struct symbol *standard_lookup (const char *, const struct block *,
+                                        domain_enum);
+ 
+-static struct value *ada_search_struct_field (char *, struct value *, int,
++static struct value *ada_search_struct_field (char *, struct value *, LONGEST,
+                                               struct type *);
+ 
+-static struct value *ada_value_primitive_field (struct value *, int, int,
++static struct value *ada_value_primitive_field (struct value *, LONGEST, int,
+                                                 struct type *);
+ 
+-static int find_struct_field (const char *, struct type *, int,
+-                              struct type **, int *, int *, int *, int *);
++static int find_struct_field (const char *, struct type *, LONGEST,
++			      struct type **, LONGEST *, int *, int *, int *);
+ 
+ static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR,
+                                                 struct value *);
+@@ -240,7 +241,7 @@ static void ada_language_arch_info (stru
+ 
+ static void check_size (const struct type *);
+ 
+-static struct value *ada_index_struct_field (int, struct value *, int,
++static struct value *ada_index_struct_field (LONGEST, struct value *, LONGEST,
+ 					     struct type *);
+ 
+ static struct value *assign_aggregate (struct value *, struct value *, 
+@@ -586,7 +587,7 @@ coerce_unspec_val_to_type (struct value
+ }
+ 
+ static const gdb_byte *
+-cond_offset_host (const gdb_byte *valaddr, long offset)
++cond_offset_host (const gdb_byte *valaddr, LONGEST offset)
+ {
+   if (valaddr == NULL)
+     return NULL;
+@@ -595,7 +596,7 @@ cond_offset_host (const gdb_byte *valadd
+ }
+ 
+ static CORE_ADDR
+-cond_offset_target (CORE_ADDR address, long offset)
++cond_offset_target (CORE_ADDR address, LONGEST offset)
+ {
+   if (address == 0)
+     return 0;
+@@ -1601,7 +1602,7 @@ desc_bounds (struct value *arr)
+ /* If TYPE is the type of an array-descriptor (fat pointer),  the bit
+    position of the field containing the address of the bounds data.  */
+ 
+-static int
++static LONGEST
+ fat_pntr_bounds_bitpos (struct type *type)
+ {
+   return TYPE_FIELD_BITPOS (desc_base_type (type), 1);
+@@ -1667,7 +1668,7 @@ desc_data (struct value *arr)
+ /* If TYPE is the type of an array-descriptor (fat pointer), the bit
+    position of the field containing the address of the data.  */
+ 
+-static int
++static LONGEST
+ fat_pntr_data_bitpos (struct type *type)
+ {
+   return TYPE_FIELD_BITPOS (desc_base_type (type), 0);
+@@ -1702,7 +1703,7 @@ desc_one_bound (struct value *bounds, in
+    of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
+    bound, if WHICH is 1.  The first bound is I=1.  */
+ 
+-static int
++static LONGEST
+ desc_bound_bitpos (struct type *type, int i, int which)
+ {
+   return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2);
+@@ -1892,7 +1893,7 @@ ada_type_of_array (struct value *arr, in
+ 	         zero, and does not need to be recomputed.  */
+ 	      if (lo < hi)
+ 		{
+-		  int array_bitsize =
++		  LONGEST array_bitsize =
+ 		        (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0);
+ 
+ 		  TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8;
+@@ -2044,7 +2045,7 @@ decode_packed_array_bitsize (struct type
+    in bits.  */
+ 
+ static struct type *
+-constrained_packed_array_type (struct type *type, long *elt_bits)
++constrained_packed_array_type (struct type *type, LONGEST *elt_bits)
+ {
+   struct type *new_elt_type;
+   struct type *new_type;
+@@ -2096,7 +2097,7 @@ decode_constrained_packed_array_type (st
+   char *name;
+   const char *tail;
+   struct type *shadow_type;
+-  long bits;
++  LONGEST bits;
+ 
+   if (!raw_name)
+     raw_name = ada_type_name (desc_base_type (type));
+@@ -2167,7 +2168,8 @@ decode_constrained_packed_array (struct
+  	 array with no wrapper.  In order to interpret the value through
+  	 the (left-justified) packed array type we just built, we must
+  	 first left-justify it.  */
+-      int bit_size, bit_pos;
++      int bit_size;
++      LONGEST bit_pos;
+       ULONGEST mod;
+ 
+       mod = ada_modulus (value_type (arr)) - 1;
+@@ -2268,15 +2270,16 @@ has_negatives (struct type *type)
+ 
+ struct value *
+ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
+-				long offset, int bit_offset, int bit_size,
++				LONGEST offset, int bit_offset, int bit_size,
+                                 struct type *type)
+ {
+   struct value *v;
+-  int src,                      /* Index into the source area */
+-    targ,                       /* Index into the target area */
+-    srcBitsLeft,                /* Number of source bits left to move */
+-    nsrc, ntarg,                /* Number of source and target bytes */
+-    unusedLS,                   /* Number of bits in next significant
++  int src;                      /* Index into the source area */
++  LONGEST targ;                 /* Index into the target area */
++  int srcBitsLeft,              /* Number of source bits left to move */
++    nsrc;                       /* Number of source bytes */
++  LONGEST ntarg;                /* Number of target bytes */
++  int unusedLS,                 /* Number of bits in next significant
+                                    byte of source that are unused */
+     accumSize;                  /* Number of meaningful bits in accum */
+   unsigned char *bytes;         /* First byte containing data to unpack */
+@@ -2309,7 +2312,7 @@ ada_value_primitive_packed_val (struct v
+ 
+   if (obj != NULL)
+     {
+-      long new_offset = offset;
++      LONGEST new_offset = offset;
+ 
+       set_value_component_location (v, obj);
+       set_value_bitpos (v, bit_offset + value_bitpos (obj));
+@@ -2426,7 +2429,7 @@ ada_value_primitive_packed_val (struct v
+    not overlap.  */
+ static void
+ move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source,
+-	   int src_offset, int n, int bits_big_endian_p)
++	   LONGEST src_offset, LONGEST n, int bits_big_endian_p)
+ {
+   unsigned int accum, mask;
+   int accum_bits, chunk_size;
+@@ -2516,7 +2519,7 @@ ada_value_assign (struct value *toval, s
+     {
+       int len = (value_bitpos (toval)
+ 		 + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
+-      int from_size;
++      LONGEST from_size;
+       char *buffer = (char *) alloca (len);
+       struct value *val;
+       CORE_ADDR to_addr = value_address (toval);
+@@ -2561,7 +2564,7 @@ value_assign_to_component (struct value
+     (LONGEST)  (value_address (component) - value_address (container));
+   int bit_offset_in_container = 
+     value_bitpos (component) - value_bitpos (container);
+-  int bits;
++  LONGEST bits;
+   
+   val = value_cast (value_type (component), val);
+ 
+@@ -4081,7 +4084,7 @@ ensure_lval (struct value *val)
+   if (VALUE_LVAL (val) == not_lval
+       || VALUE_LVAL (val) == lval_internalvar)
+     {
+-      int len = TYPE_LENGTH (ada_check_typedef (value_type (val)));
++      LONGEST len = TYPE_LENGTH (ada_check_typedef (value_type (val)));
+       const CORE_ADDR addr =
+         value_as_long (value_allocate_space_in_inferior (len));
+ 
+@@ -4155,7 +4158,7 @@ static CORE_ADDR
+ value_pointer (struct value *value, struct type *type)
+ {
+   struct gdbarch *gdbarch = get_type_arch (type);
+-  unsigned len = TYPE_LENGTH (type);
++  ULONGEST len = TYPE_LENGTH (type);
+   gdb_byte *buf = alloca (len);
+   CORE_ADDR addr;
+ 
+@@ -6024,7 +6027,7 @@ value_tag_from_contents_and_address (str
+ 				     const gdb_byte *valaddr,
+                                      CORE_ADDR address)
+ {
+-  int tag_byte_offset;
++  LONGEST tag_byte_offset;
+   struct type *tag_type;
+ 
+   if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
+@@ -6407,7 +6410,7 @@ ada_in_variant (LONGEST val, struct type
+    only in that it can handle packed values of arbitrary type.  */
+ 
+ static struct value *
+-ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
++ada_value_primitive_field (struct value *arg1, LONGEST offset, int fieldno,
+                            struct type *arg_type)
+ {
+   struct type *type;
+@@ -6419,7 +6422,7 @@ ada_value_primitive_field (struct value
+ 
+   if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0)
+     {
+-      int bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
++      LONGEST bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
+       int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno);
+ 
+       return ada_value_primitive_packed_val (arg1, value_contents (arg1),
+@@ -6446,9 +6449,9 @@ ada_value_primitive_field (struct value
+    Returns 1 if found, 0 otherwise.  */
+ 
+ static int
+-find_struct_field (const char *name, struct type *type, int offset,
++find_struct_field (const char *name, struct type *type, LONGEST offset,
+                    struct type **field_type_p,
+-                   int *byte_offset_p, int *bit_offset_p, int *bit_size_p,
++		   LONGEST *byte_offset_p, int *bit_offset_p, int *bit_size_p,
+ 		   int *index_p)
+ {
+   int i;
+@@ -6466,8 +6469,8 @@ find_struct_field (const char *name, str
+ 
+   for (i = 0; i < TYPE_NFIELDS (type); i += 1)
+     {
+-      int bit_pos = TYPE_FIELD_BITPOS (type, i);
+-      int fld_offset = offset + bit_pos / 8;
++      LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i);
++      LONGEST fld_offset = offset + bit_pos / 8;
+       const char *t_field_name = TYPE_FIELD_NAME (type, i);
+ 
+       if (t_field_name == NULL)
+@@ -6537,7 +6540,7 @@ num_visible_fields (struct type *type)
+    Searches recursively through wrapper fields (e.g., '_parent').  */
+ 
+ static struct value *
+-ada_search_struct_field (char *name, struct value *arg, int offset,
++ada_search_struct_field (char *name, struct value *arg, LONGEST offset,
+                          struct type *type)
+ {
+   int i;
+@@ -6570,7 +6573,7 @@ ada_search_struct_field (char *name, str
+           int j;
+           struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type,
+ 									i));
+-          int var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
++	  LONGEST var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
+ 
+           for (j = 0; j < TYPE_NFIELDS (field_type); j += 1)
+             {
+@@ -6588,8 +6591,8 @@ ada_search_struct_field (char *name, str
+   return NULL;
+ }
+ 
+-static struct value *ada_index_struct_field_1 (int *, struct value *,
+-					       int, struct type *);
++static struct value *ada_index_struct_field_1 (LONGEST *, struct value *,
++					       LONGEST, struct type *);
+ 
+ 
+ /* Return field #INDEX in ARG, where the index is that returned by
+@@ -6598,7 +6601,7 @@ static struct value *ada_index_struct_fi
+  * If found, return value, else return NULL.  */
+ 
+ static struct value *
+-ada_index_struct_field (int index, struct value *arg, int offset,
++ada_index_struct_field (LONGEST index, struct value *arg, LONGEST offset,
+ 			struct type *type)
+ {
+   return ada_index_struct_field_1 (&index, arg, offset, type);
+@@ -6610,7 +6613,7 @@ ada_index_struct_field (int index, struc
+  * *INDEX_P.  */
+ 
+ static struct value *
+-ada_index_struct_field_1 (int *index_p, struct value *arg, int offset,
++ada_index_struct_field_1 (LONGEST *index_p, struct value *arg, LONGEST offset,
+ 			  struct type *type)
+ {
+   int i;
+@@ -6700,7 +6703,8 @@ ada_value_struct_elt (struct value *arg,
+     v = ada_search_struct_field (name, arg, 0, t);
+   else
+     {
+-      int bit_offset, bit_size, byte_offset;
++      int bit_offset, bit_size;
++      LONGEST byte_offset;
+       struct type *field_type;
+       CORE_ADDR address;
+ 
+@@ -7006,8 +7010,8 @@ ada_coerce_ref (struct value *val0)
+ /* Return OFF rounded upward if necessary to a multiple of
+    ALIGNMENT (a power of 2).  */
+ 
+-static unsigned int
+-align_value (unsigned int off, unsigned int alignment)
++static ULONGEST
++align_value (ULONGEST off, ULONGEST alignment)
+ {
+   return (off + alignment - 1) & ~(alignment - 1);
+ }
+@@ -7386,10 +7390,9 @@ ada_template_to_fixed_record_type_1 (str
+   struct value *mark = value_mark ();
+   struct value *dval;
+   struct type *rtype;
+-  int nfields, bit_len;
++  int nfields;
+   int variant_field;
+-  long off;
+-  int fld_bit_len;
++  LONGEST off, bit_len, fld_bit_len;
+   int f;
+ 
+   /* Compute the number of fields in this record type that are going
+@@ -7460,7 +7463,7 @@ ada_template_to_fixed_record_type_1 (str
+ 	     that follow this one.  */
+ 	  if (ada_is_aligner_type (field_type))
+ 	    {
+-	      long field_offset = TYPE_FIELD_BITPOS (field_type, f);
++	      LONGEST field_offset = TYPE_FIELD_BITPOS (field_type, f);
+ 
+ 	      field_valaddr = cond_offset_host (field_valaddr, field_offset);
+ 	      field_address = cond_offset_target (field_address, field_offset);
+@@ -7579,11 +7582,11 @@ ada_template_to_fixed_record_type_1 (str
+   if (TYPE_LENGTH (type) <= 0)
+     {
+       if (TYPE_NAME (rtype))
+-	warning (_("Invalid type size for `%s' detected: %d."),
+-		 TYPE_NAME (rtype), TYPE_LENGTH (type));
++	warning (_("Invalid type size for `%s' detected: %s."),
++		 TYPE_NAME (rtype), pulongest (TYPE_LENGTH (type)));
+       else
+-	warning (_("Invalid type size for <unnamed> detected: %d."),
+-		 TYPE_LENGTH (type));
++	warning (_("Invalid type size for <unnamed> detected: %s."),
++		 pulongest (TYPE_LENGTH (type)));
+     }
+   else
+     {
+@@ -7920,7 +7923,8 @@ to_fixed_array_type (struct type *type0,
+ 	 type was a regular (non-packed) array type.  As a result, the
+ 	 bitsize of the array elements needs to be set again, and the array
+ 	 length needs to be recomputed based on that bitsize.  */
+-      int len = TYPE_LENGTH (result) / TYPE_LENGTH (TYPE_TARGET_TYPE (result));
++      LONGEST len = (TYPE_LENGTH (result)
++		     / TYPE_LENGTH (TYPE_TARGET_TYPE (result)));
+       int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0);
+ 
+       TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0);
+Index: gdb-7.5.0.20120926/gdb/ada-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ada-lang.h	2012-03-29 20:23:00.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ada-lang.h	2012-11-07 22:09:29.669141035 +0100
+@@ -168,7 +168,7 @@ extern void ada_print_type (struct type
+ extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
+ 			       struct ui_file *stream);
+ 
+-extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
++extern void ada_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
+ 			   struct ui_file *, int,
+ 			   const struct value *,
+ 			   const struct value_print_options *);
+@@ -183,7 +183,7 @@ extern void ada_emit_char (int, struct t
+ extern void ada_printchar (int, struct type *, struct ui_file *);
+ 
+ extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *,
+-			  unsigned int, const char *, int,
++			  ULONGEST, const char *, int,
+ 			  const struct value_print_options *);
+ 
+ struct value *ada_convert_actual (struct value *actual,
+@@ -257,7 +257,7 @@ extern int ada_is_constrained_packed_arr
+ 
+ extern struct value *ada_value_primitive_packed_val (struct value *,
+ 						     const gdb_byte *,
+-                                                     long, int, int,
++						     LONGEST, int, int,
+                                                      struct type *);
+ 
+ extern struct type *ada_coerce_to_simple_array_type (struct type *);
+Index: gdb-7.5.0.20120926/gdb/ada-typeprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ada-typeprint.c	2012-04-18 08:46:46.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ada-typeprint.c	2012-11-07 22:09:29.705140982 +0100
+@@ -815,8 +815,8 @@ ada_print_type (struct type *type0, cons
+ 	    const char *name = ada_type_name (type);
+ 
+ 	    if (!ada_is_range_type_name (name))
+-	      fprintf_filtered (stream, _("<%d-byte integer>"),
+-				TYPE_LENGTH (type));
++	      fprintf_filtered (stream, _("<%s-byte integer>"),
++				pulongest (TYPE_LENGTH (type)));
+ 	    else
+ 	      {
+ 		fprintf_filtered (stream, "range ");
+@@ -837,7 +837,8 @@ ada_print_type (struct type *type0, cons
+ 	  }
+ 	break;
+       case TYPE_CODE_FLT:
+-	fprintf_filtered (stream, _("<%d-byte float>"), TYPE_LENGTH (type));
++	fprintf_filtered (stream, _("<%s-byte float>"),
++			  pulongest (TYPE_LENGTH (type)));
+ 	break;
+       case TYPE_CODE_ENUM:
+ 	if (show < 0)
+Index: gdb-7.5.0.20120926/gdb/ada-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ada-valprint.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/ada-valprint.c	2012-11-07 22:09:29.731140943 +0100
+@@ -42,16 +42,16 @@ static void print_record (struct type *,
+ 			  const struct value_print_options *);
+ 
+ static int print_field_values (struct type *, const gdb_byte *,
+-			       int,
++			       LONGEST,
+ 			       struct ui_file *, int,
+ 			       const struct value *,
+ 			       const struct value_print_options *,
+-			       int, struct type *, int);
++			       int, struct type *, LONGEST);
+ 
+ static void adjust_type_signedness (struct type *);
+ 
+-static void ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR,
+-			     struct ui_file *, int,
++static void ada_val_print_1 (struct type *, const gdb_byte *, LONGEST,
++			     CORE_ADDR, struct ui_file *, int,
+ 			     const struct value *,
+ 			     const struct value_print_options *);
+ \f
+@@ -144,7 +144,7 @@ val_print_packed_array_elements (struct
+   unsigned int things_printed = 0;
+   unsigned len;
+   struct type *elttype, *index_type;
+-  unsigned eltlen;
++  ULONGEST eltlen;
+   unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
+   struct value *mark = value_mark ();
+   LONGEST low = 0;
+@@ -293,7 +293,7 @@ ada_emit_char (int c, struct type *type,
+    of a character.  */
+ 
+ static int
+-char_at (const gdb_byte *string, int i, int type_len,
++char_at (const gdb_byte *string, LONGEST i, int type_len,
+ 	 enum bfd_endian byte_order)
+ {
+   if (type_len == 1)
+@@ -465,11 +465,11 @@ ada_print_scalar (struct type *type, LON
+ 
+ static void
+ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
+-	  unsigned int length, int force_ellipses, int type_len,
++	  ULONGEST length, int force_ellipses, int type_len,
+ 	  const struct value_print_options *options)
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (elttype));
+-  unsigned int i;
++  ULONGEST i;
+   unsigned int things_printed = 0;
+   int in_quotes = 0;
+   int need_comma = 0;
+@@ -484,9 +484,9 @@ printstr (struct ui_file *stream, struct
+     {
+       /* Position of the character we are examining
+          to see whether it is repeated.  */
+-      unsigned int rep1;
++      ULONGEST rep1;
+       /* Number of repetitions we have detected so far.  */
+-      unsigned int reps;
++      ULONGEST reps;
+ 
+       QUIT;
+ 
+@@ -520,7 +520,8 @@ printstr (struct ui_file *stream, struct
+ 	  ada_emit_char (char_at (string, i, type_len, byte_order),
+ 			 elttype, stream, '\'', type_len);
+ 	  fputs_filtered ("'", stream);
+-	  fprintf_filtered (stream, _(" <repeats %u times>"), reps);
++	  fprintf_filtered (stream, _(" <repeats %s times>"),
++			    pulongest (reps));
+ 	  i = rep1 - 1;
+ 	  things_printed += options->repeat_count_threshold;
+ 	  need_comma = 1;
+@@ -556,7 +557,7 @@ printstr (struct ui_file *stream, struct
+ 
+ void
+ ada_printstr (struct ui_file *stream, struct type *type,
+-	      const gdb_byte *string, unsigned int length,
++	      const gdb_byte *string, ULONGEST length,
+ 	      const char *encoding, int force_ellipses,
+ 	      const struct value_print_options *options)
+ {
+@@ -570,7 +571,7 @@ ada_printstr (struct ui_file *stream, st
+ 
+ void
+ ada_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)
+@@ -602,8 +603,8 @@ ada_val_print_array (struct type *type,
+     {
+       enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
+       struct type *elttype = TYPE_TARGET_TYPE (type);
+-      unsigned int eltlen;
+-      unsigned int len;
++      ULONGEST eltlen;
++      ULONGEST len;
+ 
+       /* We know that ELTTYPE cannot possibly be null, because we found
+ 	 that TYPE is a string-like type.  Similarly, the size of ELTTYPE
+@@ -621,7 +622,7 @@ ada_val_print_array (struct type *type,
+          elements up to it.  */
+       if (options->stop_print_at_null)
+         {
+-          int temp_len;
++          LONGEST temp_len;
+ 
+           /* Look for a NULL char.  */
+           for (temp_len = 0;
+@@ -654,7 +655,7 @@ ada_val_print_array (struct type *type,
+ 
+ static void
+ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
+-		 int offset, CORE_ADDR address,
++		 LONGEST offset, CORE_ADDR address,
+ 		 struct ui_file *stream, int recurse,
+ 		 const struct value *original_value,
+ 		 const struct value_print_options *options)
+@@ -923,12 +924,12 @@ ada_val_print_1 (struct type *type, cons
+ 
+ static int
+ print_variant_part (struct type *type, int field_num,
+-		    const gdb_byte *valaddr, int offset,
++		    const gdb_byte *valaddr, LONGEST offset,
+ 		    struct ui_file *stream, int recurse,
+ 		    const struct value *val,
+ 		    const struct value_print_options *options,
+ 		    int comma_needed,
+-		    struct type *outer_type, int outer_offset)
++		    struct type *outer_type, LONGEST outer_offset)
+ {
+   struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
+   int which = ada_which_variant_applies (var_type, outer_type,
+@@ -1035,11 +1036,11 @@ print_record (struct type *type, const g
+ 
+ static int
+ print_field_values (struct type *type, const gdb_byte *valaddr,
+-		    int offset, struct ui_file *stream, int recurse,
++		    LONGEST offset, struct ui_file *stream, int recurse,
+ 		    const struct value *val,
+ 		    const struct value_print_options *options,
+ 		    int comma_needed,
+-		    struct type *outer_type, int outer_offset)
++		    struct type *outer_type, LONGEST outer_offset)
+ {
+   int i, len;
+ 
+@@ -1120,7 +1121,7 @@ print_field_values (struct type *type, c
+ 	    }
+ 	  else
+ 	    {
+-	      int bit_pos = TYPE_FIELD_BITPOS (type, i);
++	      LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i);
+ 	      int bit_size = TYPE_FIELD_BITSIZE (type, i);
+ 	      struct value_print_options opts;
+ 
+Index: gdb-7.5.0.20120926/gdb/annotate.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/annotate.c	2012-01-04 09:16:56.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/annotate.c	2012-11-07 22:09:29.732140942 +0100
+@@ -522,21 +522,21 @@ annotate_frame_end (void)
+ }
+ \f
+ void
+-annotate_array_section_begin (int idx, struct type *elttype)
++annotate_array_section_begin (LONGEST idx, struct type *elttype)
+ {
+   if (annotation_level == 2)
+     {
+-      printf_filtered (("\n\032\032array-section-begin %d "), idx);
++      printf_filtered (("\n\032\032array-section-begin %s "), plongest (idx));
+       print_value_flags (elttype);
+       printf_filtered (("\n"));
+     }
+ }
+ 
+ void
+-annotate_elt_rep (unsigned int repcount)
++annotate_elt_rep (ULONGEST repcount)
+ {
+   if (annotation_level == 2)
+-    printf_filtered (("\n\032\032elt-rep %u\n"), repcount);
++    printf_filtered (("\n\032\032elt-rep %s\n"), pulongest (repcount));
+ }
+ 
+ void
+Index: gdb-7.5.0.20120926/gdb/annotate.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/annotate.h	2012-01-04 09:16:56.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/annotate.h	2012-11-07 22:09:29.733140941 +0100
+@@ -94,8 +94,8 @@ extern void annotate_frame_source_end (v
+ extern void annotate_frame_where (void);
+ extern void annotate_frame_end (void);
+ 
+-extern void annotate_array_section_begin (int, struct type *);
+-extern void annotate_elt_rep (unsigned int);
++extern void annotate_array_section_begin (LONGEST, struct type *);
++extern void annotate_elt_rep (ULONGEST);
+ extern void annotate_elt_rep_end (void);
+ extern void annotate_elt (void);
+ extern void annotate_array_section_end (void);
+Index: gdb-7.5.0.20120926/gdb/arm-linux-nat.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/arm-linux-nat.c	2012-08-01 14:57:06.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/arm-linux-nat.c	2012-11-07 22:09:29.734140940 +0100
+@@ -1073,7 +1073,7 @@ arm_linux_remove_hw_breakpoint (struct g
+ /* Are we able to use a hardware watchpoint for the LEN bytes starting at 
+    ADDR?  */
+ static int
+-arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap ();
+   CORE_ADDR max_wp_length, aligned_addr;
+Index: gdb-7.5.0.20120926/gdb/ax-gdb.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ax-gdb.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/ax-gdb.c	2012-11-07 22:09:29.736140938 +0100
+@@ -84,12 +84,12 @@ static void gen_traced_pop (struct gdbar
+ static void gen_sign_extend (struct agent_expr *, struct type *);
+ static void gen_extend (struct agent_expr *, struct type *);
+ static void gen_fetch (struct agent_expr *, struct type *);
+-static void gen_left_shift (struct agent_expr *, int);
++static void gen_left_shift (struct agent_expr *, LONGEST);
+ 
+ 
+ static void gen_frame_args_address (struct gdbarch *, struct agent_expr *);
+ static void gen_frame_locals_address (struct gdbarch *, struct agent_expr *);
+-static void gen_offset (struct agent_expr *ax, int offset);
++static void gen_offset (struct agent_expr *ax, LONGEST offset);
+ static void gen_sym_offset (struct agent_expr *, struct symbol *);
+ static void gen_var_ref (struct gdbarch *, struct agent_expr *ax,
+ 			 struct axs_value *value, struct symbol *var);
+@@ -137,15 +137,16 @@ static void gen_deref (struct agent_expr
+ static void gen_address_of (struct agent_expr *, struct axs_value *);
+ static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax,
+ 			      struct axs_value *value,
+-			      struct type *type, int start, int end);
++			      struct type *type, LONGEST start, LONGEST end);
+ static void gen_primitive_field (struct expression *exp,
+ 				 struct agent_expr *ax,
+ 				 struct axs_value *value,
+-				 int offset, int fieldno, struct type *type);
++				 LONGEST offset, int fieldno,
++				 struct type *type);
+ static int gen_struct_ref_recursive (struct expression *exp,
+ 				     struct agent_expr *ax,
+ 				     struct axs_value *value,
+-				     char *field, int offset,
++				     char *field, LONGEST offset,
+ 				     struct type *type);
+ static void gen_struct_ref (struct expression *exp, struct agent_expr *ax,
+ 			    struct axs_value *value,
+@@ -570,7 +571,7 @@ gen_fetch (struct agent_expr *ax, struct
+    right shift it by -DISTANCE bits if DISTANCE < 0.  This generates
+    unsigned (logical) right shifts.  */
+ static void
+-gen_left_shift (struct agent_expr *ax, int distance)
++gen_left_shift (struct agent_expr *ax, LONGEST distance)
+ {
+   if (distance > 0)
+     {
+@@ -624,7 +625,7 @@ gen_frame_locals_address (struct gdbarch
+    programming in ML, it would be clearer why these are the same
+    thing.  */
+ static void
+-gen_offset (struct agent_expr *ax, int offset)
++gen_offset (struct agent_expr *ax, LONGEST offset)
+ {
+   /* It would suffice to simply push the offset and add it, but this
+      makes it easier to read positive and negative offsets in the
+@@ -1280,7 +1281,7 @@ gen_address_of (struct agent_expr *ax, s
+ static void
+ gen_bitfield_ref (struct expression *exp, struct agent_expr *ax,
+ 		  struct axs_value *value, struct type *type,
+-		  int start, int end)
++		  LONGEST start, LONGEST end)
+ {
+   /* Note that ops[i] fetches 8 << i bits.  */
+   static enum agent_op ops[]
+@@ -1315,13 +1316,13 @@ gen_bitfield_ref (struct expression *exp
+ 
+   /* The first and one-after-last bits in the field, but rounded down
+      and up to byte boundaries.  */
+-  int bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT;
+-  int bound_end = (((end + TARGET_CHAR_BIT - 1)
+-		    / TARGET_CHAR_BIT)
+-		   * TARGET_CHAR_BIT);
++  LONGEST bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT;
++  LONGEST bound_end = (((end + TARGET_CHAR_BIT - 1)
++			/ TARGET_CHAR_BIT)
++		       * TARGET_CHAR_BIT);
+ 
+   /* current bit offset within the structure */
+-  int offset;
++  LONGEST offset;
+ 
+   /* The index in ops of the opcode we're considering.  */
+   int op;
+@@ -1440,7 +1441,7 @@ gen_bitfield_ref (struct expression *exp
+ static void
+ gen_primitive_field (struct expression *exp,
+ 		     struct agent_expr *ax, struct axs_value *value,
+-		     int offset, int fieldno, struct type *type)
++		     LONGEST offset, int fieldno, struct type *type)
+ {
+   /* Is this a bitfield?  */
+   if (TYPE_FIELD_PACKED (type, fieldno))
+@@ -1465,7 +1466,7 @@ gen_primitive_field (struct expression *
+ static int
+ gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
+ 			  struct axs_value *value,
+-			  char *field, int offset, struct type *type)
++			  char *field, LONGEST offset, struct type *type)
+ {
+   int i, rslt;
+   int nbases = TYPE_N_BASECLASSES (type);
+Index: gdb-7.5.0.20120926/gdb/ax-general.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ax-general.c	2012-07-02 17:29:33.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ax-general.c	2012-11-07 22:09:29.743140927 +0100
+@@ -192,7 +192,7 @@ ax_zero_ext (struct agent_expr *x, int n
+ 
+ /* Append a trace_quick instruction to EXPR, to record N bytes.  */
+ void
+-ax_trace_quick (struct agent_expr *x, int n)
++ax_trace_quick (struct agent_expr *x, LONGEST n)
+ {
+   /* N must fit in a byte.  */
+   if (n < 0 || n > 255)
+Index: gdb-7.5.0.20120926/gdb/ax.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ax.h	2012-07-02 17:29:33.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ax.h	2012-11-07 22:09:29.744140925 +0100
+@@ -190,7 +190,7 @@ extern void ax_ext (struct agent_expr *E
+ extern void ax_zero_ext (struct agent_expr *EXPR, int N);
+ 
+ /* Append a trace_quick instruction to EXPR, to record N bytes.  */
+-extern void ax_trace_quick (struct agent_expr *EXPR, int N);
++extern void ax_trace_quick (struct agent_expr *EXPR, LONGEST N);
+ 
+ /* Append a goto op to EXPR.  OP is the actual op (must be aop_goto or
+    aop_if_goto).  We assume we don't know the target offset yet,
+Index: gdb-7.5.0.20120926/gdb/breakpoint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/breakpoint.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/breakpoint.c	2012-11-07 22:09:29.748140920 +0100
+@@ -6565,7 +6565,7 @@ breakpoint_address_match (struct address
+ 
+ static int
+ breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1,
+-				int len1, struct address_space *aspace2,
++				LONGEST len1, struct address_space *aspace2,
+ 				CORE_ADDR addr2)
+ {
+   return ((gdbarch_has_global_breakpoints (target_gdbarch)
+@@ -11043,7 +11043,7 @@ can_use_hardware_watchpoint (struct valu
+ 		      && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
+ 		{
+ 		  CORE_ADDR vaddr = value_address (v);
+-		  int len;
++		  LONGEST len;
+ 		  int num_regs;
+ 
+ 		  len = (target_exact_watchpoints
+Index: gdb-7.5.0.20120926/gdb/breakpoint.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/breakpoint.h	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/breakpoint.h	2012-11-07 22:09:29.778140875 +0100
+@@ -250,7 +250,7 @@ struct bp_target_info
+ 
+   /* If this is a ranged breakpoint, then this field contains the
+      length of the range that will be watched for execution.  */
+-  int length;
++  LONGEST length;
+ 
+   /* If the breakpoint lives in memory and reading that memory would
+      give back the breakpoint, instead of the original contents, then
+@@ -419,7 +419,7 @@ struct bp_location
+   /* For hardware watchpoints, the size of the memory region being
+      watched.  For hardware ranged breakpoints, the size of the
+      breakpoint range.  */
+-  int length;
++  LONGEST length;
+ 
+   /* Type of hardware watchpoint.  */
+   enum target_hw_bp_type watchpoint_type;
+Index: gdb-7.5.0.20120926/gdb/c-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/c-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/c-lang.c	2012-11-07 22:09:29.786140864 +0100
+@@ -189,7 +189,7 @@ c_printchar (int c, struct type *type, s
+ 
+ void
+ c_printstr (struct ui_file *stream, struct type *type, 
+-	    const gdb_byte *string, unsigned int length, 
++	    const gdb_byte *string, ULONGEST length,
+ 	    const char *user_encoding, int force_ellipses,
+ 	    const struct value_print_options *options)
+ {
+@@ -678,7 +678,7 @@ evaluate_subexp_c (struct type *expect_t
+ 	  }
+ 	else
+ 	  {
+-	    int i;
++	    LONGEST i;
+ 
+ 	    /* Write the terminating character.  */
+ 	    for (i = 0; i < TYPE_LENGTH (type); ++i)
+@@ -687,7 +687,7 @@ evaluate_subexp_c (struct type *expect_t
+ 	    if (satisfy_expected)
+ 	      {
+ 		LONGEST low_bound, high_bound;
+-		int element_size = TYPE_LENGTH (type);
++		LONGEST element_size = TYPE_LENGTH (type);
+ 
+ 		if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type),
+ 					 &low_bound, &high_bound) < 0)
+Index: gdb-7.5.0.20120926/gdb/c-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/c-lang.h	2012-03-01 20:26:12.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/c-lang.h	2012-11-07 22:09:29.787140863 +0100
+@@ -72,7 +72,7 @@ extern void c_print_typedef (struct type
+ 			     struct ui_file *);
+ 
+ extern void c_val_print (struct type *, const gdb_byte *,
+-			 int, CORE_ADDR,
++			 LONGEST, CORE_ADDR,
+ 			 struct ui_file *, int,
+ 			 const struct value *,
+ 			 const struct value_print_options *);
+@@ -92,7 +92,7 @@ extern void c_printchar (int, struct typ
+ extern void c_printstr (struct ui_file * stream,
+ 			struct type *elttype,
+ 			const gdb_byte *string,
+-			unsigned int length,
++			ULONGEST length,
+ 			const char *user_encoding,
+ 			int force_ellipses,
+ 			const struct value_print_options *options);
+@@ -118,14 +118,14 @@ extern void cp_print_class_member (const
+ 				   struct ui_file *, char *);
+ 
+ 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);
+ 
+ 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 *,
+Index: gdb-7.5.0.20120926/gdb/c-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/c-valprint.c	2012-05-18 23:02:47.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/c-valprint.c	2012-11-07 22:09:29.789140861 +0100
+@@ -133,7 +133,7 @@ static const struct generic_val_print_de
+ 
+ void
+ c_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 *original_value,
+ 	     const struct value_print_options *options)
+@@ -144,7 +144,7 @@ c_val_print (struct type *type, const gd
+   unsigned len;
+   struct type *elttype, *unresolved_elttype;
+   struct type *unresolved_type = type;
+-  unsigned eltlen;
++  ULONGEST eltlen;
+   CORE_ADDR addr;
+ 
+   CHECK_TYPEDEF (type);
+@@ -364,9 +364,9 @@ c_val_print (struct type *type, const gd
+ 	  /* Print vtable entry - we only get here if NOT using
+ 	     -fvtable_thunks.  (Otherwise, look under
+ 	     TYPE_CODE_PTR.)  */
+-	  int offset = (embedded_offset
+-			+ TYPE_FIELD_BITPOS (type,
+-					     VTBL_FNADDR_OFFSET) / 8);
++	  LONGEST offset = (embedded_offset
++			    + TYPE_FIELD_BITPOS (type,
++						 VTBL_FNADDR_OFFSET) / 8);
+ 	  struct type *field_type = TYPE_FIELD_TYPE (type,
+ 						     VTBL_FNADDR_OFFSET);
+ 	  CORE_ADDR addr
+@@ -445,7 +445,8 @@ c_value_print (struct value *val, struct
+ 	       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 = *options;
+ 
+   opts.deref_ref = 1;
+Index: gdb-7.5.0.20120926/gdb/cp-abi.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/cp-abi.c	2012-03-15 16:43:11.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/cp-abi.c	2012-11-07 22:09:29.790140859 +0100
+@@ -68,13 +68,13 @@ is_operator_name (const char *name)
+   return (*current_cp_abi.is_operator_name) (name);
+ }
+ 
+-int
++LONGEST
+ 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)
+ {
+   volatile struct gdb_exception ex;
+-  int res = 0;
++  LONGEST res = 0;
+ 
+   gdb_assert (current_cp_abi.baseclass_offset != NULL);
+ 
+@@ -98,7 +98,7 @@ baseclass_offset (struct type *type, int
+ struct value *
+ value_virtual_fn_field (struct value **arg1p,
+ 			struct fn_field *f, int j,
+-			struct type *type, int offset)
++			struct type *type, LONGEST offset)
+ {
+   if ((current_cp_abi.virtual_fn_field) == NULL)
+     return NULL;
+@@ -108,7 +108,7 @@ value_virtual_fn_field (struct value **a
+ 
+ struct type *
+ value_rtti_type (struct value *v, int *full,
+-		 int *top, int *using_enc)
++		 LONGEST *top, int *using_enc)
+ {
+   struct type *ret = NULL;
+   volatile struct gdb_exception e;
+Index: gdb-7.5.0.20120926/gdb/cp-abi.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/cp-abi.h	2012-03-15 16:43:11.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/cp-abi.h	2012-11-07 22:09:29.792140855 +0100
+@@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi
+ 					     struct fn_field *f,
+ 					     int j,
+ 					     struct type *type,
+-					     int offset);
++					     LONGEST offset);
+ 
+ 
+ /* Try to find the run-time type of VALUE, using C++ run-time type
+@@ -135,7 +135,7 @@ extern struct value *value_virtual_fn_fi
+    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);
+ 
+ /* Compute the offset of the baseclass which is the INDEXth baseclass
+@@ -144,11 +144,11 @@ extern struct type *value_rtti_type (str
+    contents of VAL.  The result is the offset of the baseclass value
+    relative to (the address of)(ARG) + OFFSET.  */
+ 
+-extern int baseclass_offset (struct type *type,
+-			     int index, const gdb_byte *valaddr,
+-			     int embedded_offset,
+-			     CORE_ADDR address,
+-			     const struct value *val);
++extern LONGEST baseclass_offset (struct type *type,
++				 int index, const gdb_byte *valaddr,
++				 LONGEST embedded_offset,
++				 CORE_ADDR address,
++				 const struct value *val);
+ 
+ /* Describe the target of a pointer to method.  CONTENTS is the byte
+    pattern representing the pointer to method.  TYPE is the pointer to
+@@ -204,12 +204,13 @@ struct cp_abi_ops
+   struct value *(*virtual_fn_field) (struct value **arg1p,
+ 				     struct fn_field * f,
+ 				     int j, struct type * type,
+-				     int offset);
++				     LONGEST offset);
+   struct type *(*rtti_type) (struct value *v, int *full,
+-			     int *top, int *using_enc);
+-  int (*baseclass_offset) (struct type *type, int index,
+-			   const bfd_byte *valaddr, int embedded_offset,
+-			   CORE_ADDR address, const struct value *val);
++			     LONGEST *top, int *using_enc);
++  LONGEST (*baseclass_offset) (struct type *type, int index,
++			       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,
+ 			    struct ui_file *stream);
+Index: gdb-7.5.0.20120926/gdb/cp-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/cp-valprint.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/cp-valprint.c	2012-11-07 22:12:14.392901699 +0100
+@@ -82,7 +82,7 @@ static void cp_print_static_field (struc
+ 				   const struct value_print_options *);
+ 
+ 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 *,
+@@ -156,7 +156,7 @@ cp_is_vtbl_member (struct type *type)
+ 
+ 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,
+@@ -363,7 +363,7 @@ cp_print_value_fields (struct type *type
+ 		}
+ 	      else if (i == vptr_fieldno && type == vptr_basetype)
+ 		{
+-		  int i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
++		  LONGEST i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
+ 		  struct type *i_type = TYPE_FIELD_TYPE (type, i);
+ 
+ 		  if (valprint_check_validity (stream, i_type, i_offset, val))
+@@ -446,7 +446,7 @@ cp_print_value_fields (struct type *type
+ 
+ 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,
+@@ -462,7 +462,8 @@ cp_print_value_fields_rtti (struct type
+ 			TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+     {
+       struct value *value;
+-      int full, top, using_enc;
++      int full, using_enc;
++      LONGEST top;
+ 
+       /* Ugh, we have to convert back to a value here.  */
+       value = value_from_contents_and_address (type, valaddr + offset,
+@@ -486,7 +487,7 @@ cp_print_value_fields_rtti (struct type
+ 
+ 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,
+@@ -496,7 +497,7 @@ cp_print_value (struct type *type, struc
+     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
+   struct obstack tmp_obstack = dont_print_vb_obstack;
+   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
+-  int thisoffset;
++  LONGEST thisoffset;
+   struct type *thistype;
+ 
+   if (dont_print_vb == 0)
+@@ -510,7 +511,7 @@ cp_print_value (struct type *type, struc
+ 
+   for (i = 0; i < n_baseclasses; i++)
+     {
+-      int boffset = 0;
++      LONGEST boffset = 0;
+       int skip;
+       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
+       const char *basename = TYPE_NAME (baseclass);
+Index: gdb-7.5.0.20120926/gdb/d-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/d-lang.h	2012-03-01 20:26:12.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/d-lang.h	2012-11-07 22:09:29.795140852 +0100
+@@ -25,7 +25,7 @@
+ extern char *d_demangle (const char *mangled, int options);
+ 
+ extern void d_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);
+Index: gdb-7.5.0.20120926/gdb/d-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/d-valprint.c	2012-03-01 20:26:12.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/d-valprint.c	2012-11-07 22:09:29.795140852 +0100
+@@ -29,7 +29,7 @@
+ 
+ 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)
+@@ -71,9 +71,9 @@ dynamic_array_type (struct type *type, c
+ 
+ /* Implements the la_val_print routine for language D.  */
+ void
+-d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+-             CORE_ADDR address, struct ui_file *stream, int recurse,
+-	     const struct value *val,
++d_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)
+ {
+   int ret;
+Index: gdb-7.5.0.20120926/gdb/doublest.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/doublest.c	2012-01-04 09:17:00.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/doublest.c	2012-11-07 22:09:29.797140848 +0100
+@@ -770,7 +770,7 @@ floatformat_from_doublest (const struct
+    but not passed on by GDB.  This should be fixed.  */
+ 
+ static const struct floatformat *
+-floatformat_from_length (struct gdbarch *gdbarch, int len)
++floatformat_from_length (struct gdbarch *gdbarch, LONGEST len)
+ {
+   const struct floatformat *format;
+ 
+@@ -798,8 +798,8 @@ floatformat_from_length (struct gdbarch
+   else
+     format = NULL;
+   if (format == NULL)
+-    error (_("Unrecognized %d-bit floating-point type."),
+-	   len * TARGET_CHAR_BIT);
++    error (_("Unrecognized %s-bit floating-point type."),
++	   plongest (len * TARGET_CHAR_BIT));
+   return format;
+ }
+ 
+Index: gdb-7.5.0.20120926/gdb/dwarf2loc.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/dwarf2loc.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/dwarf2loc.c	2012-11-07 22:09:29.800140844 +0100
+@@ -1672,19 +1672,19 @@ insert_bits (unsigned int datum,
+    BITS_BIG_ENDIAN is taken directly from gdbarch.  */
+ 
+ static void
+-copy_bitwise (gdb_byte *dest, unsigned int dest_offset_bits,
+-	      const gdb_byte *source, unsigned int source_offset_bits,
+-	      unsigned int bit_count,
++copy_bitwise (gdb_byte *dest, ULONGEST dest_offset_bits,
++	      const gdb_byte *source, ULONGEST source_offset,
++	      ULONGEST bit_count,
+ 	      int bits_big_endian)
+ {
+-  unsigned int dest_avail;
++  unsigned int dest_avail, source_offset_bits;
+   int datum;
+ 
+   /* Reduce everything to byte-size pieces.  */
+   dest += dest_offset_bits / 8;
+   dest_offset_bits %= 8;
+-  source += source_offset_bits / 8;
+-  source_offset_bits %= 8;
++  source += source_offset / 8;
++  source_offset_bits = source_offset % 8;
+ 
+   dest_avail = 8 - dest_offset_bits % 8;
+ 
+@@ -1722,13 +1722,13 @@ static void
+ read_pieced_value (struct value *v)
+ {
+   int i;
+-  long offset = 0;
++  LONGEST offset = 0;
+   ULONGEST bits_to_skip;
+   gdb_byte *contents;
+   struct piece_closure *c
+     = (struct piece_closure *) value_computed_closure (v);
+   struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v));
+-  size_t type_len;
++  ULONGEST type_len;
+   size_t buffer_size = 0;
+   char *buffer = NULL;
+   struct cleanup *cleanup;
+@@ -1755,8 +1755,8 @@ read_pieced_value (struct value *v)
+   for (i = 0; i < c->n_pieces && offset < type_len; i++)
+     {
+       struct dwarf_expr_piece *p = &c->pieces[i];
+-      size_t this_size, this_size_bits;
+-      long dest_offset_bits, source_offset_bits, source_offset;
++      ULONGEST this_size, this_size_bits;
++      LONGEST dest_offset_bits, source_offset_bits, source_offset;
+       const gdb_byte *intermediate_buffer;
+ 
+       /* Compute size, source, and destination offsets for copying, in
+@@ -1905,13 +1905,13 @@ static void
+ write_pieced_value (struct value *to, struct value *from)
+ {
+   int i;
+-  long offset = 0;
++  LONGEST offset = 0;
+   ULONGEST bits_to_skip;
+   const gdb_byte *contents;
+   struct piece_closure *c
+     = (struct piece_closure *) value_computed_closure (to);
+   struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to));
+-  size_t type_len;
++  ULONGEST type_len;
+   size_t buffer_size = 0;
+   char *buffer = NULL;
+   struct cleanup *cleanup;
+@@ -1939,8 +1939,8 @@ write_pieced_value (struct value *to, st
+   for (i = 0; i < c->n_pieces && offset < type_len; i++)
+     {
+       struct dwarf_expr_piece *p = &c->pieces[i];
+-      size_t this_size_bits, this_size;
+-      long dest_offset_bits, source_offset_bits, dest_offset, source_offset;
++      ULONGEST this_size_bits, this_size;
++      LONGEST dest_offset_bits, source_offset_bits, dest_offset, source_offset;
+       int need_bitwise;
+       const gdb_byte *source_buffer;
+ 
+@@ -2069,8 +2069,8 @@ write_pieced_value (struct value *to, st
+    implicit pointer.  */
+ 
+ static int
+-check_pieced_value_bits (const struct value *value, int bit_offset,
+-			 int bit_length,
++check_pieced_value_bits (const struct value *value, LONGEST bit_offset,
++			 LONGEST bit_length,
+ 			 enum dwarf_value_location check_for)
+ {
+   struct piece_closure *c
+@@ -2086,7 +2086,7 @@ check_pieced_value_bits (const struct va
+   for (i = 0; i < c->n_pieces && bit_length > 0; i++)
+     {
+       struct dwarf_expr_piece *p = &c->pieces[i];
+-      size_t this_size_bits = p->size;
++      ULONGEST this_size_bits = p->size;
+ 
+       if (bit_offset > 0)
+ 	{
+@@ -2124,8 +2124,8 @@ check_pieced_value_bits (const struct va
+ }
+ 
+ static int
+-check_pieced_value_validity (const struct value *value, int bit_offset,
+-			     int bit_length)
++check_pieced_value_validity (const struct value *value, LONGEST bit_offset,
++			     LONGEST bit_length)
+ {
+   return check_pieced_value_bits (value, bit_offset, bit_length,
+ 				  DWARF_VALUE_MEMORY);
+@@ -2143,8 +2143,8 @@ check_pieced_value_invalid (const struct
+    a synthetic pointer.  */
+ 
+ static int
+-check_pieced_synthetic_pointer (const struct value *value, int bit_offset,
+-				int bit_length)
++check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset,
++				LONGEST bit_length)
+ {
+   return check_pieced_value_bits (value, bit_offset, bit_length,
+ 				  DWARF_VALUE_IMPLICIT_POINTER);
+@@ -2169,9 +2169,10 @@ indirect_pieced_value (struct value *val
+   struct type *type;
+   struct frame_info *frame;
+   struct dwarf2_locexpr_baton baton;
+-  int i, bit_offset, bit_length;
++  int i;
++  LONGEST bit_length;
+   struct dwarf_expr_piece *piece = NULL;
+-  LONGEST byte_offset;
++  LONGEST byte_offset, bit_offset;
+ 
+   type = check_typedef (value_type (value));
+   if (TYPE_CODE (type) != TYPE_CODE_PTR)
+@@ -2185,7 +2186,7 @@ indirect_pieced_value (struct value *val
+   for (i = 0; i < c->n_pieces && bit_length > 0; i++)
+     {
+       struct dwarf_expr_piece *p = &c->pieces[i];
+-      size_t this_size_bits = p->size;
++      ULONGEST this_size_bits = p->size;
+ 
+       if (bit_offset > 0)
+ 	{
+@@ -2400,7 +2401,7 @@ dwarf2_evaluate_loc_desc_full (struct ty
+ 	    struct value *value = dwarf_expr_fetch (ctx, 0);
+ 	    gdb_byte *contents;
+ 	    const gdb_byte *val_bytes;
+-	    size_t n = TYPE_LENGTH (value_type (value));
++	    ULONGEST n = TYPE_LENGTH (value_type (value));
+ 
+ 	    if (byte_offset + TYPE_LENGTH (type) > n)
+ 	      invalid_synthetic_pointer ();
+Index: gdb-7.5.0.20120926/gdb/dwarf2read.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/dwarf2read.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/dwarf2read.c	2012-11-07 22:09:29.809140832 +0100
+@@ -1128,12 +1128,12 @@ dwarf2_complex_location_expr_complaint (
+ }
+ 
+ static void
+-dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
+-					      int arg3)
++dwarf2_const_value_length_mismatch_complaint (const char *arg1, LONGEST arg2,
++					      LONGEST arg3)
+ {
+   complaint (&symfile_complaints,
+-	     _("const value length mismatch for '%s', got %d, expected %d"),
+-	     arg1, arg2, arg3);
++	     _("const value length mismatch for '%s', got %s, expected %s"),
++	     arg1, plongest (arg2), plongest (arg3));
+ }
+ 
+ static void
+@@ -9831,8 +9831,8 @@ dwarf2_add_field (struct field_info *fip
+ 	         object, and then subtract off the number of bits of
+ 	         the field itself.  The result is the bit offset of
+ 	         the LSB of the field.  */
+-	      int anonymous_size;
+-	      int bit_offset = DW_UNSND (attr);
++	      LONGEST anonymous_size;
++	      LONGEST bit_offset = DW_UNSND (attr);
+ 
+ 	      attr = dwarf2_attr (die, DW_AT_byte_size, cu);
+ 	      if (attr)
+Index: gdb-7.5.0.20120926/gdb/eval.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/eval.c	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/eval.c	2012-11-07 22:13:52.096837314 +0100
+@@ -320,7 +320,8 @@ evaluate_struct_tuple (struct value *str
+       int pc = *pos;
+       struct value *val = NULL;
+       int nlabels = 0;
+-      int bitpos, bitsize;
++      int bitsize;
++      LONGEST bitpos;
+       bfd_byte *addr;
+ 
+       /* Skip past the labels, and count them.  */
+@@ -463,7 +464,7 @@ init_array_element (struct value *array,
+ 		    enum noside noside, LONGEST low_bound, LONGEST high_bound)
+ {
+   LONGEST index;
+-  int element_size = TYPE_LENGTH (value_type (element));
++  LONGEST element_size = TYPE_LENGTH (value_type (element));
+ 
+   if (exp->elts[*pos].opcode == BINOP_COMMA)
+     {
+@@ -816,11 +817,11 @@ binop_promote (const struct language_def
+     /* FIXME: Also mixed integral/booleans, with result an integer.  */
+     {
+       const struct builtin_type *builtin = builtin_type (gdbarch);
+-      unsigned int promoted_len1 = TYPE_LENGTH (type1);
+-      unsigned int promoted_len2 = TYPE_LENGTH (type2);
++      ULONGEST promoted_len1 = TYPE_LENGTH (type1);
++      ULONGEST promoted_len2 = TYPE_LENGTH (type2);
+       int is_unsigned1 = TYPE_UNSIGNED (type1);
+       int is_unsigned2 = TYPE_UNSIGNED (type2);
+-      unsigned int result_len;
++      ULONGEST result_len;
+       int unsigned_operation;
+ 
+       /* Determine type length and signedness after promotion for
+@@ -1004,7 +1005,7 @@ evaluate_subexp_standard (struct type *e
+   int lower;
+   int code;
+   int ix;
+-  long mem_offset;
++  LONGEST mem_offset;
+   struct type **arg_types;
+   int save_pos1;
+   struct symbol *function = NULL;
+@@ -1194,7 +1195,7 @@ evaluate_subexp_standard (struct type *e
+ 	  struct type *range_type = TYPE_INDEX_TYPE (type);
+ 	  struct type *element_type = TYPE_TARGET_TYPE (type);
+ 	  struct value *array = allocate_value (expect_type);
+-	  int element_size = TYPE_LENGTH (check_typedef (element_type));
++	  LONGEST element_size = TYPE_LENGTH (check_typedef (element_type));
+ 	  LONGEST low_bound, high_bound, index;
+ 
+ 	  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
+@@ -2194,7 +2195,8 @@ evaluate_subexp_standard (struct type *e
+       {
+         struct type *type = value_type (arg1);
+         struct type *real_type;
+-        int full, top, using_enc;
++        int full, using_enc;
++	LONGEST top;
+ 	struct value_print_options opts;
+ 
+ 	get_user_print_options (&opts);
+Index: gdb-7.5.0.20120926/gdb/f-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/f-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/f-lang.c	2012-11-07 22:09:29.847140776 +0100
+@@ -124,7 +124,7 @@ f_printchar (int c, struct type *type, s
+ 
+ static void
+ f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
+-	    unsigned int length, const char *encoding, int force_ellipses,
++	    ULONGEST length, const char *encoding, int force_ellipses,
+ 	    const struct value_print_options *options)
+ {
+   const char *type_encoding = f_get_encoding (type);
+Index: gdb-7.5.0.20120926/gdb/f-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/f-lang.h	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/f-lang.h	2012-11-07 22:12:39.504865208 +0100
+@@ -32,7 +32,7 @@ extern const char *f_object_address_data
+   (struct type *type, struct ui_file *stream);
+ extern void f_object_address_data_valid_or_error (struct type *type);
+ 
+-extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
++extern void f_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
+ 			 struct ui_file *, int,
+ 			 const struct value *,
+ 			 const struct value_print_options *);
+Index: gdb-7.5.0.20120926/gdb/f-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/f-valprint.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/f-valprint.c	2012-11-07 22:09:29.849140772 +0100
+@@ -43,7 +43,7 @@ static void f77_create_arrayprint_offset
+ 					      struct ui_file *);
+ static void f77_get_dynamic_length_of_aggregate (struct type *);
+ 
+-int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
++LONGEST f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
+ 
+ /* Array which holds offsets to be applied to get a row's elements
+    for a given array.  Array also holds the size of each subarray.  */
+@@ -126,7 +126,7 @@ static void
+ f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
+ {
+   struct type *tmp_type;
+-  int eltlen;
++  LONGEST eltlen;
+   int ndimen = 1;
+   int upper, lower;
+ 
+@@ -171,13 +171,13 @@ f77_create_arrayprint_offset_tbl (struct
+ static void
+ f77_print_array_1 (int nss, int ndimensions, 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,
+ 		   int *elts)
+ {
+-  int i;
++  LONGEST i;
+ 
+   if (nss != ndimensions)
+     {
+@@ -220,7 +220,7 @@ f77_print_array_1 (int nss, int ndimensi
+ 
+ static void
+ f77_print_array (struct type *type, const gdb_byte *valaddr,
+-		 int embedded_offset,
++		 LONGEST embedded_offset,
+ 		 CORE_ADDR address, struct ui_file *stream,
+ 		 int recurse,
+ 		 const struct value *val,
+@@ -263,8 +263,9 @@ static const struct generic_val_print_de
+    function; they are identical.  */
+ 
+ void
+-f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+-	     CORE_ADDR address, struct ui_file *stream, int recurse,
++f_val_print (struct type *type, const gdb_byte *valaddr,
++	     LONGEST embedded_offset, CORE_ADDR address,
++	     struct ui_file *stream, int recurse,
+ 	     const struct value *original_value,
+ 	     const struct value_print_options *options)
+ {
+@@ -389,7 +390,7 @@ f_val_print (struct type *type, const gd
+       fprintf_filtered (stream, "( ");
+       for (index = 0; index < TYPE_NFIELDS (type); index++)
+         {
+-          int offset = TYPE_FIELD_BITPOS (type, index) / 8;
++	  LONGEST offset = TYPE_FIELD_BITPOS (type, index) / 8;
+ 
+           val_print (TYPE_FIELD_TYPE (type, index), valaddr,
+ 		     embedded_offset + offset,
+Index: gdb-7.5.0.20120926/gdb/findvar.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/findvar.c	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/findvar.c	2012-11-07 22:10:21.855065210 +0100
+@@ -645,7 +645,7 @@ default_value_from_register (struct type
+ 			     struct frame_info *frame)
+ {
+   struct gdbarch *gdbarch = get_frame_arch (frame);
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+   struct value *value = allocate_value (type);
+ 
+   VALUE_LVAL (value) = lval_register;
+@@ -675,10 +675,10 @@ void
+ read_frame_register_value (struct value *value, struct frame_info *frame)
+ {
+   struct gdbarch *gdbarch = get_frame_arch (frame);
+-  int offset = 0;
+-  int reg_offset = value_offset (value);
++  LONGEST offset = 0;
++  LONGEST reg_offset = value_offset (value);
+   int regnum = VALUE_REGNUM (value);
+-  int len = TYPE_LENGTH (check_typedef (value_type (value)));
++  LONGEST len = TYPE_LENGTH (check_typedef (value_type (value)));
+ 
+   gdb_assert (VALUE_LVAL (value) == lval_register);
+ 
+@@ -693,7 +693,7 @@ read_frame_register_value (struct value
+   while (len > 0)
+     {
+       struct value *regval = get_frame_register_value (frame, regnum);
+-      int reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset;
++      LONGEST reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset;
+ 
+       /* If the register length is larger than the number of bytes
+          remaining to copy, then only copy the appropriate bytes.  */
+Index: gdb-7.5.0.20120926/gdb/frame.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/frame.c	2012-09-17 09:17:27.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/frame.c	2012-11-07 22:09:29.853140768 +0100
+@@ -1117,7 +1117,7 @@ frame_register_read (struct frame_info *
+ 
+ int
+ get_frame_register_bytes (struct frame_info *frame, int regnum,
+-			  CORE_ADDR offset, int len, gdb_byte *myaddr,
++			  CORE_ADDR offset, LONGEST len, gdb_byte *myaddr,
+ 			  int *optimizedp, int *unavailablep)
+ {
+   struct gdbarch *gdbarch = get_frame_arch (frame);
+@@ -1146,7 +1146,7 @@ get_frame_register_bytes (struct frame_i
+     }
+   if (len > maxsize)
+     error (_("Bad debug information detected: "
+-	     "Attempt to read %d bytes from registers."), len);
++	     "Attempt to read %s bytes from registers."), plongest (len));
+ 
+   /* Copy the data.  */
+   while (len > 0)
+Index: gdb-7.5.0.20120926/gdb/frame.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/frame.h	2012-03-01 23:47:46.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/frame.h	2012-11-07 22:09:29.854140766 +0100
+@@ -530,7 +530,7 @@ extern void put_frame_register (struct f
+    contents are optimized out or unavailable, set *OPTIMIZEDP,
+    *UNAVAILABLEP accordingly.  */
+ extern int get_frame_register_bytes (struct frame_info *frame, int regnum,
+-				     CORE_ADDR offset, int len,
++				     CORE_ADDR offset, LONGEST len,
+ 				     gdb_byte *myaddr,
+ 				     int *optimizedp, int *unavailablep);
+ 
+Index: gdb-7.5.0.20120926/gdb/gdbtypes.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/gdbtypes.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/gdbtypes.c	2012-11-07 22:09:57.924099982 +0100
+@@ -2089,7 +2089,7 @@ allocate_gnat_aux_type (struct type *typ
+    where init_type is called with a NULL value for NAME).  */
+ 
+ struct type *
+-init_type (enum type_code code, int length, int flags,
++init_type (enum type_code code, LONGEST length, int flags,
+ 	   char *name, struct objfile *objfile)
+ {
+   struct type *type;
+@@ -2321,8 +2321,8 @@ is_public_ancestor (struct type *base, s
+ 
+ static int
+ is_unique_ancestor_worker (struct type *base, struct type *dclass,
+-			   int *offset,
+-			   const gdb_byte *valaddr, int embedded_offset,
++			   LONGEST *offset,
++			   const gdb_byte *valaddr, LONGEST embedded_offset,
+ 			   CORE_ADDR address, struct value *val)
+ {
+   int i, count = 0;
+@@ -2333,7 +2333,7 @@ is_unique_ancestor_worker (struct type *
+   for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i)
+     {
+       struct type *iter;
+-      int this_offset;
++      LONGEST this_offset;
+ 
+       iter = check_typedef (TYPE_BASECLASS (dclass, i));
+ 
+@@ -2374,7 +2374,7 @@ is_unique_ancestor_worker (struct type *
+ int
+ is_unique_ancestor (struct type *base, struct value *val)
+ {
+-  int offset = -1;
++  LONGEST offset = -1;
+ 
+   return is_unique_ancestor_worker (base, value_type (val), &offset,
+ 				    value_contents_for_printing (val),
+@@ -3275,7 +3275,7 @@ recursive_dump_type (struct type *type,
+       break;
+     }
+   puts_filtered ("\n");
+-  printfi_filtered (spaces, "length %d\n", TYPE_LENGTH (type));
++  printfi_filtered (spaces, "length %s\n", pulongest (TYPE_LENGTH (type)));
+   if (TYPE_OBJFILE_OWNED (type))
+     {
+       printfi_filtered (spaces, "objfile ");
+@@ -3395,8 +3395,8 @@ recursive_dump_type (struct type *type,
+ 			  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' (",
+@@ -4105,7 +4105,7 @@ free_all_types (void)
+    CODE, LENGTH, and NAME fields.  */
+ struct type *
+ arch_type (struct gdbarch *gdbarch,
+-	   enum type_code code, int length, char *name)
++	   enum type_code code, LONGEST length, char *name)
+ {
+   struct type *type;
+ 
+Index: gdb-7.5.0.20120926/gdb/gdbtypes.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/gdbtypes.h	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/gdbtypes.h	2012-11-07 22:09:29.861140755 +0100
+@@ -602,7 +602,7 @@ struct main_type
+ 	   gdbarch_bits_big_endian=0 targets, it is the bit offset to
+ 	   the LSB.  */
+ 
+-	int bitpos;
++	LONGEST bitpos;
+ 
+ 	/* Enum value.  */
+ 	LONGEST enumval;
+@@ -794,7 +794,7 @@ struct type
+      HOST_CHAR_BIT.  However, this would still fail to address
+      machines based on a ternary or decimal representation.  */
+   
+-  unsigned length;
++  ULONGEST length;
+ 
+   /* Core type, shared by a group of qualified types.  */
+   struct main_type *main_type;
+@@ -1546,11 +1546,12 @@ extern struct type *alloc_type_copy (con
+ extern struct gdbarch *get_type_arch (const struct type *);
+ 
+ /* Helper function to construct objfile-owned types.  */
+-extern struct type *init_type (enum type_code, int, int, char *,
++extern struct type *init_type (enum type_code, LONGEST, int, char *,
+ 			       struct objfile *);
+ 
+ /* Helper functions to construct architecture-owned types.  */
+-extern struct type *arch_type (struct gdbarch *, enum type_code, int, char *);
++extern struct type *arch_type (struct gdbarch *, enum type_code, LONGEST,
++			       char *);
+ extern struct type *arch_integer_type (struct gdbarch *, int, int, char *);
+ extern struct type *arch_character_type (struct gdbarch *, int, int, char *);
+ extern struct type *arch_boolean_type (struct gdbarch *, int, int, char *);
+Index: gdb-7.5.0.20120926/gdb/gnu-v2-abi.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/gnu-v2-abi.c	2012-02-07 05:48:21.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/gnu-v2-abi.c	2012-11-07 22:09:29.870140742 +0100
+@@ -86,7 +86,7 @@ gnuv2_is_operator_name (const char *name
+    TYPE is the type in which F is located.  */
+ static struct value *
+ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
+-			struct type * type, int offset)
++			struct type *type, LONGEST offset)
+ {
+   struct value *arg1 = *arg1p;
+   struct type *type1 = check_typedef (value_type (arg1));
+@@ -187,7 +187,8 @@ gnuv2_virtual_fn_field (struct value **a
+ 
+ 
+ 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;
+@@ -342,9 +343,9 @@ vb_match (struct type *type, int index,
+    target).  The result is the offset of the baseclass value relative
+    to (the address of)(ARG) + OFFSET.  */
+ 
+-static int
++static LONGEST
+ 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 = TYPE_BASECLASS (type, index);
+@@ -362,8 +363,8 @@ gnuv2_baseclass_offset (struct type *typ
+ 	  if (vb_match (type, i, basetype))
+ 	    {
+ 	      struct type *field_type;
+-	      int field_offset;
+-	      int field_length;
++	      LONGEST field_offset;
++	      LONGEST field_length;
+ 	      CORE_ADDR addr;
+ 
+ 	      field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
+@@ -387,7 +388,7 @@ gnuv2_baseclass_offset (struct type *typ
+ 	  /* Don't go through baseclass_offset, as that wraps
+ 	     exceptions, thus, inner exceptions would be wrapped more
+ 	     than once.  */
+-	  int boffset =
++	  LONGEST boffset =
+ 	    gnuv2_baseclass_offset (type, i, valaddr,
+ 				    embedded_offset, address, val);
+ 
+Index: gdb-7.5.0.20120926/gdb/gnu-v3-abi.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/gnu-v3-abi.c	2012-05-21 21:47:53.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/gnu-v3-abi.c	2012-11-07 22:09:29.872140740 +0100
+@@ -105,7 +105,7 @@ build_gdb_vtable_type (struct gdbarch *a
+ {
+   struct type *t;
+   struct field *field_list, *field;
+-  int offset;
++  LONGEST offset;
+ 
+   struct type *void_ptr_type
+     = builtin_type (arch)->builtin_data_ptr;
+@@ -181,7 +181,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb
+ /* Return the offset from the start of the imaginary `struct
+    gdb_gnu_v3_abi_vtable' object to the vtable's "address point"
+    (i.e., where objects' virtual table pointers point).  */
+-static int
++static LONGEST
+ vtable_address_point_offset (struct gdbarch *gdbarch)
+ {
+   struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
+@@ -272,7 +272,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc
+ 
+ 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 = check_typedef (value_type (value));
+@@ -384,7 +384,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd
+ static struct value *
+ gnuv3_virtual_fn_field (struct value **value_p,
+                         struct fn_field *f, int j,
+-			struct type *vfn_base, int offset)
++			struct type *vfn_base, LONGEST offset)
+ {
+   struct type *values_type = check_typedef (value_type (*value_p));
+   struct gdbarch *gdbarch;
+@@ -414,16 +414,16 @@ gnuv3_virtual_fn_field (struct value **v
+ 
+    -1 is returned on error.  */
+ 
+-static int
++static LONGEST
+ 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;
+   struct type *ptr_type;
+   struct value *vtable;
+   struct value *vbase_array;
+-  long int cur_base_offset, base_offset;
++  LONGEST cur_base_offset, base_offset;
+ 
+   /* Determine architecture.  */
+   gdbarch = get_type_arch (type);
+@@ -447,7 +447,7 @@ gnuv3_baseclass_offset (struct type *typ
+   cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch);
+   if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0)
+     error (_("Misaligned vbase offset."));
+-  cur_base_offset = cur_base_offset / ((int) TYPE_LENGTH (ptr_type));
++  cur_base_offset = cur_base_offset / ((LONGEST) TYPE_LENGTH (ptr_type));
+ 
+   vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset);
+   gdb_assert (vtable != NULL);
+@@ -491,7 +491,7 @@ gnuv3_find_method_in (struct type *domai
+      we're out of luck.  */
+   for (i = 0; i < TYPE_N_BASECLASSES (domain); i++)
+     {
+-      int pos;
++      LONGEST pos;
+       struct type *basetype;
+ 
+       if (BASETYPE_VIA_VIRTUAL (domain, i))
+Index: gdb-7.5.0.20120926/gdb/go-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/go-lang.h	2012-04-25 16:07:20.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/go-lang.h	2012-11-07 22:09:29.874140737 +0100
+@@ -80,7 +80,7 @@ extern void go_print_type (struct type *
+ /* Defined in go-valprint.c.  */
+ 
+ extern void go_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);
+Index: gdb-7.5.0.20120926/gdb/go-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/go-valprint.c	2012-05-18 17:29:12.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/go-valprint.c	2012-11-07 22:09:29.874140737 +0100
+@@ -37,7 +37,7 @@
+ 
+ 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)
+@@ -86,9 +86,9 @@ print_go_string (struct type *type, cons
+ /* Implements the la_val_print routine for language Go.  */
+ 
+ void
+-go_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+-	      CORE_ADDR address, struct ui_file *stream, int recurse,
+-	      const struct value *val,
++go_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)
+ {
+   CHECK_TYPEDEF (type);
+Index: gdb-7.5.0.20120926/gdb/i386-nat.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/i386-nat.c	2012-01-24 14:49:56.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/i386-nat.c	2012-11-07 22:09:29.876140733 +0100
+@@ -293,7 +293,7 @@ static int i386_remove_aligned_watchpoin
+    valid value, bombs through internal_error.  */
+ static int i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state,
+ 					      i386_wp_op_t what,
+-					      CORE_ADDR addr, int len,
++					      CORE_ADDR addr, LONGEST len,
+ 					      enum target_hw_bp_type type);
+ 
+ /* Implementation.  */
+@@ -505,8 +505,8 @@ i386_remove_aligned_watchpoint (struct i
+ 
+ static int
+ i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state,
+-				   i386_wp_op_t what, CORE_ADDR addr, int len,
+-				   enum target_hw_bp_type type)
++				   i386_wp_op_t what, CORE_ADDR addr,
++				   LONGEST len, enum target_hw_bp_type type)
+ {
+   int retval = 0;
+   int max_wp_len = TARGET_HAS_DR_LEN_8 ? 8 : 4;
+@@ -663,7 +663,7 @@ i386_remove_watchpoint (CORE_ADDR addr,
+    address ADDR and whose length is LEN bytes.  */
+ 
+ static int
+-i386_region_ok_for_watchpoint (CORE_ADDR addr, int len)
++i386_region_ok_for_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   struct i386_debug_reg_state *state = i386_debug_reg_state ();
+   int nregs;
+Index: gdb-7.5.0.20120926/gdb/inf-ttrace.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/inf-ttrace.c	2012-06-14 20:21:31.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/inf-ttrace.c	2012-11-07 22:09:29.877140732 +0100
+@@ -364,7 +364,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty
+ }
+ 
+ static int
+-inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   return 1;
+ }
+Index: gdb-7.5.0.20120926/gdb/jv-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/jv-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/jv-lang.c	2012-11-07 22:09:29.894140708 +0100
+@@ -440,7 +440,7 @@ java_link_class_type (struct gdbarch *gd
+   for (i = TYPE_N_BASECLASSES (type); i < nfields; i++)
+     {
+       int accflags;
+-      int boffset;
++      LONGEST boffset;
+ 
+       if (fields == NULL)
+ 	{
+@@ -890,7 +890,7 @@ java_printchar (int c, struct type *type
+ static void
+ java_printstr (struct ui_file *stream, struct type *type,
+ 	       const gdb_byte *string,
+-	       unsigned int length, const char *encoding, int force_ellipses,
++	       ULONGEST length, const char *encoding, int force_ellipses,
+ 	       const struct value_print_options *options)
+ {
+   const char *type_encoding = java_get_encoding (type);
+Index: gdb-7.5.0.20120926/gdb/jv-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/jv-lang.h	2012-03-01 20:26:13.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/jv-lang.h	2012-11-07 22:09:29.902140696 +0100
+@@ -42,8 +42,8 @@ struct builtin_java_type
+ 
+ extern const struct builtin_java_type *builtin_java_type (struct gdbarch *);
+ 
+-extern void java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+-			    struct ui_file *, int,
++extern void java_val_print (struct type *, const gdb_byte *, LONGEST,
++			    CORE_ADDR, struct ui_file *, int,
+ 			    const struct value *,
+ 			    const struct value_print_options *);
+ 
+Index: gdb-7.5.0.20120926/gdb/jv-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/jv-valprint.c	2012-05-18 17:29:12.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/jv-valprint.c	2012-11-07 22:09:29.903140694 +0100
+@@ -266,7 +266,7 @@ java_value_print (struct value *val, str
+ 
+ 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,
+@@ -484,7 +484,7 @@ java_print_value_fields (struct type *ty
+ 
+ void
+ java_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)
+Index: gdb-7.5.0.20120926/gdb/language.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/language.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/language.c	2012-11-07 22:09:29.905140691 +0100
+@@ -724,7 +724,7 @@ unk_lang_printchar (int c, struct type *
+ 
+ static void
+ unk_lang_printstr (struct ui_file *stream, struct type *type,
+-		   const gdb_byte *string, unsigned int length,
++		   const gdb_byte *string, ULONGEST length,
+ 		   const char *encoding, int force_ellipses,
+ 		   const struct value_print_options *options)
+ {
+@@ -742,7 +742,7 @@ unk_lang_print_type (struct type *type,
+ 
+ static void
+ unk_lang_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)
+Index: gdb-7.5.0.20120926/gdb/language.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/language.h	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/language.h	2012-11-07 22:09:29.906140690 +0100
+@@ -175,7 +175,7 @@ struct language_defn
+ 			  struct ui_file * stream);
+ 
+     void (*la_printstr) (struct ui_file * stream, struct type *elttype,
+-			 const gdb_byte *string, unsigned int length,
++			 const gdb_byte *string, ULONGEST length,
+ 			 const char *encoding, int force_ellipses,
+ 			 const struct value_print_options *);
+ 
+@@ -217,7 +217,7 @@ struct language_defn
+ 
+     void (*la_val_print) (struct type *type,
+ 			  const gdb_byte *contents,
+-			  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);
+Index: gdb-7.5.0.20120926/gdb/m2-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m2-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/m2-lang.c	2012-11-07 22:09:29.908140688 +0100
+@@ -104,10 +104,10 @@ m2_printchar (int c, struct type *type,
+ 
+ static void
+ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
+-	     unsigned int length, const char *encoding, int force_ellipses,
++	     ULONGEST length, const char *encoding, int force_ellipses,
+ 	     const struct value_print_options *options)
+ {
+-  unsigned int i;
++  ULONGEST i;
+   unsigned int things_printed = 0;
+   int in_quotes = 0;
+   int need_comma = 0;
+@@ -122,9 +122,9 @@ m2_printstr (struct ui_file *stream, str
+     {
+       /* Position of the character we are examining
+          to see whether it is repeated.  */
+-      unsigned int rep1;
++      ULONGEST rep1;
+       /* Number of repetitions we have detected so far.  */
+-      unsigned int reps;
++      ULONGEST reps;
+ 
+       QUIT;
+ 
+@@ -153,7 +153,7 @@ m2_printstr (struct ui_file *stream, str
+ 	      in_quotes = 0;
+ 	    }
+ 	  m2_printchar (string[i], type, stream);
+-	  fprintf_filtered (stream, " <repeats %u times>", reps);
++	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
+ 	  i = rep1 - 1;
+ 	  things_printed += options->repeat_count_threshold;
+ 	  need_comma = 1;
+Index: gdb-7.5.0.20120926/gdb/m2-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m2-lang.h	2012-03-01 20:26:13.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/m2-lang.h	2012-11-07 22:09:29.909140686 +0100
+@@ -32,7 +32,7 @@ extern void m2_print_typedef (struct typ
+ extern int m2_is_long_set (struct type *type);
+ extern int m2_is_unbounded_array (struct type *type);
+ 
+-extern void m2_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
++extern void m2_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
+ 			  struct ui_file *, int,
+ 			  const struct value *,
+ 			  const struct value_print_options *);
+Index: gdb-7.5.0.20120926/gdb/m2-typeprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m2-typeprint.c	2012-11-07 22:02:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/m2-typeprint.c	2012-11-07 22:09:29.910140684 +0100
+@@ -228,9 +228,12 @@ static void m2_array (struct type *type,
+ 	  m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1);
+ 	}
+       else
+-	fprintf_filtered (stream, "%d",
+-			  (TYPE_LENGTH (type)
+-			   / TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
++        {
++	  ULONGEST val = (TYPE_LENGTH (type)
++			  / TYPE_LENGTH (TYPE_TARGET_TYPE (type)));
++
++	  fprintf_filtered (stream, "%s", pulongest (val));
++	}
+     }
+   fprintf_filtered (stream, "] OF ");
+   m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
+Index: gdb-7.5.0.20120926/gdb/m2-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m2-valprint.c	2012-11-07 22:02:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/m2-valprint.c	2012-11-07 22:09:29.911140682 +0100
+@@ -36,7 +36,7 @@ static int print_unpacked_pointer (struc
+ 				   struct ui_file *stream);
+ static void
+ m2_print_array_contents (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,
+@@ -68,7 +68,7 @@ get_long_set_bounds (struct type *type,
+ 
+ static void
+ m2_print_long_set (struct type *type, const gdb_byte *valaddr,
+-		   int embedded_offset, CORE_ADDR address,
++		   LONGEST embedded_offset, CORE_ADDR address,
+ 		   struct ui_file *stream)
+ {
+   int empty_set        = 1;
+@@ -159,7 +159,7 @@ m2_print_long_set (struct type *type, co
+ 
+ static void
+ m2_print_unbounded_array (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_print_options *options)
+ {
+@@ -263,7 +263,7 @@ print_variable_at_address (struct type *
+ 
+ static void
+ m2_print_array_contents (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,
+@@ -309,14 +309,15 @@ static const struct generic_val_print_de
+    function; they are identical.  */
+ 
+ void
+-m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
+-	      CORE_ADDR address, struct ui_file *stream, int recurse,
++m2_val_print (struct type *type, const gdb_byte *valaddr,
++	      LONGEST embedded_offset, CORE_ADDR address,
++	      struct ui_file *stream, int recurse,
+ 	      const struct value *original_value,
+ 	      const struct value_print_options *options)
+ {
+   struct gdbarch *gdbarch = get_type_arch (type);
+-  unsigned int i = 0;	/* Number of characters printed.  */
+-  unsigned len;
++  ULONGEST i = 0;	/* Number of characters printed.  */
++  ULONGEST len;
+   struct type *elttype;
+   CORE_ADDR addr;
+ 
+@@ -341,7 +342,7 @@ m2_val_print (struct type *type, const g
+ 	         elements up to it.  */
+ 	      if (options->stop_print_at_null)
+ 		{
+-		  unsigned int temp_len;
++		  ULONGEST temp_len;
+ 
+ 		  /* Look for a NULL char.  */
+ 		  for (temp_len = 0;
+Index: gdb-7.5.0.20120926/gdb/memrange.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/memrange.c	2012-01-04 09:17:06.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/memrange.c	2012-11-07 22:09:29.916140676 +0100
+@@ -21,8 +21,8 @@
+ #include "memrange.h"
+ 
+ int
+-mem_ranges_overlap (CORE_ADDR start1, int len1,
+-		    CORE_ADDR start2, int len2)
++mem_ranges_overlap (CORE_ADDR start1, LONGEST len1,
++		    CORE_ADDR start2, LONGEST len2)
+ {
+   ULONGEST h, l;
+ 
+Index: gdb-7.5.0.20120926/gdb/memrange.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/memrange.h	2012-01-04 09:17:06.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/memrange.h	2012-11-07 22:09:29.917140674 +0100
+@@ -30,7 +30,7 @@ struct mem_range
+   CORE_ADDR start;
+ 
+   /* Length of the range.  */
+-  int length;
++  LONGEST length;
+ };
+ 
+ typedef struct mem_range mem_range_s;
+@@ -40,8 +40,8 @@ DEF_VEC_O(mem_range_s);
+ /* Returns true if the ranges defined by [start1, start1+len1) and
+    [start2, start2+len2) overlap.  */
+ 
+-extern int mem_ranges_overlap (CORE_ADDR start1, int len1,
+-			       CORE_ADDR start2, int len2);
++extern int mem_ranges_overlap (CORE_ADDR start1, LONGEST len1,
++			       CORE_ADDR start2, LONGEST len2);
+ 
+ /* Sort ranges by start address, then coalesce contiguous or
+    overlapping ranges.  */
+Index: gdb-7.5.0.20120926/gdb/mips-linux-nat.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/mips-linux-nat.c	2012-05-22 20:12:13.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/mips-linux-nat.c	2012-11-07 22:09:29.918140672 +0100
+@@ -938,7 +938,7 @@ try_one_watch (struct pt_watch_regs *reg
+    the specified region can be covered by the watch registers.  */
+ 
+ static int
+-mips_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++mips_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   struct pt_watch_regs dummy_regs;
+   int i;
+Index: gdb-7.5.0.20120926/gdb/objc-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/objc-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/objc-lang.c	2012-11-07 22:09:29.920140670 +0100
+@@ -347,11 +347,11 @@ objc_printchar (int c, struct type *type
+ 
+ static void
+ objc_printstr (struct ui_file *stream, struct type *type,
+-	       const gdb_byte *string, unsigned int length,
++	       const gdb_byte *string, ULONGEST length,
+ 	       const char *encoding, int force_ellipses,
+ 	       const struct value_print_options *options)
+ {
+-  unsigned int i;
++  ULONGEST i;
+   unsigned int things_printed = 0;
+   int in_quotes = 0;
+   int need_comma = 0;
+@@ -372,9 +372,9 @@ objc_printstr (struct ui_file *stream, s
+     {
+       /* Position of the character we are examining to see whether it
+ 	 is repeated.  */
+-      unsigned int rep1;
++      ULONGEST rep1;
+       /* Number of repetitions we have detected so far.  */
+-      unsigned int reps;
++      ULONGEST reps;
+ 
+       QUIT;
+ 
+@@ -403,7 +403,7 @@ objc_printstr (struct ui_file *stream, s
+ 	      in_quotes = 0;
+ 	    }
+ 	  objc_printchar (string[i], type, stream);
+-	  fprintf_filtered (stream, " <repeats %u times>", reps);
++	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
+ 	  i = rep1 - 1;
+ 	  things_printed += options->repeat_count_threshold;
+ 	  need_comma = 1;
+Index: gdb-7.5.0.20120926/gdb/opencl-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/opencl-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/opencl-lang.c	2012-11-07 22:09:29.921140669 +0100
+@@ -80,11 +80,11 @@ builtin_opencl_type (struct gdbarch *gdb
+ 
+ static struct type *
+ lookup_opencl_vector_type (struct gdbarch *gdbarch, enum type_code code,
+-			   unsigned int el_length, unsigned int flag_unsigned,
++			   ULONGEST el_length, unsigned int flag_unsigned,
+ 			   int n)
+ {
+   int i;
+-  unsigned int length;
++  ULONGEST length;
+   struct type *type = NULL;
+   struct type **types = builtin_opencl_type (gdbarch);
+ 
+@@ -174,9 +174,9 @@ lval_func_read (struct value *v)
+   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
+   struct type *type = check_typedef (value_type (v));
+   struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val)));
+-  int offset = value_offset (v);
+-  int elsize = TYPE_LENGTH (eltype);
+-  int n, i, j = 0;
++  LONGEST offset = value_offset (v);
++  LONGEST elsize = TYPE_LENGTH (eltype);
++  LONGEST n, i, j = 0;
+   LONGEST lowb = 0;
+   LONGEST highb = 0;
+ 
+@@ -203,9 +203,9 @@ lval_func_write (struct value *v, struct
+   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
+   struct type *type = check_typedef (value_type (v));
+   struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val)));
+-  int offset = value_offset (v);
+-  int elsize = TYPE_LENGTH (eltype);
+-  int n, i, j = 0;
++  LONGEST offset = value_offset (v);
++  LONGEST elsize = TYPE_LENGTH (eltype);
++  LONGEST n, i, j = 0;
+   LONGEST lowb = 0;
+   LONGEST highb = 0;
+ 
+@@ -243,17 +243,18 @@ lval_func_write (struct value *v, struct
+ /* Return nonzero if all bits in V within OFFSET and LENGTH are valid.  */
+ 
+ static int
+-lval_func_check_validity (const struct value *v, int offset, int length)
++lval_func_check_validity (const struct value *v, LONGEST offset,
++			  LONGEST length)
+ {
+   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
++  struct type *t = check_typedef (value_type (c->val));
+   /* Size of the target type in bits.  */
+-  int elsize =
+-      TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
+-  int startrest = offset % elsize;
+-  int start = offset / elsize;
+-  int endrest = (offset + length) % elsize;
+-  int end = (offset + length) / elsize;
+-  int i;
++  LONGEST elsize = TYPE_LENGTH (TYPE_TARGET_TYPE (t)) * 8;
++  LONGEST startrest = offset % elsize;
++  LONGEST start = offset / elsize;
++  LONGEST endrest = (offset + length) % elsize;
++  LONGEST end = (offset + length) / elsize;
++  LONGEST i;
+ 
+   if (endrest)
+     end++;
+@@ -263,8 +264,8 @@ lval_func_check_validity (const struct v
+ 
+   for (i = start; i < end; i++)
+     {
+-      int comp_offset = (i == start) ? startrest : 0;
+-      int comp_length = (i == end) ? endrest : elsize;
++      LONGEST comp_offset = (i == start) ? startrest : 0;
++      LONGEST comp_length = (i == end) ? endrest : elsize;
+ 
+       if (!value_bits_valid (c->val, c->indices[i] * elsize + comp_offset,
+ 			     comp_length))
+@@ -281,8 +282,8 @@ lval_func_check_any_valid (const struct
+ {
+   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
+   /* Size of the target type in bits.  */
+-  int elsize =
+-      TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
++  LONGEST elsize =
++	   TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
+   int i;
+ 
+   for (i = 0; i < c->n; i++)
+@@ -297,17 +298,17 @@ lval_func_check_any_valid (const struct
+ 
+ static int
+ lval_func_check_synthetic_pointer (const struct value *v,
+-				   int offset, int length)
++				   LONGEST offset, LONGEST length)
+ {
+   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
+   /* Size of the target type in bits.  */
+-  int elsize =
+-      TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
+-  int startrest = offset % elsize;
+-  int start = offset / elsize;
+-  int endrest = (offset + length) % elsize;
+-  int end = (offset + length) / elsize;
+-  int i;
++  LONGEST elsize =
++	   TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
++  LONGEST startrest = offset % elsize;
++  LONGEST start = offset / elsize;
++  LONGEST endrest = (offset + length) % elsize;
++  LONGEST end = (offset + length) / elsize;
++  LONGEST i;
+ 
+   if (endrest)
+     end++;
+@@ -317,8 +318,8 @@ lval_func_check_synthetic_pointer (const
+ 
+   for (i = start; i < end; i++)
+     {
+-      int comp_offset = (i == start) ? startrest : 0;
+-      int comp_length = (i == end) ? endrest : elsize;
++      LONGEST comp_offset = (i == start) ? startrest : 0;
++      LONGEST comp_length = (i == end) ? endrest : elsize;
+ 
+       if (!value_bits_synthetic_pointer (c->val,
+ 					 c->indices[i] * elsize + comp_offset,
+Index: gdb-7.5.0.20120926/gdb/p-lang.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/p-lang.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/p-lang.c	2012-11-07 22:09:29.922140667 +0100
+@@ -96,8 +96,8 @@ pascal_main_name (void)
+    are not multiple of TARGET_CHAR_BIT then the results are wrong
+    but this does not happen for Free Pascal nor for GPC.  */
+ int
+-is_pascal_string_type (struct type *type,int *length_pos,
+-                       int *length_size, int *string_pos,
++is_pascal_string_type (struct type *type, LONGEST *length_pos,
++		       LONGEST *length_size, LONGEST *string_pos,
+ 		       struct type **char_type,
+ 		       const char **arrayname)
+ {
+@@ -217,12 +217,12 @@ pascal_printchar (int c, struct type *ty
+ 
+ void
+ pascal_printstr (struct ui_file *stream, struct type *type,
+-		 const gdb_byte *string, unsigned int length,
++		 const gdb_byte *string, ULONGEST length,
+ 		 const char *encoding, int force_ellipses,
+ 		 const struct value_print_options *options)
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
+-  unsigned int i;
++  ULONGEST i;
+   unsigned int things_printed = 0;
+   int in_quotes = 0;
+   int need_comma = 0;
+@@ -250,9 +250,9 @@ pascal_printstr (struct ui_file *stream,
+     {
+       /* Position of the character we are examining
+          to see whether it is repeated.  */
+-      unsigned int rep1;
++      ULONGEST rep1;
+       /* Number of repetitions we have detected so far.  */
+-      unsigned int reps;
++      ULONGEST reps;
+       unsigned long int current_char;
+ 
+       QUIT;
+@@ -287,7 +287,7 @@ pascal_printstr (struct ui_file *stream,
+ 	      in_quotes = 0;
+ 	    }
+ 	  pascal_printchar (current_char, type, stream);
+-	  fprintf_filtered (stream, " <repeats %u times>", reps);
++	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
+ 	  i = rep1 - 1;
+ 	  things_printed += options->repeat_count_threshold;
+ 	  need_comma = 1;
+Index: gdb-7.5.0.20120926/gdb/p-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/p-lang.h	2012-03-01 20:26:13.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/p-lang.h	2012-11-07 22:09:29.923140665 +0100
+@@ -35,7 +35,7 @@ extern void pascal_print_type (struct ty
+ extern void pascal_print_typedef (struct type *, struct symbol *,
+ 				  struct ui_file *);
+ 
+-extern void pascal_val_print (struct type *, const gdb_byte *, int,
++extern void pascal_val_print (struct type *, const gdb_byte *, LONGEST,
+ 			      CORE_ADDR, struct ui_file *, int,
+ 			      const struct value *,
+ 			      const struct value_print_options *);
+@@ -49,13 +49,13 @@ extern void pascal_type_print_method_arg
+ /* These are in p-lang.c: */
+ 
+ extern int
+-  is_pascal_string_type (struct type *, int *, int *, int *,
++  is_pascal_string_type (struct type *, LONGEST *, LONGEST *, LONGEST *,
+ 			 struct type **, const char **);
+ 
+ extern void pascal_printchar (int, struct type *, struct ui_file *);
+ 
+ extern void pascal_printstr (struct ui_file *, struct type *, const gdb_byte *,
+-			     unsigned int, const char *, int,
++			     ULONGEST, const char *, int,
+ 			     const struct value_print_options *);
+ 
+ extern struct type **const (pascal_builtin_types[]);
+@@ -69,7 +69,7 @@ extern void
+   pascal_type_print_varspec_prefix (struct type *, struct ui_file *, int, int);
+ 
+ extern void pascal_object_print_value_fields (struct type *, const gdb_byte *,
+-					      int,
++					      LONGEST,
+ 					      CORE_ADDR, struct ui_file *,
+ 					      int,
+ 					      const struct value *,
+Index: gdb-7.5.0.20120926/gdb/p-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/p-valprint.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/p-valprint.c	2012-11-07 22:09:29.930140655 +0100
+@@ -59,7 +59,7 @@ static const struct generic_val_print_de
+ 
+ void
+ pascal_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 *original_value,
+ 		  const struct value_print_options *options)
+@@ -70,8 +70,8 @@ pascal_val_print (struct type *type, con
+   unsigned len;
+   LONGEST low_bound, high_bound;
+   struct type *elttype;
+-  unsigned eltlen;
+-  int length_pos, length_size, string_pos;
++  ULONGEST eltlen;
++  LONGEST length_pos, length_size, string_pos;
+   struct type *char_type;
+   CORE_ADDR addr;
+   int want_space = 0;
+@@ -504,7 +504,7 @@ static void pascal_object_print_static_f
+ 					      const struct value_print_options *);
+ 
+ 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 *,
+@@ -563,7 +563,7 @@ pascal_object_is_vtbl_member (struct typ
+ 
+ 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,
+@@ -758,7 +758,7 @@ pascal_object_print_value_fields (struct
+ 
+ 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,
+@@ -781,11 +781,11 @@ pascal_object_print_value (struct type *
+ 
+   for (i = 0; i < n_baseclasses; i++)
+     {
+-      int boffset = 0;
++      LONGEST boffset = 0;
+       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
+       const char *basename = type_name_no_tag (baseclass);
+       const gdb_byte *base_valaddr = NULL;
+-      int thisoffset;
++      LONGEST thisoffset;
+       volatile struct gdb_exception ex;
+       int skip = 0;
+ 
+Index: gdb-7.5.0.20120926/gdb/ppc-linux-nat.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ppc-linux-nat.c	2012-07-06 18:49:43.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ppc-linux-nat.c	2012-11-07 22:09:29.933140651 +0100
+@@ -1493,7 +1493,7 @@ ppc_linux_can_use_hw_breakpoint (int typ
+ }
+ 
+ static int
+-ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   /* Handle sub-8-byte quantities.  */
+   if (len <= 0)
+Index: gdb-7.5.0.20120926/gdb/printcmd.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/printcmd.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/printcmd.c	2012-11-07 22:09:29.940140641 +0100
+@@ -291,7 +291,7 @@ print_formatted (struct value *val, int
+ 		 struct ui_file *stream)
+ {
+   struct type *type = check_typedef (value_type (val));
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+ 
+   if (VALUE_LVAL (val) == lval_memory)
+     next_address = value_address (val) + len;
+@@ -369,7 +369,7 @@ print_scalar_formatted (const void *vala
+ {
+   struct gdbarch *gdbarch = get_type_arch (type);
+   LONGEST val_long = 0;
+-  unsigned int len = TYPE_LENGTH (type);
++  ULONGEST len = TYPE_LENGTH (type);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+ 
+   /* String printing should go through val_print_scalar_formatted.  */
+Index: gdb-7.5.0.20120926/gdb/procfs.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/procfs.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/procfs.c	2012-11-07 22:09:29.945140633 +0100
+@@ -4966,7 +4966,7 @@ procfs_remove_watchpoint (CORE_ADDR addr
+ }
+ 
+ static int
+-procfs_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++procfs_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   /* The man page for proc(4) on Solaris 2.6 and up says that the
+      system can support "thousands" of hardware watchpoints, but gives
+Index: gdb-7.5.0.20120926/gdb/python/py-prettyprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/python/py-prettyprint.c	2012-01-04 09:17:25.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/python/py-prettyprint.c	2012-11-07 22:09:29.969140598 +0100
+@@ -676,7 +676,7 @@ print_children (PyObject *printer, const
+ 
+ int
+ apply_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,
+@@ -824,7 +824,7 @@ gdbpy_default_visualizer (PyObject *self
+ 
+ int
+ apply_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,
+Index: gdb-7.5.0.20120926/gdb/python/python.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/python/python.h	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/python/python.h	2012-11-07 22:10:46.010030115 +0100
+@@ -37,7 +37,7 @@ void source_python_script (FILE *file, c
+ void run_python_script (int argc, char **argv);
+ 
+ int apply_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,
+Index: gdb-7.5.0.20120926/gdb/regcache.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/regcache.c	2012-01-04 09:17:09.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/regcache.c	2012-11-07 22:09:29.988140571 +0100
+@@ -902,7 +902,7 @@ typedef void (regcache_write_ftype) (str
+ 
+ static enum register_status
+ regcache_xfer_part (struct regcache *regcache, int regnum,
+-		    int offset, int len, void *in, const void *out,
++		    LONGEST offset, LONGEST len, void *in, const void *out,
+ 		    enum register_status (*read) (struct regcache *regcache,
+ 						  int regnum,
+ 						  gdb_byte *buf),
+@@ -946,7 +946,7 @@ regcache_xfer_part (struct regcache *reg
+ 
+ enum register_status
+ regcache_raw_read_part (struct regcache *regcache, int regnum,
+-			int offset, int len, gdb_byte *buf)
++			int offset, LONGEST len, gdb_byte *buf)
+ {
+   struct regcache_descr *descr = regcache->descr;
+ 
+@@ -957,7 +957,7 @@ regcache_raw_read_part (struct regcache
+ 
+ void
+ regcache_raw_write_part (struct regcache *regcache, int regnum,
+-			 int offset, int len, const gdb_byte *buf)
++			 int offset, LONGEST len, const gdb_byte *buf)
+ {
+   struct regcache_descr *descr = regcache->descr;
+ 
+@@ -968,7 +968,7 @@ regcache_raw_write_part (struct regcache
+ 
+ enum register_status
+ regcache_cooked_read_part (struct regcache *regcache, int regnum,
+-			   int offset, int len, gdb_byte *buf)
++			   LONGEST offset, LONGEST len, gdb_byte *buf)
+ {
+   struct regcache_descr *descr = regcache->descr;
+ 
+@@ -979,7 +979,7 @@ regcache_cooked_read_part (struct regcac
+ 
+ void
+ regcache_cooked_write_part (struct regcache *regcache, int regnum,
+-			    int offset, int len, const gdb_byte *buf)
++			    LONGEST offset, LONGEST len, const gdb_byte *buf)
+ {
+   struct regcache_descr *descr = regcache->descr;
+ 
+Index: gdb-7.5.0.20120926/gdb/regcache.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/regcache.h	2012-01-04 09:17:10.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/regcache.h	2012-11-07 22:09:29.990140568 +0100
+@@ -90,9 +90,9 @@ extern void regcache_raw_write_unsigned
+ 
+ extern enum register_status
+   regcache_raw_read_part (struct regcache *regcache, int regnum,
+-			  int offset, int len, gdb_byte *buf);
++			  int offset, LONGEST len, gdb_byte *buf);
+ void regcache_raw_write_part (struct regcache *regcache, int regnum,
+-			      int offset, int len, const gdb_byte *buf);
++			      int offset, LONGEST len, const gdb_byte *buf);
+ 
+ void regcache_invalidate (struct regcache *regcache, int regnum);
+ 
+@@ -129,10 +129,11 @@ extern void regcache_cooked_write_unsign
+    write style operations.  */
+ 
+ enum register_status regcache_cooked_read_part (struct regcache *regcache,
+-						int regnum, int offset,
+-						int len, gdb_byte *buf);
++						int regnum, LONGEST offset,
++						LONGEST len, gdb_byte *buf);
+ void regcache_cooked_write_part (struct regcache *regcache, int regnum,
+-				 int offset, int len, const gdb_byte *buf);
++				 LONGEST offset, LONGEST len,
++				 const gdb_byte *buf);
+ 
+ /* Special routines to read/write the PC.  */
+ 
+Index: gdb-7.5.0.20120926/gdb/remote.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/remote.c	2012-11-07 22:00:42.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/remote.c	2012-11-07 22:09:29.994140562 +0100
+@@ -8119,7 +8119,7 @@ int remote_hw_watchpoint_length_limit =
+ int remote_hw_breakpoint_limit = -1;
+ 
+ static int
+-remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   if (remote_hw_watchpoint_length_limit == 0)
+     return 0;
+Index: gdb-7.5.0.20120926/gdb/s390-nat.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/s390-nat.c	2012-03-05 20:05:09.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/s390-nat.c	2012-11-07 22:09:30.016140531 +0100
+@@ -572,7 +572,7 @@ s390_can_use_hw_breakpoint (int type, in
+ }
+ 
+ static int
+-s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
++s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST cnt)
+ {
+   return 1;
+ }
+Index: gdb-7.5.0.20120926/gdb/spu-multiarch.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/spu-multiarch.c	2012-05-18 23:02:50.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/spu-multiarch.c	2012-11-07 22:09:30.021140523 +0100
+@@ -118,7 +118,7 @@ spu_thread_architecture (struct target_o
+ 
+ /* Override the to_region_ok_for_hw_watchpoint routine.  */
+ static int
+-spu_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++spu_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   struct target_ops *ops_beneath = find_target_beneath (&spu_ops);
+   while (ops_beneath && !ops_beneath->to_region_ok_for_hw_watchpoint)
+Index: gdb-7.5.0.20120926/gdb/stack.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/stack.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/stack.c	2012-11-07 22:09:30.024140518 +0100
+@@ -173,7 +173,7 @@ print_stack_frame (struct frame_info *fr
+    argument (not just the first nameless argument).  */
+ 
+ static void
+-print_frame_nameless_args (struct frame_info *frame, long start, int num,
++print_frame_nameless_args (struct frame_info *frame, LONGEST start, int num,
+ 			   int first, struct ui_file *stream)
+ {
+   struct gdbarch *gdbarch = get_frame_arch (frame);
+@@ -497,7 +497,7 @@ print_frame_args (struct symbol *func, s
+   /* Offset of next stack argument beyond the one we have seen that is
+      at the highest offset, or -1 if we haven't come to a stack
+      argument yet.  */
+-  long highest_offset = -1;
++  LONGEST highest_offset = -1;
+   /* Number of ints of arguments that we have printed so far.  */
+   int args_printed = 0;
+   struct cleanup *old_chain;
+@@ -537,8 +537,8 @@ print_frame_args (struct symbol *func, s
+ 	    case LOC_ARG:
+ 	    case LOC_REF_ARG:
+ 	      {
+-		long current_offset = SYMBOL_VALUE (sym);
+-		int arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
++		LONGEST current_offset = SYMBOL_VALUE (sym);
++		LONGEST arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
+ 
+ 		/* Compute address of next argument by adding the size of
+ 		   this argument and rounding to an int boundary.  */
+@@ -673,7 +673,7 @@ print_frame_args (struct symbol *func, s
+      enough about the stack to find them.  */
+   if (num != -1)
+     {
+-      long start;
++      LONGEST start;
+ 
+       if (highest_offset == -1)
+ 	start = gdbarch_frame_args_skip (get_frame_arch (frame));
+Index: gdb-7.5.0.20120926/gdb/symmisc.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/symmisc.c	2012-11-07 22:00:42.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/symmisc.c	2012-11-07 22:09:30.026140516 +0100
+@@ -517,11 +517,11 @@ print_symbol (void *args)
+ 
+ 	case LOC_CONST_BYTES:
+ 	  {
+-	    unsigned i;
++	    ULONGEST i;
+ 	    struct type *type = check_typedef (SYMBOL_TYPE (symbol));
+ 
+-	    fprintf_filtered (outfile, "const %u hex bytes:",
+-			      TYPE_LENGTH (type));
++	    fprintf_filtered (outfile, "const %s hex bytes:",
++			      pulongest (TYPE_LENGTH (type)));
+ 	    for (i = 0; i < TYPE_LENGTH (type); i++)
+ 	      fprintf_filtered (outfile, " %02x",
+ 				(unsigned) SYMBOL_VALUE_BYTES (symbol)[i]);
+Index: gdb-7.5.0.20120926/gdb/target.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/target.c	2012-07-02 17:29:35.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/target.c	2012-11-07 22:09:30.029140511 +0100
+@@ -51,7 +51,7 @@ static void default_terminal_info (char
+ static int default_watchpoint_addr_within_range (struct target_ops *,
+ 						 CORE_ADDR, CORE_ADDR, int);
+ 
+-static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
++static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
+ 
+ static void tcomplain (void) ATTRIBUTE_NORETURN;
+ 
+@@ -127,7 +127,7 @@ static int debug_to_stopped_data_address
+ static int debug_to_watchpoint_addr_within_range (struct target_ops *,
+ 						  CORE_ADDR, CORE_ADDR, int);
+ 
+-static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, int);
++static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
+ 
+ static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int,
+ 						    struct expression *);
+@@ -3546,7 +3546,7 @@ target_fileio_read_stralloc (const char
+ 
+ 
+ static int
+-default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++default_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   return (len <= gdbarch_ptr_bit (target_gdbarch) / TARGET_CHAR_BIT);
+ }
+@@ -4197,7 +4197,7 @@ debug_to_can_use_hw_breakpoint (int type
+ }
+ 
+ static int
+-debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
++debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ {
+   CORE_ADDR retval;
+ 
+Index: gdb-7.5.0.20120926/gdb/target.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/target.h	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/target.h	2012-11-07 22:09:30.055140474 +0100
+@@ -478,7 +478,7 @@ struct target_ops
+ 
+     /* Documentation of this routine is provided with the corresponding
+        target_* macro.  */
+-    int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
++    int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, LONGEST);
+ 
+     int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
+ 					      struct expression *);
+Index: gdb-7.5.0.20120926/gdb/tracepoint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/tracepoint.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/tracepoint.c	2012-11-07 22:09:30.065140459 +0100
+@@ -934,13 +934,13 @@ add_register (struct collection_list *co
+ static void
+ add_memrange (struct collection_list *memranges, 
+ 	      int type, bfd_signed_vma base,
+-	      unsigned long len)
++	      ULONGEST len)
+ {
+   if (info_verbose)
+     {
+       printf_filtered ("(%d,", type);
+       printf_vma (base);
+-      printf_filtered (",%ld)\n", len);
++      printf_filtered (",%s)\n", pulongest (len));
+     }
+ 
+   /* type: memrange_absolute == memory, other n == basereg */
+@@ -969,7 +969,7 @@ collect_symbol (struct collection_list *
+ 		long frame_regno, long frame_offset,
+ 		CORE_ADDR scope)
+ {
+-  unsigned long len;
++  ULONGEST len;
+   unsigned int reg;
+   bfd_signed_vma offset;
+   int treat_as_expr = 0;
+@@ -993,8 +993,8 @@ collect_symbol (struct collection_list *
+ 	  char tmp[40];
+ 
+ 	  sprintf_vma (tmp, offset);
+-	  printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n",
+-			   SYMBOL_PRINT_NAME (sym), len,
++	  printf_filtered ("LOC_STATIC %s: collect %s bytes at %s.\n",
++			   SYMBOL_PRINT_NAME (sym), pulongest (len),
+ 			   tmp /* address */);
+ 	}
+       /* A struct may be a C++ class with static fields, go to general
+@@ -1026,8 +1026,8 @@ collect_symbol (struct collection_list *
+       offset = frame_offset + SYMBOL_VALUE (sym);
+       if (info_verbose)
+ 	{
+-	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
+-			   SYMBOL_PRINT_NAME (sym), len);
++	  printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset ",
++			   SYMBOL_PRINT_NAME (sym), pulongest (len));
+ 	  printf_vma (offset);
+ 	  printf_filtered (" from frame ptr reg %d\n", reg);
+ 	}
+@@ -1038,8 +1038,8 @@ collect_symbol (struct collection_list *
+       offset = 0;
+       if (info_verbose)
+ 	{
+-	  printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset ",
+-			   SYMBOL_PRINT_NAME (sym), len);
++	  printf_filtered ("LOC_REGPARM_ADDR %s: Collect %s bytes at offset ",
++			   SYMBOL_PRINT_NAME (sym), pulongest (len));
+ 	  printf_vma (offset);
+ 	  printf_filtered (" from reg %d\n", reg);
+ 	}
+@@ -1050,8 +1050,8 @@ collect_symbol (struct collection_list *
+       offset = frame_offset + SYMBOL_VALUE (sym);
+       if (info_verbose)
+ 	{
+-	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
+-			   SYMBOL_PRINT_NAME (sym), len);
++	  printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset ",
++			   SYMBOL_PRINT_NAME (sym), pulongest (len));
+ 	  printf_vma (offset);
+ 	  printf_filtered (" from frame ptr reg %d\n", reg);
+ 	}
+@@ -2617,7 +2617,8 @@ scope_info (char *args, int from_tty)
+   const char *symname;
+   char *save_args = args;
+   struct block_iterator iter;
+-  int j, count = 0;
++  int count = 0;
++  LONGEST j;
+   struct gdbarch *gdbarch;
+   int regno;
+ 
+@@ -2747,8 +2748,11 @@ scope_info (char *args, int from_tty)
+ 	      break;
+ 	    }
+ 	  if (SYMBOL_TYPE (sym))
+-	    printf_filtered (", length %d.\n",
+-			     TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
++	    {
++	      ULONGEST len = TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym)));
++
++	      printf_filtered (", length %s.\n", pulongest (len));
++	    }
+ 	}
+       if (BLOCK_FUNCTION (block))
+ 	break;
+Index: gdb-7.5.0.20120926/gdb/typeprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/typeprint.c	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/typeprint.c	2012-11-07 22:09:30.066140457 +0100
+@@ -123,7 +123,7 @@ whatis_exp (char *exp, int show)
+   struct type *real_type = NULL;
+   struct type *type;
+   int full = 0;
+-  int top = -1;
++  LONGEST top = -1;
+   int using_enc = 0;
+   struct value_print_options opts;
+ 
+Index: gdb-7.5.0.20120926/gdb/valarith.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valarith.c	2012-11-07 22:02:18.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valarith.c	2012-11-07 22:13:31.145867519 +0100
+@@ -192,15 +192,15 @@ value_subscript (struct value *array, LO
+    to doubles, but no longer does.  */
+ 
+ struct value *
+-value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
++value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound)
+ {
+   struct type *array_type = check_typedef (value_type (array));
+   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
+-  unsigned int elt_size = TYPE_LENGTH (elt_type);
+-  unsigned int elt_stride
++  ULONGEST elt_size = TYPE_LENGTH (elt_type);
++  ULONGEST elt_stride
+     = (TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)) == 0
+        ? elt_size : TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)));
+-  unsigned int elt_offs = elt_stride * longest_to_int (index - lowerbound);
++  ULONGEST elt_offs = elt_stride * longest_to_int (index - lowerbound);
+   struct value *v;
+ 
+   if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
+@@ -678,7 +678,7 @@ value_concat (struct value *arg1, struct
+   struct value *inval1;
+   struct value *inval2;
+   struct value *outval = NULL;
+-  int inval1len, inval2len;
++  ssize_t inval1len, inval2len;
+   int count, idx;
+   char *ptr;
+   char inchar;
+@@ -1489,7 +1489,7 @@ value_binop (struct value *arg1, struct
+ int
+ value_logical_not (struct value *arg1)
+ {
+-  int len;
++  LONGEST len;
+   const gdb_byte *p;
+   struct type *type1;
+ 
+@@ -1520,11 +1520,11 @@ value_logical_not (struct value *arg1)
+ static int
+ value_strcmp (struct value *arg1, struct value *arg2)
+ {
+-  int len1 = TYPE_LENGTH (value_type (arg1));
+-  int len2 = TYPE_LENGTH (value_type (arg2));
++  LONGEST len1 = TYPE_LENGTH (value_type (arg1));
++  LONGEST len2 = TYPE_LENGTH (value_type (arg2));
+   const gdb_byte *s1 = value_contents (arg1);
+   const gdb_byte *s2 = value_contents (arg2);
+-  int i, len = len1 < len2 ? len1 : len2;
++  LONGEST i, len = len1 < len2 ? len1 : len2;
+ 
+   for (i = 0; i < len; i++)
+     {
+Index: gdb-7.5.0.20120926/gdb/valops.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valops.c	2012-11-07 22:06:35.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valops.c	2012-11-07 22:09:30.074140445 +0100
+@@ -54,11 +54,11 @@ static int typecmp (int staticp, int var
+ 		    struct field t1[], struct value *t2[]);
+ 
+ static struct value *search_struct_field (const char *, struct value *, 
+-					  int, struct type *, int);
++					  LONGEST, struct type *, int);
+ 
+ static struct value *search_struct_method (const char *, struct value **,
+ 					   struct value **,
+-					   int, int *, struct type *);
++					   LONGEST, int *, struct type *);
+ 
+ static int find_oload_champ_namespace (struct value **, int,
+ 				       const char *, const char *,
+@@ -86,7 +86,7 @@ oload_classification classify_oload_matc
+ 					   int, int);
+ 
+ static struct value *value_struct_elt_for_reference (struct type *,
+-						     int, struct type *,
++						     LONGEST, struct type *,
+ 						     char *,
+ 						     struct type *,
+ 						     int, enum noside);
+@@ -103,8 +103,8 @@ static CORE_ADDR allocate_space_in_infer
+ static struct value *cast_into_complex (struct type *, struct value *);
+ 
+ static struct fn_field *find_method_list (struct value **, const char *,
+-					  int, struct type *, int *,
+-					  struct type **, int *);
++					  LONGEST, struct type *, int *,
++					  struct type **, LONGEST *);
+ 
+ void _initialize_valops (void);
+ 
+@@ -189,7 +189,7 @@ find_function_in_inferior (const char *n
+    space.  */
+ 
+ struct value *
+-value_allocate_space_in_inferior (int len)
++value_allocate_space_in_inferior (LONGEST len)
+ {
+   struct objfile *objf;
+   struct value *val = find_function_in_inferior ("malloc", &objf);
+@@ -262,7 +262,8 @@ value_cast_structs (struct type *type, s
+   if (TYPE_NAME (t2) != 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;
+ 
+       real_type = value_rtti_type (v2, &full, &top, &using_enc);
+@@ -401,12 +402,12 @@ value_cast (struct type *type, struct va
+   if (code1 == TYPE_CODE_ARRAY)
+     {
+       struct type *element_type = TYPE_TARGET_TYPE (type);
+-      unsigned element_length = TYPE_LENGTH (check_typedef (element_type));
++      ULONGEST element_length = TYPE_LENGTH (check_typedef (element_type));
+ 
+       if (element_length > 0 && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
+ 	{
+ 	  struct type *range_type = TYPE_INDEX_TYPE (type);
+-	  int val_length = TYPE_LENGTH (type2);
++	  LONGEST val_length = TYPE_LENGTH (type2);
+ 	  LONGEST low_bound, high_bound, new_length;
+ 
+ 	  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
+@@ -656,7 +657,7 @@ value_reinterpret_cast (struct type *typ
+ 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,
+@@ -668,8 +669,8 @@ dynamic_cast_check_1 (struct type *desir
+ 
+   for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i)
+     {
+-      int offset = baseclass_offset (search_type, i, valaddr, embedded_offset,
+-				     address, val);
++      LONGEST offset = baseclass_offset (search_type, i, valaddr,
++					 embedded_offset, address, val);
+ 
+       if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i)))
+ 	{
+@@ -703,7 +704,7 @@ dynamic_cast_check_1 (struct type *desir
+ 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,
+@@ -713,7 +714,7 @@ dynamic_cast_check_2 (struct type *desir
+ 
+   for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i)
+     {
+-      int offset;
++      LONGEST offset;
+ 
+       if (! BASETYPE_VIA_PUBLIC (search_type, i))
+ 	continue;
+@@ -744,7 +745,8 @@ dynamic_cast_check_2 (struct type *desir
+ 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 = check_typedef (type);
+   struct type *arg_type = check_typedef (value_type (arg));
+   struct type *class_type, *rtti_type;
+@@ -1197,7 +1199,7 @@ value_fetch_lazy (struct value *val)
+ }
+ 
+ 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)
+ {
+@@ -1332,7 +1334,7 @@ value_assign (struct value *toval, struc
+       {
+ 	const gdb_byte *dest_buffer;
+ 	CORE_ADDR changed_addr;
+-	int changed_len;
++	LONGEST changed_len;
+         gdb_byte buffer[sizeof (LONGEST)];
+ 
+ 	if (value_bitsize (toval))
+@@ -1411,7 +1413,7 @@ value_assign (struct value *toval, struc
+ 	    if (value_bitsize (toval))
+ 	      {
+ 		struct value *parent = value_parent (toval);
+-		int offset = value_offset (parent) + value_offset (toval);
++		LONGEST offset = value_offset (parent) + value_offset (toval);
+ 		int changed_len;
+ 		gdb_byte buffer[sizeof (LONGEST)];
+ 		int optim, unavail;
+@@ -1892,7 +1894,7 @@ value_array (int lowbound, int highbound
+ {
+   int nelem;
+   int idx;
+-  unsigned int typelength;
++  ULONGEST typelength;
+   struct value *val;
+   struct type *arraytype;
+ 
+@@ -2080,7 +2082,7 @@ typecmp (int staticp, int varargs, int n
+ 
+ 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 != NULL)
+@@ -2104,10 +2106,10 @@ update_search_result (struct value **res
+    lookup is ambiguous.  */
+ 
+ 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;
+@@ -2162,7 +2164,7 @@ do_search_struct_field (const char *name
+ 		   <variant field>.  */
+ 
+ 		struct value *v = NULL;
+-		int new_offset = offset;
++		LONGEST new_offset = offset;
+ 
+ 		/* This is pretty gross.  In G++, the offset in an
+ 		   anonymous union is relative to the beginning of the
+@@ -2201,7 +2203,7 @@ do_search_struct_field (const char *name
+ 			     && (strcmp_iw (name, 
+ 					    TYPE_BASECLASS_NAME (type, 
+ 								 i)) == 0));
+-      int boffset = value_embedded_offset (arg1) + offset;
++      LONGEST boffset = value_embedded_offset (arg1) + offset;
+ 
+       if (BASETYPE_VIA_VIRTUAL (type, i))
+ 	{
+@@ -2276,11 +2278,11 @@ do_search_struct_field (const char *name
+    fields, look for a baseclass named NAME.  */
+ 
+ static struct value *
+-search_struct_field (const char *name, struct value *arg1, int offset,
++search_struct_field (const char *name, struct value *arg1, LONGEST offset,
+ 		     struct type *type, int looking_for_baseclass)
+ {
+   struct value *result = NULL;
+-  int boffset = 0;
++  LONGEST boffset = 0;
+ 
+   do_search_struct_field (name, arg1, offset, type, looking_for_baseclass,
+ 			  &result, &boffset, type);
+@@ -2297,7 +2299,7 @@ search_struct_field (const char *name, s
+ 
+ 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;
+@@ -2361,9 +2363,9 @@ search_struct_method (const char *name,
+ 
+   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
+     {
+-      int base_offset;
++      LONGEST base_offset;
+       int skip = 0;
+-      int this_offset;
++      LONGEST this_offset;
+ 
+       if (BASETYPE_VIA_VIRTUAL (type, i))
+ 	{
+@@ -2545,8 +2547,8 @@ value_struct_elt (struct value **argp, s
+ 
+ static struct fn_field *
+ find_method_list (struct value **argp, const char *method,
+-		  int offset, struct type *type, int *num_fns,
+-		  struct type **basetype, int *boffset)
++		  LONGEST offset, struct type *type, int *num_fns,
++		  struct type **basetype, LONGEST *boffset)
+ {
+   int i;
+   struct fn_field *f;
+@@ -2579,7 +2581,7 @@ find_method_list (struct value **argp, c
+   /* Not found in object, check in base subobjects.  */
+   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
+     {
+-      int base_offset;
++      LONGEST base_offset;
+ 
+       if (BASETYPE_VIA_VIRTUAL (type, i))
+ 	{
+@@ -2615,7 +2617,7 @@ find_method_list (struct value **argp, c
+ static struct fn_field *
+ value_find_oload_method_list (struct value **argp, const char *method,
+ 			      int offset, int *num_fns, 
+-			      struct type **basetype, int *boffset)
++			      struct type **basetype, LONGEST *boffset)
+ {
+   struct type *t;
+ 
+@@ -2707,7 +2709,7 @@ find_overload_match (struct value **args
+   /* Number of overloaded instances being considered.  */
+   int num_fns = 0;
+   struct type *basetype = NULL;
+-  int boffset;
++  LONGEST boffset;
+ 
+   struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL);
+ 
+@@ -3413,7 +3415,7 @@ compare_parameters (struct type *t1, str
+    the form "DOMAIN::NAME".  */
+ 
+ static struct value *
+-value_struct_elt_for_reference (struct type *domain, int offset,
++value_struct_elt_for_reference (struct type *domain, LONGEST offset,
+ 				struct type *curtype, char *name,
+ 				struct type *intype, 
+ 				int want_address,
+@@ -3450,7 +3452,7 @@ value_struct_elt_for_reference (struct t
+ 	  if (want_address)
+ 	    return value_from_longest
+ 	      (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain),
+-	       offset + (LONGEST) (TYPE_FIELD_BITPOS (t, i) >> 3));
++	       offset + (TYPE_FIELD_BITPOS (t, i) >> 3));
+ 	  else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+ 	    return allocate_value (TYPE_FIELD_TYPE (t, i));
+ 	  else
+@@ -3593,7 +3595,7 @@ value_struct_elt_for_reference (struct t
+   for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--)
+     {
+       struct value *v;
+-      int base_offset;
++      LONGEST base_offset;
+ 
+       if (BASETYPE_VIA_VIRTUAL (t, i))
+ 	base_offset = 0;
+@@ -3683,7 +3685,7 @@ value_maybe_namespace_elt (const struct
+ 
+ struct type *
+ value_rtti_indirect_type (struct value *v, int *full, 
+-			  int *top, int *using_enc)
++			  LONGEST *top, int *using_enc)
+ {
+   struct value *target;
+   struct type *type, *real_type, *target_type;
+@@ -3733,12 +3735,12 @@ value_rtti_indirect_type (struct value *
+ struct value *
+ value_full_object (struct value *argp, 
+ 		   struct type *rtype, 
+-		   int xfull, int xtop,
++		   int xfull, LONGEST xtop,
+ 		   int xusing_enc)
+ {
+   struct type *real_type;
+   int full = 0;
+-  int top = -1;
++  LONGEST top = -1;
+   int using_enc = 0;
+   struct value *new_val;
+ 
+Index: gdb-7.5.0.20120926/gdb/valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valprint.c	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valprint.c	2012-11-07 22:11:49.313938133 +0100
+@@ -264,7 +264,7 @@ 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)
+ {
+   CHECK_TYPEDEF (type);
+@@ -328,7 +328,7 @@ val_print_invalid_address (struct ui_fil
+ 
+ void
+ generic_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 *original_value,
+ 		   const struct value_print_options *options,
+@@ -691,7 +691,7 @@ generic_val_print (struct type *type, co
+    RECURSE.  */
+ 
+ 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,
+@@ -903,7 +903,7 @@ val_print_type_code_flags (struct type *
+ 
+ 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,
+@@ -1444,7 +1444,7 @@ print_decimal_chars (struct ui_file *str
+ 
+ void
+ print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr,
+-		 unsigned len, enum bfd_endian byte_order)
++		 ULONGEST len, enum bfd_endian byte_order)
+ {
+   const gdb_byte *p;
+ 
+@@ -1561,23 +1561,23 @@ maybe_print_array_index (struct type *in
+ 
+ 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,
+ 			  const struct value_print_options *options,
+-			  unsigned int i)
++			  ULONGEST i)
+ {
+   unsigned int things_printed = 0;
+-  unsigned len;
++  ULONGEST len;
+   struct type *saved_type = type;
+   struct type *elttype, *index_type;
+-  unsigned eltlen;
++  ULONGEST eltlen;
+   /* Position of the array element we are examining to see
+      whether it is repeated.  */
+-  unsigned int rep1;
++  ULONGEST rep1;
+   /* Number of repetitions we have detected so far.  */
+-  unsigned int reps;
++  ULONGEST reps;
+   LONGEST low_bound, high_bound;
+   struct cleanup *back_to;
+   CORE_ADDR saved_address = address;
+@@ -1672,7 +1672,7 @@ val_print_array_elements (struct type *t
+ 		     address, stream, recurse + 1, val, options,
+ 		     current_language);
+ 	  annotate_elt_rep (reps);
+-	  fprintf_filtered (stream, " <repeats %u times>", reps);
++	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
+ 	  annotate_elt_rep_end ();
+ 
+ 	  i = rep1 - 1;
+@@ -2085,7 +2085,7 @@ generic_emit_char (int c, struct type *t
+ 
+ void
+ generic_printstr (struct ui_file *stream, struct type *type, 
+-		  const gdb_byte *string, unsigned int length, 
++		  const gdb_byte *string, ULONGEST length,
+ 		  const char *encoding, int force_ellipses,
+ 		  int quote_char, int c_style_terminator,
+ 		  const struct value_print_options *options)
+Index: gdb-7.5.0.20120926/gdb/valprint.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valprint.h	2012-05-18 17:31:40.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/valprint.h	2012-11-07 22:09:30.093140418 +0100
+@@ -117,11 +117,11 @@ extern void maybe_print_array_index (str
+                                      struct ui_file *stream,
+ 				     const struct value_print_options *);
+ 
+-extern void val_print_array_elements (struct type *, const gdb_byte *, int,
++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 *,
+-				      unsigned int);
++				      ULONGEST);
+ 
+ extern void val_print_type_code_int (struct type *, const gdb_byte *,
+ 				     struct ui_file *);
+@@ -131,7 +131,7 @@ extern void val_print_type_code_flags (s
+ 				       struct ui_file *stream);
+ 
+ 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,
+@@ -147,7 +147,7 @@ extern void print_decimal_chars (struct
+ 				 unsigned int, enum bfd_endian);
+ 
+ extern void print_hex_chars (struct ui_file *, const gdb_byte *,
+-			     unsigned int, enum bfd_endian);
++			     ULONGEST, enum bfd_endian);
+ 
+ extern void print_char_chars (struct ui_file *, struct type *,
+ 			      const gdb_byte *, unsigned int, enum bfd_endian);
+@@ -191,7 +191,7 @@ struct generic_val_print_decorations
+ 
+ 
+ extern void generic_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 *original_value,
+ 			       const struct value_print_options *options,
+@@ -201,7 +201,7 @@ extern void generic_emit_char (int c, st
+ 			       int quoter, const char *encoding);
+ 
+ extern void generic_printstr (struct ui_file *stream, struct type *type, 
+-			      const gdb_byte *string, unsigned int length, 
++			      const gdb_byte *string, ULONGEST length,
+ 			      const char *encoding, int force_ellipses,
+ 			      int quote_char, int c_style_terminator,
+ 			      const struct value_print_options *options);
+Index: gdb-7.5.0.20120926/gdb/value.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/value.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/value.c	2012-11-07 22:09:30.096140414 +0100
+@@ -68,10 +68,10 @@ struct internal_function
+ struct range
+ {
+   /* Lowest offset in the range.  */
+-  int offset;
++  LONGEST offset;
+ 
+   /* Length of the range.  */
+-  int length;
++  LONGEST length;
+ };
+ 
+ typedef struct range range_s;
+@@ -82,8 +82,8 @@ DEF_VEC_O(range_s);
+    [offset2, offset2+len2) overlap.  */
+ 
+ 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;
+ 
+@@ -107,7 +107,7 @@ range_lessthan (const range_s *r1, const
+    OFFSET+LENGTH).  */
+ 
+ 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;
+@@ -240,7 +240,7 @@ struct value
+      lval == lval_register, this is a further offset from
+      location.address within the registers structure.  Note also the
+      member embedded_offset below.  */
+-  int offset;
++  LONGEST offset;
+ 
+   /* Only used for bitfields; number of bits contained in them.  */
+   int bitsize;
+@@ -310,8 +310,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;
+ 
+   /* Values are stored in a chain, so that they can be deleted easily
+      over calls to the inferior.  Values assigned to internal
+@@ -333,7 +333,8 @@ struct value
+ };
+ 
+ int
+-value_bytes_available (const struct value *value, int offset, int length)
++value_bytes_available (const struct value *value, LONGEST offset,
++		       LONGEST length)
+ {
+   gdb_assert (!value->lazy);
+ 
+@@ -354,7 +355,8 @@ value_entirely_available (struct value *
+ }
+ 
+ void
+-mark_value_bytes_unavailable (struct value *value, int offset, int length)
++mark_value_bytes_unavailable (struct value *value, LONGEST offset,
++			      LONGEST length)
+ {
+   range_s newr;
+   int i;
+@@ -525,7 +527,7 @@ mark_value_bytes_unavailable (struct val
+ 
+ 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;
+@@ -538,9 +540,9 @@ find_first_range_overlap (VEC(range_s) *
+ }
+ 
+ int
+-value_available_contents_eq (const struct value *val1, int offset1,
+-			     const struct value *val2, int offset2,
+-			     int length)
++value_available_contents_eq (const struct value *val1, LONGEST offset1,
++			     const struct value *val2, LONGEST offset2,
++			     LONGEST length)
+ {
+   int idx1 = 0, idx2 = 0;
+ 
+@@ -768,13 +770,13 @@ deprecated_set_value_type (struct value
+   value->type = type;
+ }
+ 
+-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 = offset;
+ }
+@@ -924,8 +926,9 @@ value_contents_all (struct value *value)
+    DST_OFFSET+LENGTH) range are wholly available.  */
+ 
+ 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, ssize_t dst_offset,
++			 struct value *src, ssize_t src_offset,
++			 ssize_t length)
+ {
+   range_s *r;
+   int i;
+@@ -973,8 +976,8 @@ value_contents_copy_raw (struct value *d
+    DST_OFFSET+LENGTH) range are wholly available.  */
+ 
+ void
+-value_contents_copy (struct value *dst, int dst_offset,
+-		     struct value *src, int src_offset, int length)
++value_contents_copy (struct value *dst, ssize_t dst_offset,
++		     struct value *src, ssize_t src_offset, ssize_t length)
+ {
+   require_not_optimized_out (src);
+ 
+@@ -1068,7 +1071,7 @@ value_entirely_optimized_out (const stru
+ }
+ 
+ int
+-value_bits_valid (const struct value *value, int offset, int length)
++value_bits_valid (const struct value *value, LONGEST offset, LONGEST length)
+ {
+   if (!value->optimized_out)
+     return 1;
+@@ -1081,7 +1084,7 @@ value_bits_valid (const struct value *va
+ 
+ int
+ value_bits_synthetic_pointer (const struct value *value,
+-			      int offset, int length)
++			      LONGEST offset, LONGEST length)
+ {
+   if (value->lval != lval_computed
+       || !value->location.computed.funcs->check_synthetic_pointer)
+@@ -1091,26 +1094,26 @@ value_bits_synthetic_pointer (const stru
+ 								  length);
+ }
+ 
+-int
++LONGEST
+ value_embedded_offset (struct value *value)
+ {
+   return value->embedded_offset;
+ }
+ 
+ void
+-set_value_embedded_offset (struct value *value, int val)
++set_value_embedded_offset (struct value *value, LONGEST val)
+ {
+   value->embedded_offset = val;
+ }
+ 
+-int
++LONGEST
+ value_pointed_to_offset (struct value *value)
+ {
+   return value->pointed_to_offset;
+ }
+ 
+ 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 = val;
+ }
+@@ -1970,7 +1973,7 @@ get_internalvar_function (struct interna
+ }
+ 
+ void
+-set_internalvar_component (struct internalvar *var, int offset, int bitpos,
++set_internalvar_component (struct internalvar *var, LONGEST offset, int bitpos,
+ 			   int bitsize, struct value *newval)
+ {
+   gdb_byte *addr;
+@@ -2671,7 +2674,7 @@ set_value_enclosing_type (struct value *
+    FIELDNO says which field.  */
+ 
+ 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;
+@@ -2701,7 +2704,7 @@ value_primitive_field (struct value *arg
+ 	 bit.  Assume that the address, offset, and embedded offset
+ 	 are sufficiently aligned.  */
+ 
+-      int bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
++      LONGEST bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
+       int container_bitsize = TYPE_LENGTH (type) * 8;
+ 
+       v = allocate_value_lazy (type);
+@@ -2724,7 +2727,7 @@ value_primitive_field (struct value *arg
+       /* 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;
+ 
+       /* Lazy register values with offsets are not supported.  */
+       if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
+@@ -2801,7 +2804,7 @@ value_field (struct value *arg1, int fie
+ 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 = TYPE_FN_FIELD_TYPE (f, j);
+@@ -2861,8 +2864,8 @@ value_fn_field (struct value **arg1p, st
+ 
+ static int
+ unpack_value_bits_as_long_1 (struct type *field_type, const gdb_byte *valaddr,
+-			     int embedded_offset, int bitpos, int bitsize,
+-			     const struct value *original_value,
++			     LONGEST embedded_offset, LONGEST bitpos,
++			     int bitsize, const struct value *original_value,
+ 			     LONGEST *result)
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type));
+@@ -2870,7 +2873,7 @@ unpack_value_bits_as_long_1 (struct type
+   ULONGEST valmask;
+   int lsbcount;
+   int bytes_read;
+-  int read_offset;
++  LONGEST read_offset;
+ 
+   /* Read the minimum number of bytes required; there may not be
+      enough bytes to read an entire ULONGEST.  */
+@@ -2940,7 +2943,7 @@ unpack_value_bits_as_long_1 (struct type
+ 
+ int
+ unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr,
+-			   int embedded_offset, int bitpos, int bitsize,
++			   LONGEST embedded_offset, int bitpos, int bitsize,
+ 			   const struct value *original_value,
+ 			   LONGEST *result)
+ {
+@@ -2958,10 +2961,10 @@ unpack_value_bits_as_long (struct type *
+ 
+ static int
+ unpack_value_field_as_long_1 (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 = TYPE_FIELD_BITPOS (type, fieldno);
++  LONGEST bitpos = TYPE_FIELD_BITPOS (type, fieldno);
+   int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
+   struct type *field_type = TYPE_FIELD_TYPE (type, fieldno);
+ 
+@@ -2977,7 +2980,7 @@ unpack_value_field_as_long_1 (struct typ
+ 
+ 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)
+ {
+   gdb_assert (val != NULL);
+@@ -3009,7 +3012,7 @@ unpack_field_as_long (struct type *type,
+ 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)
+ {
+   LONGEST l;
+ 
+@@ -3036,12 +3039,12 @@ value_field_bitfield (struct type *type,
+ 
+ void
+ modify_field (struct type *type, gdb_byte *addr,
+-	      LONGEST fieldval, int bitpos, int bitsize)
++	      LONGEST fieldval, LONGEST bitpos, int bitsize)
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
+   ULONGEST oword;
+   ULONGEST mask = (ULONGEST) -1 >> (8 * sizeof (ULONGEST) - bitsize);
+-  int bytesize;
++  LONGEST bytesize;
+ 
+   /* Normalize BITPOS.  */
+   addr += bitpos / 8;
+Index: gdb-7.5.0.20120926/gdb/value.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/value.h	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/value.h	2012-11-07 22:09:30.104140403 +0100
+@@ -82,8 +82,8 @@ extern void set_value_parent (struct val
+    within the registers structure.  Note also the member
+    embedded_offset below.  */
+ 
+-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);
+ 
+ /* The comment from "struct value" reads: ``Is it modifiable?  Only
+    relevant if lval != not_lval.''.  Shouldn't the value instead be
+@@ -154,10 +154,10 @@ extern struct type *value_actual_type (s
+ 				       int resolve_simple_types,
+ 				       int *real_type_found);
+ 
+-extern int value_pointed_to_offset (struct value *value);
+-extern void set_value_pointed_to_offset (struct value *value, int val);
+-extern int value_embedded_offset (struct value *value);
+-extern void set_value_embedded_offset (struct value *value, int val);
++extern LONGEST value_pointed_to_offset (struct value *value);
++extern void set_value_pointed_to_offset (struct value *value, LONGEST val);
++extern LONGEST value_embedded_offset (struct value *value);
++extern void set_value_embedded_offset (struct value *value, LONGEST val);
+ 
+ /* For lval_computed values, this structure holds functions used to
+    retrieve and set the value (or portions of the value).
+@@ -185,7 +185,8 @@ struct lval_funcs
+   /* Check the validity of some bits in VALUE.  This should return 1
+      if all the bits starting at OFFSET and extending for LENGTH bits
+      are valid, or 0 if any bit is invalid.  */
+-  int (*check_validity) (const struct value *value, int offset, int length);
++  int (*check_validity) (const struct value *value, LONGEST offset,
++			 LONGEST length);
+ 
+   /* Return 1 if any bit in VALUE is valid, 0 if they are all invalid.  */
+   int (*check_any_valid) (const struct value *value);
+@@ -203,7 +204,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, LONGEST length);
+ 
+   /* Return a duplicate of VALUE's closure, for use in a new value.
+      This may simply return the same closure, if VALUE's is
+@@ -240,7 +241,7 @@ extern struct value *allocate_computed_v
+    Otherwise, return 1.  */
+ 
+ extern int valprint_check_validity (struct ui_file *stream, struct type *type,
+-				    int embedded_offset,
++				    LONGEST embedded_offset,
+ 				    const struct value *val);
+ 
+ extern struct value *allocate_optimized_out_value (struct type *type);
+@@ -411,13 +412,13 @@ extern struct value *coerce_array (struc
+    bits in the given range are valid, zero if any bit is invalid.  */
+ 
+ extern int value_bits_valid (const struct value *value,
+-			     int offset, int length);
++			     LONGEST offset, LONGEST length);
+ 
+ /* Given a value, determine whether the bits starting at OFFSET and
+    extending for LENGTH bits are a synthetic pointer.  */
+ 
+ extern int value_bits_synthetic_pointer (const struct value *value,
+-					 int offset, int length);
++					 LONGEST offset, LONGEST length);
+ 
+ /* Given a value, determine whether the contents bytes starting at
+    OFFSET and extending for LENGTH bytes are available.  This returns
+@@ -425,7 +426,7 @@ extern int value_bits_synthetic_pointer
+    byte is unavailable.  */
+ 
+ extern int value_bytes_available (const struct value *value,
+-				  int offset, int length);
++				  LONGEST offset, LONGEST length);
+ 
+ /* Like value_bytes_available, but return false if any byte in the
+    whole object is unavailable.  */
+@@ -435,7 +436,7 @@ extern int value_entirely_available (str
+    LENGTH bytes as unavailable.  */
+ 
+ extern void mark_value_bytes_unavailable (struct value *value,
+-					  int offset, int length);
++					  LONGEST offset, LONGEST length);
+ 
+ /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with
+    LENGTH bytes of VAL2's contents starting at OFFSET2.
+@@ -445,7 +446,7 @@ extern void mark_value_bytes_unavailable
+    example, to compare a complete object value with itself, including
+    its enclosing type chunk, you'd do:
+ 
+-     int len = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
++     ULONGEST len = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
+      value_available_contents (val, 0, val, 0, len);
+ 
+    Returns true iff the set of available contents match.  Unavailable
+@@ -467,9 +468,10 @@ extern void mark_value_bytes_unavailable
+    value_available_contents_eq(val, 3, val, 4, 4) => 0
+ */
+ 
+-extern int value_available_contents_eq (const struct value *val1, int offset1,
+-					const struct value *val2, int offset2,
+-					int length);
++extern int value_available_contents_eq (const struct value *val1,
++					LONGEST offset1,
++					const struct value *val2,
++					LONGEST offset2, LONGEST length);
+ 
+ /* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which
+    is (or will be copied to) VAL's contents buffer offset by
+@@ -478,7 +480,7 @@ extern int value_available_contents_eq (
+    memory is likewise unavailable.  STACK indicates whether the memory
+    is known to be stack memory.  */
+ 
+-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);
+ 
+@@ -506,7 +508,7 @@ extern CORE_ADDR unpack_pointer (struct
+ 
+ extern int unpack_value_bits_as_long (struct type *field_type,
+ 				      const gdb_byte *valaddr,
+-				      int embedded_offset, int bitpos,
++				      LONGEST embedded_offset, int bitpos,
+ 				      int bitsize,
+ 				      const struct value *original_value,
+ 				      LONGEST *result);
+@@ -515,12 +517,12 @@ extern LONGEST unpack_field_as_long (str
+ 				     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);
+ 
+ extern struct value *value_field_bitfield (struct type *type, int fieldno,
+ 					   const gdb_byte *valaddr,
+-					   int embedded_offset,
++					   LONGEST embedded_offset,
+ 					   const struct value *val);
+ 
+ extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num);
+@@ -578,12 +580,12 @@ extern struct value *default_read_var_va
+ extern struct value *allocate_value (struct type *type);
+ extern struct value *allocate_value_lazy (struct type *type);
+ extern void allocate_value_contents (struct value *value);
+-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, ssize_t dst_offset,
++				 struct value *src, ssize_t src_offset,
++				 ssize_t length);
++extern void value_contents_copy_raw (struct value *dst, ssize_t dst_offset,
++				     struct value *src, ssize_t src_offset,
++				     ssize_t length);
+ 
+ extern struct value *allocate_repeat_value (struct type *type, int count);
+ 
+@@ -657,16 +659,16 @@ extern int find_overload_match (struct v
+ 
+ extern struct value *value_field (struct value *arg1, int fieldno);
+ 
+-extern struct value *value_primitive_field (struct value *arg1, int offset,
++extern struct value *value_primitive_field (struct value *arg1, LONGEST offset,
+ 					    int fieldno,
+ 					    struct type *arg_type);
+ 
+ 
+-extern struct type *value_rtti_indirect_type (struct value *, int *, int *,
++extern struct type *value_rtti_indirect_type (struct value *, int *, LONGEST *,
+ 					      int *);
+ 
+ extern struct value *value_full_object (struct value *, struct type *, int,
+-					int, int);
++					LONGEST, int);
+ 
+ extern struct value *value_cast_pointers (struct type *, struct value *, int);
+ 
+@@ -756,7 +758,7 @@ extern void set_internalvar_string (stru
+ extern void clear_internalvar (struct internalvar *var);
+ 
+ extern void set_internalvar_component (struct internalvar *var,
+-				       int offset,
++				       LONGEST offset,
+ 				       int bitpos, int bitsize,
+ 				       struct value *newvalue);
+ 
+@@ -838,7 +840,7 @@ extern struct value *value_x_unop (struc
+ 				   enum noside noside);
+ 
+ extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f,
+-				     int j, struct type *type, int offset);
++				     int j, struct type *type, LONGEST offset);
+ 
+ extern int binop_types_user_defined_p (enum exp_opcode op,
+ 				       struct type *type1,
+@@ -866,7 +868,8 @@ extern void release_value_or_incref (str
+ extern int record_latest_value (struct value *val);
+ 
+ extern void modify_field (struct type *type, gdb_byte *addr,
+-			  LONGEST fieldval, int bitpos, int bitsize);
++			  LONGEST fieldval, LONGEST bitpos,
++			  int bitsize);
+ 
+ extern void type_print (struct type *type, const char *varstring,
+ 			struct ui_file *stream, int show);
+@@ -896,7 +899,7 @@ extern void value_print_array_elements (
+ extern struct value *value_release_to_mark (struct value *mark);
+ 
+ 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,
+@@ -947,10 +950,11 @@ extern struct value *value_literal_compl
+ extern struct value *find_function_in_inferior (const char *,
+ 						struct objfile **);
+ 
+-extern struct value *value_allocate_space_in_inferior (int);
++extern struct value *value_allocate_space_in_inferior (LONGEST);
+ 
+ extern struct value *value_subscripted_rvalue (struct value *array,
+-					       LONGEST index, int lowerbound);
++					       LONGEST index,
++					       LONGEST lowerbound);
+ 
+ /* User function handler.  */
+ 

diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch
new file mode 100644
index 0000000..0aea5ef
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-21of25.patch
@@ -0,0 +1,224 @@
+http://sourceware.org/ml/gdb-patches/2012-09/msg00632.html
+Subject: [PATCH 2/4] Add a check to ensure that a type may fit into host memory
+
+
+--MP_/PnL6l3LUsXWpZ/olqawWlzb
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+Hi,
+
+This is part two of the bitpos expansion patch.  This implements checks
+in some places in the code to ensure that a type size in ULONGEST is
+small enough to fit into host memory.  Tested for regressions on x86_64
+Fedora 16.
+
+Regards,
+Siddhesh
+
+--MP_/PnL6l3LUsXWpZ/olqawWlzb
+Content-Type: text/plain
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=ChangeLog-ensure_sizet
+
+gdb/ChangeLog
+
+	* alpha-tdep.c (alpha_push_dummy_call) Check for underflow in
+	SP.
+	* cp-valprint (cp_print_value): Ensure BASECLASS fits into
+	size_t.
+	* dwarf2loc.c (read_pieced_value): Ensure that THIS_SIZE fits
+	into size_t.
+	(write_pieced_value): Likewise.
+	* findcmd.c (parse_find_args): Ensure PATTERN_BUF_SIZE fits into
+	size_t.
+	* p-valprint (pascal_object_print_value): Ensure BASECLASS fits
+	into size_t.
+	* utils.c (ulongest_fits_host_or_error): New function to find if
+	a ULONGEST number fits into size_t.
+	* utils.h: Declare ulongest_fits_host_or_error.
+	* valops.c (search_struct_method): Ensure BASECLASS fits into
+	size_t.
+	* value.c (allocate_value_lazy): Ensure TYPE fits into size_t.
+	(allocate_value_contents): Likewise.
+	(set_value_enclosing_type): Ensure NEW_ENCL_TYPE fits into
+	size_t.
+	* vax-tdep.c (vax_return_value): Ensure that TYPE fits into
+	size_t.
+
+--MP_/PnL6l3LUsXWpZ/olqawWlzb
+Content-Type: text/x-patch
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment; filename=bitpos-ensure-size_t.patch
+
+Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/alpha-tdep.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/alpha-tdep.c	2012-11-07 22:46:00.042902382 +0100
+@@ -414,6 +414,13 @@ alpha_push_dummy_call (struct gdbarch *g
+     accumulate_size = 0;
+   else
+     accumulate_size -= sizeof(arg_reg_buffer);
++
++  /* Check for underflow.  */
++  if (sp - accumulate_size > sp)
++    error (_("Insufficient memory in GDB host for arguments, "
++	     "need %s bytes, but less than %s bytes available."),
++	   plongest (accumulate_size), plongest (CORE_ADDR_MAX - sp));
++
+   sp -= accumulate_size;
+ 
+   /* Keep sp aligned to a multiple of 16 as the ABI requires.  */
+Index: gdb-7.5.0.20120926/gdb/cp-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/cp-valprint.c	2012-11-07 22:12:14.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/cp-valprint.c	2012-11-07 22:46:00.043902381 +0100
+@@ -561,6 +561,8 @@ cp_print_value (struct type *type, struc
+ 		  gdb_byte *buf;
+ 		  struct cleanup *back_to;
+ 
++		  ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
++
+ 		  buf = xmalloc (TYPE_LENGTH (baseclass));
+ 		  back_to = make_cleanup (xfree, buf);
+ 
+Index: gdb-7.5.0.20120926/gdb/dwarf2loc.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/dwarf2loc.c	2012-11-07 22:09:29.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/dwarf2loc.c	2012-11-07 22:46:00.070902342 +0100
+@@ -1784,6 +1784,8 @@ read_pieced_value (struct value *v)
+ 
+       this_size = (this_size_bits + source_offset_bits % 8 + 7) / 8;
+       source_offset = source_offset_bits / 8;
++      ulongest_fits_host_or_error (this_size);
++
+       if (buffer_size < this_size)
+ 	{
+ 	  buffer_size = this_size;
+@@ -1975,6 +1977,7 @@ write_pieced_value (struct value *to, st
+ 	}
+       else
+ 	{
++	  ulongest_fits_host_or_error (this_size);
+ 	  if (buffer_size < this_size)
+ 	    {
+ 	      buffer_size = this_size;
+Index: gdb-7.5.0.20120926/gdb/findcmd.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/findcmd.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/findcmd.c	2012-11-07 22:46:00.153902249 +0100
+@@ -187,6 +187,7 @@ parse_find_args (char *args, ULONGEST *m
+ 	  size_t current_offset = pattern_buf_end - pattern_buf;
+ 
+ 	  pattern_buf_size = pattern_buf_size_need * 2;
++	  ulongest_fits_host_or_error (pattern_buf_size);
+ 	  pattern_buf = xrealloc (pattern_buf, pattern_buf_size);
+ 	  pattern_buf_end = pattern_buf + current_offset;
+ 	}
+Index: gdb-7.5.0.20120926/gdb/p-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/p-valprint.c	2012-11-07 22:09:29.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/p-valprint.c	2012-11-07 22:46:00.163902208 +0100
+@@ -827,6 +827,7 @@ pascal_object_print_value (struct type *
+ 	      gdb_byte *buf;
+ 	      struct cleanup *back_to;
+ 
++	      ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
+ 	      buf = xmalloc (TYPE_LENGTH (baseclass));
+ 	      back_to = make_cleanup (xfree, buf);
+ 
+Index: gdb-7.5.0.20120926/gdb/utils.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/utils.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/utils.c	2012-11-07 22:46:00.166902202 +0100
+@@ -3135,6 +3135,18 @@ host_address_to_string (const void *addr
+   return str;
+ }
+ 
++/* Ensure that the input NUM is not larger than the maximum capacity of the
++   host system.  We choose SIZE_MAX / 8 as a conservative estimate of the size
++   of a resource that a system may allocate.  */
++void
++ulongest_fits_host_or_error (ULONGEST num)
++{
++  if (num > SIZE_MAX / 8)
++    error (_("Insufficient memory in host GDB for object of size %s bytes, "
++	     "maximum allowed %s bytes."), pulongest (num),
++	   pulongest (SIZE_MAX / 8));
++}
++
+ char *
+ gdb_realpath (const char *filename)
+ {
+Index: gdb-7.5.0.20120926/gdb/valops.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valops.c	2012-11-07 22:09:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valops.c	2012-11-07 22:46:00.181902181 +0100
+@@ -2383,6 +2383,7 @@ search_struct_method (const char *name,
+ 	      struct cleanup *back_to;
+ 	      CORE_ADDR address;
+ 
++	      ulongest_fits_host_or_error (TYPE_LENGTH (baseclass));
+ 	      tmp = xmalloc (TYPE_LENGTH (baseclass));
+ 	      back_to = make_cleanup (xfree, tmp);
+ 	      address = value_address (*arg1p);
+Index: gdb-7.5.0.20120926/gdb/value.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/value.c	2012-11-07 22:09:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/value.c	2012-11-07 22:46:00.184902176 +0100
+@@ -663,6 +663,7 @@ allocate_value_lazy (struct type *type)
+      description correctly.  */
+   check_typedef (type);
+ 
++  ulongest_fits_host_or_error (TYPE_LENGTH (type));
+   val = (struct value *) xzalloc (sizeof (struct value));
+   val->contents = NULL;
+   val->next = all_values;
+@@ -694,6 +695,8 @@ allocate_value_lazy (struct type *type)
+ void
+ allocate_value_contents (struct value *val)
+ {
++  ulongest_fits_host_or_error (TYPE_LENGTH (val->enclosing_type));
++
+   if (!val->contents)
+     val->contents = (gdb_byte *) xzalloc (TYPE_LENGTH (val->enclosing_type));
+ }
+@@ -2662,8 +2665,12 @@ void
+ set_value_enclosing_type (struct value *val, struct type *new_encl_type)
+ {
+   if (TYPE_LENGTH (new_encl_type) > TYPE_LENGTH (value_enclosing_type (val))) 
+-    val->contents =
+-      (gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
++    {
++      ulongest_fits_host_or_error (TYPE_LENGTH (new_encl_type));
++
++      val->contents =
++	(gdb_byte *) xrealloc (val->contents, TYPE_LENGTH (new_encl_type));
++    }
+ 
+   val->enclosing_type = new_encl_type;
+ }
+Index: gdb-7.5.0.20120926/gdb/vax-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/vax-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/vax-tdep.c	2012-11-07 22:46:56.810819878 +0100
+@@ -223,6 +223,7 @@ vax_return_value (struct gdbarch *gdbarc
+ 	  ULONGEST addr;
+ 
+ 	  regcache_raw_read_unsigned (regcache, VAX_R0_REGNUM, &addr);
++	  ulongest_fits_host_or_error (TYPE_LENGTH (type));
+ 	  read_memory (addr, readbuf, TYPE_LENGTH (type));
+ 	}
+ 
+Index: gdb-7.5.0.20120926/gdb/defs.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/defs.h	2012-11-07 22:00:43.111906109 +0100
++++ gdb-7.5.0.20120926/gdb/defs.h	2012-11-07 22:47:46.001001239 +0100
+@@ -1170,4 +1170,6 @@ enum block_enum
+   FIRST_LOCAL_BLOCK = 2
+ };
+ 
++extern void ulongest_fits_host_or_error (ULONGEST num);
++
+ #endif /* #ifndef DEFS_H */

diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch
new file mode 100644
index 0000000..dd77f03
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-22of25.patch
@@ -0,0 +1,701 @@
+http://sourceware.org/ml/gdb-patches/2012-09/msg00629.html
+Subject: [PATCH 3/4] Expand watchpoint lengths to LONGEST
+
+
+--MP_/6HRlH6vpyqtSy4CYyMrX6b2
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+Hi,
+
+This is part three of the bitpos expansion change.  Some architectures
+allow arbitrary length watchpoints and combined with the fact that type
+lengths could be large enough, we need LONGEST for watchpoint lengths.
+It is architecture dependent however, whether the LONGEST is needed or
+not.  This patch updates the signatures of watchpoint insertion and
+removal functions of all architectures (to comply with the function
+signatures in the callback struct), but expands types only in
+architectures that need it.  Tested on Fedora 16 x86_64.
+
+Regards,
+Siddhesh
+--MP_/6HRlH6vpyqtSy4CYyMrX6b2
+Content-Type: text/plain
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=ChangeLog-wp
+
+gdb/ChangeLog:
+
+	* arm-linux-nat.c (arm_linux_insert_watchpoint): Expand
+	parameter LEN to LONGEST.
+	(arm_linux_remove_watchpoint): Likewise.
+	(arm_linux_watchpoint_addr_within_range): Expand parameter
+	LENGTH to LONGEST.
+	* i386-nat.c (i386_insert_watchpoint): Expand parameter LEN to
+	LONGEST.
+	(i386_remove_watchpoint): Likewise.
+	* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise.
+	(ia64_linux_remove_watchpoint): Likewise.
+	* inf-ttrace.c (inf_ttrace_insert_watchpoint): Likewise.
+	Expand NUM_PAGES, PAGE to LONGEST.
+	(inf_ttrace_remove_watchpoint): Likewise.
+	* mips-linux-nat.c (mips_linux_insert_watchpoint): Expand
+	parameter LEN to LONGEST.
+	(mips_linux_remove_watchpoint): Likewise.
+	* nto-procfs.c (procfs_remove_hw_watchpoint): Likewise.
+	(procfs_insert_hw_watchpoint): Likewise.
+	* ppc-linux-nat.c (calculate_dvc): Likewise.  Expand I,
+	NUM_BYTE_ENABLE to LONGEST.
+	(check_condition): Expand parameter LEN to point to LONGEST.
+	(ppc_linux_can_accel_watchpoint_condition): Expand parameter
+	LEN to LONGEST.
+	(create_watchpoint_request): Likewise.
+	(ppc_linux_insert_watchpoint): Likewise.
+	(ppc_linux_remove_watchpoint): Likewise.
+	(ppc_linux_watchpoint_addr_within_range): Expand parameter
+	LENGTH to LONGEST.
+	* procfs.c (proc_set_watchpoint): Expand parameter LEN to
+	LONGEST.
+	(procfs_set_watchpoint): Likewise.
+	(procfs_insert_watchpoint): Likewise.
+	(procfs_remove_watchpoint): Likewise.
+	* remote-m32r-sdi.c (m32r_insert_watchpoint): Likewise.  Use
+	plongest to format print LEN.
+	(m32r_remove_watchpoint): Likewise.
+	* remote-mips.c (mips_insert_watchpoint): Expand parameter LEN
+	to LONGEST.
+	(mips_remove_watchpoint): Likewise.
+	* remote.c (remote_insert_watchpoint): Likewise.
+	Use phex_nz to format print LEN.
+	(remote_remove_watchpoint): Likewise.
+	(remote_watchpoint_addr_within_range): Expand parameter LENGTH
+	to LONGEST.
+	* s390-nat.c (s390_insert_watchpoint): Expand parameter LEN to
+	LONGEST.
+	(s390_remove_watchpoint): Likewise.
+	* target.c (update_current_target): Expand parameter LEN for
+	callbacks to TO_INSERT_WATCHPOINT, TO_REMOVE_WATCHPOINT,
+	TO_CAN_ACCEL_WATCHPOINT_CONDITION, to LONGEST.
+	(default_watchpoint_addr_within_range): Expand parameter
+	LENGTH to LONGEST.
+	(debug_to_can_accel_watchpoint_condition): Expand parameter LEN
+	to LONGEST.  Use plongest to format print LEN.
+	(debug_to_watchpoint_addr_within_range): Expand parameter LENGTH
+	to LONGEST.  Use plongest to format print LENGTH.
+	(debug_to_insert_watchpoint): Expand parameter LEN to LONGEST.
+	Use plongest to format print LEN.
+	(debug_to_remove_watchpoint): Likewise.
+	* target.h (struct target_ops): Expand parameter LEN of
+	TO_REMOVE_WATCHPOINT, TO_INSERT_WATCHPOINT,
+	TO_WATCHPOINT_ADDR_WITHIN_RANGE and
+	TO_CAN_ACCEL_WATCHPOINT_CONDITION to LONGEST.
+
+--MP_/6HRlH6vpyqtSy4CYyMrX6b2
+Content-Type: text/x-patch
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment; filename=bitpos-wp.patch
+
+diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
+index 231b008..6deb23d 100644
+--- a/gdb/arm-linux-nat.c
++++ b/gdb/arm-linux-nat.c
+@@ -1105,7 +1105,7 @@ arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ 
+ /* Insert a Hardware breakpoint.  */
+ static int
+-arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
++arm_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
+ 			     struct expression *cond)
+ {
+   struct lwp_info *lp;
+@@ -1123,7 +1123,7 @@ arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ 
+ /* Remove a hardware breakpoint.  */
+ static int
+-arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
++arm_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
+ 			     struct expression *cond)
+ {
+   struct lwp_info *lp;
+@@ -1180,7 +1180,7 @@ arm_linux_stopped_by_watchpoint (void)
+ static int
+ arm_linux_watchpoint_addr_within_range (struct target_ops *target,
+ 					CORE_ADDR addr,
+-					CORE_ADDR start, int length)
++					CORE_ADDR start, LONGEST length)
+ {
+   return start <= addr && start + length - 1 >= addr;
+ }
+diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
+index 76c51a8..9e293fe 100644
+--- a/gdb/i386-nat.c
++++ b/gdb/i386-nat.c
+@@ -592,7 +592,7 @@ i386_update_inferior_debug_regs (struct i386_debug_reg_state *new_state)
+    of the type TYPE.  Return 0 on success, -1 on failure.  */
+ 
+ static int
+-i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
++i386_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   struct i386_debug_reg_state *state = i386_debug_reg_state ();
+@@ -629,7 +629,7 @@ i386_insert_watchpoint (CORE_ADDR addr, int len, int type,
+    address ADDR, whose length is LEN bytes, and for accesses of the
+    type TYPE.  Return 0 on success, -1 on failure.  */
+ static int
+-i386_remove_watchpoint (CORE_ADDR addr, int len, int type,
++i386_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   struct i386_debug_reg_state *state = i386_debug_reg_state ();
+diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
+index 9b5fbf3..6061eae 100644
+--- a/gdb/ia64-linux-nat.c
++++ b/gdb/ia64-linux-nat.c
+@@ -542,7 +542,7 @@ is_power_of_2 (int val)
+ }
+ 
+ static int
+-ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
++ia64_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
+ 			      struct expression *cond)
+ {
+   struct lwp_info *lp;
+@@ -596,7 +596,7 @@ ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ }
+ 
+ static int
+-ia64_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
++ia64_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			      struct expression *cond)
+ {
+   int idx;
+diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
+index d60eddb..c33db45 100644
+--- a/gdb/inf-ttrace.c
++++ b/gdb/inf-ttrace.c
+@@ -313,14 +313,14 @@ inf_ttrace_disable_page_protections (pid_t pid)
+    type TYPE.  */
+ 
+ static int
+-inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
++inf_ttrace_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			      struct expression *cond)
+ {
+   const int pagesize = inf_ttrace_page_dict.pagesize;
+   pid_t pid = ptid_get_pid (inferior_ptid);
+   CORE_ADDR page_addr;
+-  int num_pages;
+-  int page;
++  LONGEST num_pages;
++  LONGEST page;
+ 
+   gdb_assert (type == hw_write);
+ 
+@@ -337,14 +337,14 @@ inf_ttrace_insert_watchpoint (CORE_ADDR addr, int len, int type,
+    type TYPE.  */
+ 
+ static int
+-inf_ttrace_remove_watchpoint (CORE_ADDR addr, int len, int type,
++inf_ttrace_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			      struct expression *cond)
+ {
+   const int pagesize = inf_ttrace_page_dict.pagesize;
+   pid_t pid = ptid_get_pid (inferior_ptid);
+   CORE_ADDR page_addr;
+-  int num_pages;
+-  int page;
++  LONGEST num_pages;
++  LONGEST page;
+ 
+   gdb_assert (type == hw_write);
+ 
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index 5566d0c..7467d11 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -1017,7 +1017,7 @@ populate_regs_from_watches (struct pt_watch_regs *regs)
+    watch.  Return zero on success.  */
+ 
+ static int
+-mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
++mips_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			      struct expression *cond)
+ {
+   struct pt_watch_regs regs;
+@@ -1067,7 +1067,7 @@ mips_linux_insert_watchpoint (CORE_ADDR addr, int len, int type,
+    Return zero on success.  */
+ 
+ static int
+-mips_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
++mips_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			      struct expression *cond)
+ {
+   int retval;
+diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
+index b58f318..25fecf3 100644
+--- a/gdb/nto-procfs.c
++++ b/gdb/nto-procfs.c
+@@ -69,10 +69,10 @@ static ptid_t do_attach (ptid_t ptid);
+ 
+ static int procfs_can_use_hw_breakpoint (int, int, int);
+ 
+-static int procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
++static int procfs_insert_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 					struct expression *cond);
+ 
+-static int procfs_remove_hw_watchpoint (CORE_ADDR addr, int len, int type,
++static int procfs_remove_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 					struct expression *cond);
+ 
+ static int procfs_stopped_by_watchpoint (void);
+@@ -1493,14 +1493,14 @@ procfs_can_use_hw_breakpoint (int type, int cnt, int othertype)
+ }
+ 
+ static int
+-procfs_remove_hw_watchpoint (CORE_ADDR addr, int len, int type,
++procfs_remove_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			     struct expression *cond)
+ {
+   return procfs_hw_watchpoint (addr, -1, type);
+ }
+ 
+ static int
+-procfs_insert_hw_watchpoint (CORE_ADDR addr, int len, int type,
++procfs_insert_hw_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			     struct expression *cond)
+ {
+   return procfs_hw_watchpoint (addr, len, type);
+diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
+index 67e1cac..abfb2fc 100644
+--- a/gdb/ppc-linux-nat.c
++++ b/gdb/ppc-linux-nat.c
+@@ -1839,11 +1839,11 @@ can_use_watchpoint_cond_accel (void)
+    CONDITION_VALUE will hold the value which should be put in the
+    DVC register.  */
+ static void
+-calculate_dvc (CORE_ADDR addr, int len, CORE_ADDR data_value,
++calculate_dvc (CORE_ADDR addr, LONGEST len, CORE_ADDR data_value,
+ 	       uint32_t *condition_mode, uint64_t *condition_value)
+ {
+-  int i, num_byte_enable, align_offset, num_bytes_off_dvc,
+-      rightmost_enabled_byte;
++  LONGEST i, num_byte_enable;
++  int align_offset, num_bytes_off_dvc, rightmost_enabled_byte;
+   CORE_ADDR addr_end_data, addr_end_dvc;
+ 
+   /* The DVC register compares bytes within fixed-length windows which
+@@ -1930,7 +1930,7 @@ num_memory_accesses (struct value *v)
+    of the constant.  */
+ static int
+ check_condition (CORE_ADDR watch_addr, struct expression *cond,
+-		 CORE_ADDR *data_value, int *len)
++		 CORE_ADDR *data_value, LONGEST *len)
+ {
+   int pc = 1, num_accesses_left, num_accesses_right;
+   struct value *left_val, *right_val, *left_chain, *right_chain;
+@@ -1997,7 +1997,7 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond,
+    the condition expression, thus only triggering the watchpoint when it is
+    true.  */
+ static int
+-ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
++ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, LONGEST len, int rw,
+ 					  struct expression *cond)
+ {
+   CORE_ADDR data_value;
+@@ -2014,7 +2014,7 @@ ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+ 
+ static void
+ create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
+-			   int len, int rw, struct expression *cond,
++			   LONGEST len, int rw, struct expression *cond,
+ 			   int insert)
+ {
+   if (len == 1
+@@ -2059,7 +2059,7 @@ create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
+ }
+ 
+ static int
+-ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
++ppc_linux_insert_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
+ 			     struct expression *cond)
+ {
+   struct lwp_info *lp;
+@@ -2127,7 +2127,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
+ }
+ 
+ static int
+-ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
++ppc_linux_remove_watchpoint (CORE_ADDR addr, LONGEST len, int rw,
+ 			     struct expression *cond)
+ {
+   struct lwp_info *lp;
+@@ -2267,7 +2267,7 @@ ppc_linux_stopped_by_watchpoint (void)
+ static int
+ ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
+ 					CORE_ADDR addr,
+-					CORE_ADDR start, int length)
++					CORE_ADDR start, LONGEST length)
+ {
+   int mask;
+ 
+diff --git a/gdb/procfs.c b/gdb/procfs.c
+index 4a9336f..26accd8 100644
+--- a/gdb/procfs.c
++++ b/gdb/procfs.c
+@@ -2470,7 +2470,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr)
+ #endif
+ 
+ static int
+-proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags)
++proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, LONGEST len, int wflags)
+ {
+ #if !defined (PCWATCH) && !defined (PIOCSWATCH)
+   /* If neither or these is defined, we can't support watchpoints.
+@@ -4816,7 +4816,7 @@ procfs_pid_to_str (struct target_ops *ops, ptid_t ptid)
+ /* Insert a watchpoint.  */
+ 
+ static int
+-procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag,
++procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, LONGEST len, int rwflag,
+ 		       int after)
+ {
+ #ifndef UNIXWARE
+@@ -4938,7 +4938,7 @@ procfs_stopped_data_address (struct target_ops *targ, CORE_ADDR *addr)
+ }
+ 
+ static int
+-procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
++procfs_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			  struct expression *cond)
+ {
+   if (!target_have_steppable_watchpoint
+@@ -4960,7 +4960,7 @@ procfs_insert_watchpoint (CORE_ADDR addr, int len, int type,
+ }
+ 
+ static int
+-procfs_remove_watchpoint (CORE_ADDR addr, int len, int type,
++procfs_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			  struct expression *cond)
+ {
+   return procfs_set_watchpoint (inferior_ptid, addr, 0, 0, 0);
+diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
+index 748aeba..b385c3f 100644
+--- a/gdb/remote-m32r-sdi.c
++++ b/gdb/remote-m32r-sdi.c
+@@ -1417,14 +1417,14 @@ m32r_can_use_hw_watchpoint (int type, int cnt, int othertype)
+    watchpoint.  */
+ 
+ static int
+-m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
++m32r_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   int i;
+ 
+   if (remote_debug)
+-    fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%d,%d)\n",
+-			paddress (target_gdbarch, addr), len, type);
++    fprintf_unfiltered (gdb_stdlog, "m32r_insert_watchpoint(%s,%s,%d)\n",
++			paddress (target_gdbarch, addr), plongest (len), type);
+ 
+   for (i = 0; i < MAX_ACCESS_BREAKS; i++)
+     {
+@@ -1442,14 +1442,14 @@ m32r_insert_watchpoint (CORE_ADDR addr, int len, int type,
+ }
+ 
+ static int
+-m32r_remove_watchpoint (CORE_ADDR addr, int len, int type,
++m32r_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   int i;
+ 
+   if (remote_debug)
+-    fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%d,%d)\n",
+-			paddress (target_gdbarch, addr), len, type);
++    fprintf_unfiltered (gdb_stdlog, "m32r_remove_watchpoint(%s,%s,%d)\n",
++			paddress (target_gdbarch, addr), plongest (len), type);
+ 
+   for (i = 0; i < MAX_ACCESS_BREAKS; i++)
+     {
+diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
+index eee2460..9a9265a 100644
+--- a/gdb/remote-mips.c
++++ b/gdb/remote-mips.c
+@@ -2419,7 +2419,7 @@ calculate_mask (CORE_ADDR addr, int len)
+    watchpoint.  */
+ 
+ static int
+-mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
++mips_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   if (mips_set_breakpoint (addr, len, type))
+@@ -2431,7 +2431,7 @@ mips_insert_watchpoint (CORE_ADDR addr, int len, int type,
+ /* Remove a watchpoint.  */
+ 
+ static int
+-mips_remove_watchpoint (CORE_ADDR addr, int len, int type,
++mips_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   if (mips_clear_breakpoint (addr, len, type))
+diff --git a/gdb/remote.c b/gdb/remote.c
+index 8c27390..bcec331 100644
+--- a/gdb/remote.c
++++ b/gdb/remote.c
+@@ -8035,7 +8035,7 @@ watchpoint_to_Z_packet (int type)
+ }
+ 
+ static int
+-remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
++remote_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			  struct expression *cond)
+ {
+   struct remote_state *rs = get_remote_state ();
+@@ -8050,7 +8050,7 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
+   p = strchr (rs->buf, '\0');
+   addr = remote_address_masked (addr);
+   p += hexnumstr (p, (ULONGEST) addr);
+-  xsnprintf (p, endbuf - p, ",%x", len);
++  xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
+ 
+   putpkt (rs->buf);
+   getpkt (&rs->buf, &rs->buf_size, 0);
+@@ -8070,7 +8070,7 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
+ 
+ static int
+ remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
+-				     CORE_ADDR start, int length)
++				     CORE_ADDR start, LONGEST length)
+ {
+   CORE_ADDR diff = remote_address_masked (addr - start);
+ 
+@@ -8079,7 +8079,7 @@ remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
+ 
+ 
+ static int
+-remote_remove_watchpoint (CORE_ADDR addr, int len, int type,
++remote_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			  struct expression *cond)
+ {
+   struct remote_state *rs = get_remote_state ();
+@@ -8094,7 +8094,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type,
+   p = strchr (rs->buf, '\0');
+   addr = remote_address_masked (addr);
+   p += hexnumstr (p, (ULONGEST) addr);
+-  xsnprintf (p, endbuf - p, ",%x", len);
++  xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
+   putpkt (rs->buf);
+   getpkt (&rs->buf, &rs->buf_size, 0);
+ 
+diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
+index 4974bad..3f41519 100644
+--- a/gdb/s390-nat.c
++++ b/gdb/s390-nat.c
+@@ -517,7 +517,7 @@ s390_fix_watch_points (struct lwp_info *lp)
+ }
+ 
+ static int
+-s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
++s390_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   struct lwp_info *lp;
+@@ -538,7 +538,7 @@ s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
+ }
+ 
+ static int
+-s390_remove_watchpoint (CORE_ADDR addr, int len, int type,
++s390_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			struct expression *cond)
+ {
+   struct lwp_info *lp;
+diff --git a/gdb/target.c b/gdb/target.c
+index f7207c0..a69fb06 100644
+--- a/gdb/target.c
++++ b/gdb/target.c
+@@ -49,7 +49,8 @@ static void target_info (char *, int);
+ static void default_terminal_info (char *, int);
+ 
+ static int default_watchpoint_addr_within_range (struct target_ops *,
+-						 CORE_ADDR, CORE_ADDR, int);
++						 CORE_ADDR, CORE_ADDR,
++						 LONGEST);
+ 
+ static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
+ 
+@@ -114,10 +115,10 @@ static int debug_to_insert_hw_breakpoint (struct gdbarch *,
+ static int debug_to_remove_hw_breakpoint (struct gdbarch *,
+ 					  struct bp_target_info *);
+ 
+-static int debug_to_insert_watchpoint (CORE_ADDR, int, int,
++static int debug_to_insert_watchpoint (CORE_ADDR, LONGEST, int,
+ 				       struct expression *);
+ 
+-static int debug_to_remove_watchpoint (CORE_ADDR, int, int,
++static int debug_to_remove_watchpoint (CORE_ADDR, LONGEST, int,
+ 				       struct expression *);
+ 
+ static int debug_to_stopped_by_watchpoint (void);
+@@ -125,11 +126,12 @@ static int debug_to_stopped_by_watchpoint (void);
+ static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
+ 
+ static int debug_to_watchpoint_addr_within_range (struct target_ops *,
+-						  CORE_ADDR, CORE_ADDR, int);
++						  CORE_ADDR, CORE_ADDR,
++						  LONGEST);
+ 
+ static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
+ 
+-static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int,
++static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, LONGEST, int,
+ 						    struct expression *);
+ 
+ static void debug_to_terminal_init (void);
+@@ -751,10 +753,10 @@ update_current_target (void)
+ 	    (int (*) (struct gdbarch *, struct bp_target_info *))
+ 	    return_minus_one);
+   de_fault (to_insert_watchpoint,
+-	    (int (*) (CORE_ADDR, int, int, struct expression *))
++	    (int (*) (CORE_ADDR, LONGEST, int, struct expression *))
+ 	    return_minus_one);
+   de_fault (to_remove_watchpoint,
+-	    (int (*) (CORE_ADDR, int, int, struct expression *))
++	    (int (*) (CORE_ADDR, LONGEST, int, struct expression *))
+ 	    return_minus_one);
+   de_fault (to_stopped_by_watchpoint,
+ 	    (int (*) (void))
+@@ -767,7 +769,7 @@ update_current_target (void)
+   de_fault (to_region_ok_for_hw_watchpoint,
+ 	    default_region_ok_for_hw_watchpoint);
+   de_fault (to_can_accel_watchpoint_condition,
+-            (int (*) (CORE_ADDR, int, int, struct expression *))
++            (int (*) (CORE_ADDR, LONGEST, int, struct expression *))
+             return_zero);
+   de_fault (to_terminal_init,
+ 	    (void (*) (void))
+@@ -3558,7 +3560,7 @@ default_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ static int
+ default_watchpoint_addr_within_range (struct target_ops *target,
+ 				      CORE_ADDR addr,
+-				      CORE_ADDR start, int length)
++				      CORE_ADDR start, LONGEST length)
+ {
+   return addr >= start && addr < start + length;
+ }
+@@ -4263,7 +4265,7 @@ debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
+ }
+ 
+ static int
+-debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
++debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, LONGEST len, int rw,
+ 					 struct expression *cond)
+ {
+   int retval;
+@@ -4273,8 +4275,8 @@ debug_to_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
+ 
+   fprintf_unfiltered (gdb_stdlog,
+ 		      "target_can_accel_watchpoint_condition "
+-		      "(%s, %d, %d, %s) = %ld\n",
+-		      core_addr_to_string (addr), len, rw,
++		      "(%s, %s, %d, %s) = %ld\n",
++		      core_addr_to_string (addr), plongest (len), rw,
+ 		      host_address_to_string (cond), (unsigned long) retval);
+   return retval;
+ }
+@@ -4309,7 +4311,7 @@ debug_to_stopped_data_address (struct target_ops *target, CORE_ADDR *addr)
+ static int
+ debug_to_watchpoint_addr_within_range (struct target_ops *target,
+ 				       CORE_ADDR addr,
+-				       CORE_ADDR start, int length)
++				       CORE_ADDR start, LONGEST length)
+ {
+   int retval;
+ 
+@@ -4317,9 +4319,9 @@ debug_to_watchpoint_addr_within_range (struct target_ops *target,
+ 							 start, length);
+ 
+   fprintf_filtered (gdb_stdlog,
+-		    "target_watchpoint_addr_within_range (%s, %s, %d) = %d\n",
++		    "target_watchpoint_addr_within_range (%s, %s, %s) = %d\n",
+ 		    core_addr_to_string (addr), core_addr_to_string (start),
+-		    length, retval);
++		    plongest (length), retval);
+   return retval;
+ }
+ 
+@@ -4354,7 +4356,7 @@ debug_to_remove_hw_breakpoint (struct gdbarch *gdbarch,
+ }
+ 
+ static int
+-debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
++debug_to_insert_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			    struct expression *cond)
+ {
+   int retval;
+@@ -4362,14 +4364,14 @@ debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type,
+   retval = debug_target.to_insert_watchpoint (addr, len, type, cond);
+ 
+   fprintf_unfiltered (gdb_stdlog,
+-		      "target_insert_watchpoint (%s, %d, %d, %s) = %ld\n",
+-		      core_addr_to_string (addr), len, type,
++		      "target_insert_watchpoint (%s, %s, %d, %s) = %ld\n",
++		      core_addr_to_string (addr), plongest (len), type,
+ 		      host_address_to_string (cond), (unsigned long) retval);
+   return retval;
+ }
+ 
+ static int
+-debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type,
++debug_to_remove_watchpoint (CORE_ADDR addr, LONGEST len, int type,
+ 			    struct expression *cond)
+ {
+   int retval;
+@@ -4377,8 +4379,8 @@ debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type,
+   retval = debug_target.to_remove_watchpoint (addr, len, type, cond);
+ 
+   fprintf_unfiltered (gdb_stdlog,
+-		      "target_remove_watchpoint (%s, %d, %d, %s) = %ld\n",
+-		      core_addr_to_string (addr), len, type,
++		      "target_remove_watchpoint (%s, %s, %d, %s) = %ld\n",
++		      core_addr_to_string (addr), plongest (len), type,
+ 		      host_address_to_string (cond), (unsigned long) retval);
+   return retval;
+ }
+diff --git a/gdb/target.h b/gdb/target.h
+index 69228e1..4b52d53 100644
+--- a/gdb/target.h
++++ b/gdb/target.h
+@@ -466,8 +466,8 @@ struct target_ops
+ 
+     /* Documentation of what the two routines below are expected to do is
+        provided with the corresponding target_* macros.  */
+-    int (*to_remove_watchpoint) (CORE_ADDR, int, int, struct expression *);
+-    int (*to_insert_watchpoint) (CORE_ADDR, int, int, struct expression *);
++    int (*to_remove_watchpoint) (CORE_ADDR, LONGEST, int, struct expression *);
++    int (*to_insert_watchpoint) (CORE_ADDR, LONGEST, int, struct expression *);
+ 
+     int (*to_insert_mask_watchpoint) (struct target_ops *,
+ 				      CORE_ADDR, CORE_ADDR, int);
+@@ -478,13 +478,13 @@ struct target_ops
+     int to_have_continuable_watchpoint;
+     int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
+     int (*to_watchpoint_addr_within_range) (struct target_ops *,
+-					    CORE_ADDR, CORE_ADDR, int);
++					    CORE_ADDR, CORE_ADDR, LONGEST);
+ 
+     /* Documentation of this routine is provided with the corresponding
+        target_* macro.  */
+     int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, LONGEST);
+ 
+-    int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
++    int (*to_can_accel_watchpoint_condition) (CORE_ADDR, LONGEST, int,
+ 					      struct expression *);
+     int (*to_masked_watch_num_registers) (struct target_ops *,
+ 					  CORE_ADDR, CORE_ADDR);
+
+--MP_/6HRlH6vpyqtSy4CYyMrX6b2--
+

diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch
new file mode 100644
index 0000000..91f6ad5
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-23of25.patch
@@ -0,0 +1,1324 @@
+http://sourceware.org/ml/gdb-patches/2012-09/msg00630.html
+Subject: [PATCH 4/4] Bitpos expansion - tdep changes
+
+
+--MP_/X_WjDOvz/B_fvlsrmCwRdxe
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+Hi,
+
+This is the last part of the bitpos change.  This patch does the same
+thing that patch 1/4 does, except that it does so in the *-tdep files
+wherever necessary.  I separated these changes mainly because they are
+related and can be reviewed independently.  Tested on Fedora 16 x86_64.
+
+Regards,
+Siddhesh
+
+--MP_/X_WjDOvz/B_fvlsrmCwRdxe
+Content-Type: text/plain
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename=ChangeLog-tdep
+
+gdb/ChangeLog
+
+	* alpha-tdep.c (alpha_push_dummy_call): Expand ACCUMULATE_SIZE,
+	REQUIRED_ARG_REGS, OFFSET, LEN, TLEN to ssize_t.
+	(struct alpha_arg): Expand members LEN, OFFSET to ssize_t.
+	* amd64-tdep.c (amd64_push_arguments): Expand NUM_ELEMENTS,
+	ELEMENT and LEN to LONGEST.
+	(amd64_return_value): Expand LEN to LONGEST.
+	* amd64-windows-tdep.c (amd64_windows_return_value): Expand LEN
+	to LONGEST.
+	* arm-tdep.c (arm_vfp_cprc_sub_candidate): Return LONGEST.
+	Expand COUNT, SUB_COUNT to LONGEST.
+	(arm_vfp_call_candidate): Expand C to LONGEST.
+	(arm_push_dummy_call): Expand LEN to LONGEST.
+	* avr-tdep.c (struct stack_item): Expand member LEN to ssize_t.
+	(push_stack_item): Expand parameter LEN to ssize_t.
+	(avr_push_dummy_call): Expand LAST_REGNUM, J, LEN to ssize_t.
+	* bfin-tdep.c (bfin_push_dummy_call): Expand TOTAL_LEN,
+	CONTAINER_LEN to ssize_t.
+	* cris-tdep.c (struct stack_item): Expand member LEN to ssize_t.
+	(push_stack_item): Expand parameter LEN to ssize_t.
+	(cris_push_dummy_call): Expand LEN, REG_DEMAND, I to ssize_t.
+	* h8300-tdep.c (h8300_push_dummy_call): Expand STACK_ALLOC,
+	STACK_OFFSET to LONGEST.  Expand LEN, PADDED_LEN, OFFSET to
+	ssize_t.
+	* hppa-tdep.c (hppa64_push_dummy_call): Expand LEN to LONGEST.
+	(hppa64_return_value): Likewise.
+	* i386-darwin-tdep.c (i386_darwin_push_dummy_call): Expand
+	ARGS_SPACE to LONGEST.
+	* i386-tdep.c (i386_push_dummy_call): Expand ARG_SPACE,
+	ARG_SPACE_USED, LEN to LONGEST.
+	(i386_reg_struct_return_p): Expand LEN to LONGEST.
+	(i386_convert_register_p): Likewise.
+	(i386_register_to_value): Likewise.
+	(i386_value_to_register): Likewise.
+	* ia64-tdep.c (ia64_push_dummy_call): Expand ARGOFFSET, LEN,
+	NSLOTS, MEMSLOTS to LONGEST.
+	* iq2000-tdep.c (iq2000_push_dummy_call): Expand TYPELEN,
+	STACKSPACE to LONGEST.
+	* m32r-tdep.c (m32r_push_dummy_call): Expand LEN to LONGEST.
+	* m68k-tdep.c (m68k_reg_struct_return_p): Expand LEN to LONGEST.
+	(m68k_push_dummy_call): Expand LEN, CONTAINER_LEN, OFFSET to
+	LONGEST.
+	* m88k-tdep.c (m88k_store_arguments): Expand NUM_STACK_WORDS,
+	LEN, STACK_WORD to LONGEST.
+	* mep-tdep.c (push_large_arguments): Expand ARG_LEN to ULONGEST.
+	* microblaze-tdep.c (microblaze_store_return_value): Expand LEN to
+	LONGEST.
+	* mips-tdep.c (mips_xfer_register): Expand parameter BUF_OFFSET to
+	LONGEST.  Use plongest to format print BUF_OFFSET.
+	(mips_eabi_push_dummy_call): Expand LEN to LONGEST.  Use plongest
+	to format print LEN.
+	(mips_n32n64_fp_arg_chunk_p): Expand parameter OFFSET to LONGEST.
+	Expand POS to LONGEST.
+	(mips_n32n64_push_dummy_call): Expand LEN to LONGEST.
+	(mips_n32n64_return_value): Expand OFFSET to LONGEST.  Use
+	plongest to format print OFFSET.
+	(mips_o32_push_dummy_call): Expand LEN to LONGEST.  Use plongest
+	to format print LEN.
+	(mips_o64_push_dummy_call): Expand LEN, STACK_OFFSET to LONGEST.
+	Use plongest to format print LEN.
+	* mn10300-tdep.c (mn10300_push_dummy_call): Expand LEN to
+	LONGEST.
+	* mt-tdep.c (mt_push_dummy_call): Expand STACK_DEST, TYPELEN to
+	LONGEST.
+	* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Expand
+	ARGSPACE, ARGOFFSET, STRUCTOFFSET, LEN, to LONGEST.
+	(ppc64_sysv_abi_push_dummy_call): Expand BYTE, LEN to ssize_t.
+	* rl78-tdep.c (rl78_push_dummy_call): Expand LEN, CONTAINER_LEN
+	to LONGEST.
+	* rs6000-aix-tdep.c (rs6000_push_dummy_call): Expand ARGBYTES,
+	LEN to LONGEST.
+	(ran_out_of_registers_for_arguments): Expand SPACE, JJ to
+	LONGEST.
+	* s390-tdep.c (s390_value_from_register): Expand LEN to LONGEST.
+	(is_power_of_two): Expand parameter N to ULONGEST.
+	(s390_push_dummy_call): Expand LENGTH to ULONGEST.
+	* score-tdep.c (score_push_dummy_call): Expand ARGLEN to
+	LONGEST.
+	* sh-tdep.c (sh_use_struct_convention) Expand len to LONGEST.
+	(sh_justify_value_in_reg): Expand parameter LEN to LONGEST.
+	(sh_push_dummy_call_fpu): Expand LEN to LONGEST.  Expand REG_SIZE
+	to ssize_t.
+	(sh_push_dummy_call_nofpu): Likewise.
+	* sh64-tdep.c (sh64_push_dummy_call): Expand STACK_OFFSET,
+	STACK_ALLOC, LEN to LONGEST.
+	* sparc-tdep.c (sparc32_store_arguments): Expand LEN to LONGEST.
+	* sparc64-tdep.c (sparc64_store_floating_fields): Expand
+	parameter BITPOS to LONGEST.  Expand SUBPOS to LONGEST.
+	(sparc64_extract_floating_fields): Likewise.
+	(sparc64_store_arguments): Expand LEN to LONGEST.
+	* spu-tdep.c (spu_push_dummy_call): Expand N_REGS, LEN to LONGEST.
+	(spu_value_from_register): Expand LEN to LONGEST.
+	* tic6x-tdep.c (tic6x_push_dummy_call): Expand REFERENCES_OFFST,
+	LEN to LONGEST.  Expand LEN to ssize_t.  Use plongest to format
+	print LEN.
+	* tilegx-tdep.c (tilegx_push_dummy_call): Expand TYPELEN,
+	SLACKLEN, ALIGNLEN to LONGEST.
+	* v850-tdep.c (v850_push_dummy_call): Expand LEN to LONGEST.
+	* vax-tdep.c (vax_store_arguments): Expand COUNT, LEN to LONGEST.
+	(vax_return_value): Expand LEN to LONGEST.
+	* xstormy16-tdep.c (xstormy16_push_dummy_call): Expand J, TYPELEN
+	to LONGEST.
+	* xtensa-tdep.c (xtensa_store_return_value): Print LEN instead of
+	TYPE_LENGTH..
+	(struct argument_info): Expoand member LENGTH to ssize_t.
+	(struct argument_info.u): Expand member OFFSET to ssize_t.
+	(xtensa_push_dummy_call): Expand SIZE, ONSTACK_SIZE to LONGEST.
+	Expand N to ssize_t.  Use pulongest to format print TYPE_LENGTH.
+
+--MP_/X_WjDOvz/B_fvlsrmCwRdxe
+Content-Type: text/x-patch
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment; filename=bitpos-tdep.patch
+
+Index: gdb-7.5.0.20120926/gdb/alpha-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/alpha-tdep.c	2012-11-07 22:46:00.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/alpha-tdep.c	2012-11-07 22:47:57.371984929 +0100
+@@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *g
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   int i;
+-  int accumulate_size = struct_return ? 8 : 0;
++  ssize_t accumulate_size = struct_return ? 8 : 0;
+   struct alpha_arg
+     {
+       const gdb_byte *contents;
+-      int len;
+-      int offset;
++      ssize_t len;
++      ssize_t offset;
+     };
+   struct alpha_arg *alpha_args
+     = (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg));
+   struct alpha_arg *m_arg;
+   gdb_byte arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS];
+-  int required_arg_regs;
++  ssize_t required_arg_regs;
+   CORE_ADDR func_addr = find_function_addr (function, NULL);
+ 
+   /* The ABI places the address of the called function in T12.  */
+@@ -430,8 +430,8 @@ alpha_push_dummy_call (struct gdbarch *g
+   for (i = nargs; m_arg--, --i >= 0;)
+     {
+       const gdb_byte *contents = m_arg->contents;
+-      int offset = m_arg->offset;
+-      int len = m_arg->len;
++      ssize_t offset = m_arg->offset;
++      ssize_t len = m_arg->len;
+ 
+       /* Copy the bytes destined for registers into arg_reg_buffer.  */
+       if (offset < sizeof(arg_reg_buffer))
+@@ -443,7 +443,7 @@ alpha_push_dummy_call (struct gdbarch *g
+ 	    }
+ 	  else
+ 	    {
+-	      int tlen = sizeof(arg_reg_buffer) - offset;
++	      ssize_t tlen = sizeof(arg_reg_buffer) - offset;
+ 	      memcpy (arg_reg_buffer + offset, contents, tlen);
+ 	      offset += tlen;
+ 	      contents += tlen;
+Index: gdb-7.5.0.20120926/gdb/amd64-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/amd64-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/amd64-tdep.c	2012-11-07 22:47:57.374984923 +0100
+@@ -599,7 +599,7 @@ amd64_return_value (struct gdbarch *gdba
+ {
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+   enum amd64_reg_class class[2];
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+   static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
+   static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
+   int integer_reg = 0;
+@@ -728,8 +728,8 @@ amd64_push_arguments (struct regcache *r
+      that register number (or a negative value otherwise).  */
+   int *arg_addr_regno = alloca (nargs * sizeof (int));
+   int num_stack_args = 0;
+-  int num_elements = 0;
+-  int element = 0;
++  LONGEST num_elements = 0;
++  LONGEST element = 0;
+   int integer_reg = 0;
+   int sse_reg = 0;
+   int i;
+@@ -743,7 +743,7 @@ amd64_push_arguments (struct regcache *r
+   for (i = 0; i < nargs; i++)
+     {
+       struct type *type = value_type (args[i]);
+-      int len = TYPE_LENGTH (type);
++      LONGEST len = TYPE_LENGTH (type);
+       enum amd64_reg_class class[2];
+       int needed_integer_regs = 0;
+       int needed_sse_regs = 0;
+Index: gdb-7.5.0.20120926/gdb/amd64-windows-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/amd64-windows-tdep.c	2012-06-05 15:50:57.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/amd64-windows-tdep.c	2012-11-07 22:47:57.413984867 +0100
+@@ -78,7 +78,7 @@ amd64_windows_return_value (struct gdbar
+ 			    struct type *type, struct regcache *regcache,
+ 			    gdb_byte *readbuf, const gdb_byte *writebuf)
+ {
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+   int regnum = -1;
+ 
+   /* See if our value is returned through a register.  If it is, then
+Index: gdb-7.5.0.20120926/gdb/arm-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/arm-tdep.c	2012-06-25 14:32:45.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/arm-tdep.c	2012-11-07 22:47:57.422984855 +0100
+@@ -3377,7 +3377,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc
+    array).  Vectors and complex types are not currently supported,
+    matching the generic AAPCS support.  */
+ 
+-static int
++static LONGEST
+ arm_vfp_cprc_sub_candidate (struct type *t,
+ 			    enum arm_vfp_cprc_base_type *base_type)
+ {
+@@ -3408,7 +3408,7 @@ arm_vfp_cprc_sub_candidate (struct type
+ 
+     case TYPE_CODE_ARRAY:
+       {
+-	int count;
++	LONGEST count;
+ 	unsigned unitlen;
+ 	count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type);
+ 	if (count == -1)
+@@ -3428,13 +3428,15 @@ arm_vfp_cprc_sub_candidate (struct type
+ 
+     case TYPE_CODE_STRUCT:
+       {
+-	int count = 0;
++	LONGEST count = 0;
+ 	unsigned unitlen;
+ 	int i;
+ 	for (i = 0; i < TYPE_NFIELDS (t); i++)
+ 	  {
+-	    int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
+-							base_type);
++	    LONGEST sub_count;
++
++	    sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
++						    base_type);
+ 	    if (sub_count == -1)
+ 	      return -1;
+ 	    count += sub_count;
+@@ -3454,13 +3456,15 @@ arm_vfp_cprc_sub_candidate (struct type
+ 
+     case TYPE_CODE_UNION:
+       {
+-	int count = 0;
++	LONGEST count = 0;
+ 	unsigned unitlen;
+ 	int i;
+ 	for (i = 0; i < TYPE_NFIELDS (t); i++)
+ 	  {
+-	    int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
+-							base_type);
++	    LONGEST sub_count;
++
++	    sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i),
++						    base_type);
+ 	    if (sub_count == -1)
+ 	      return -1;
+ 	    count = (count > sub_count ? count : sub_count);
+@@ -3496,7 +3500,7 @@ arm_vfp_call_candidate (struct type *t,
+ 			int *count)
+ {
+   enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN;
+-  int c = arm_vfp_cprc_sub_candidate (t, &b);
++  LONGEST c = arm_vfp_cprc_sub_candidate (t, &b);
+   if (c <= 0 || c > 4)
+     return 0;
+   *base_type = b;
+@@ -3577,7 +3581,7 @@ arm_push_dummy_call (struct gdbarch *gdb
+ 
+   for (argnum = 0; argnum < nargs; argnum++)
+     {
+-      int len;
++      LONGEST len;
+       struct type *arg_type;
+       struct type *target_type;
+       enum type_code typecode;
+Index: gdb-7.5.0.20120926/gdb/avr-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/avr-tdep.c	2012-05-18 23:02:47.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/avr-tdep.c	2012-11-07 22:47:57.444984823 +0100
+@@ -1170,13 +1170,14 @@ avr_dummy_id (struct gdbarch *gdbarch, s
+ 
+ struct stack_item
+ {
+-  int len;
++  ssize_t len;
+   struct stack_item *prev;
+   void *data;
+ };
+ 
+ static struct stack_item *
+-push_stack_item (struct stack_item *prev, const bfd_byte *contents, int len)
++push_stack_item (struct stack_item *prev, const bfd_byte *contents,
++		 ssize_t len)
+ {
+   struct stack_item *si;
+   si = xmalloc (sizeof (struct stack_item));
+@@ -1265,12 +1266,12 @@ avr_push_dummy_call (struct gdbarch *gdb
+ 
+   for (i = 0; i < nargs; i++)
+     {
+-      int last_regnum;
+-      int j;
++      ssize_t last_regnum;
++      ssize_t j;
+       struct value *arg = args[i];
+       struct type *type = check_typedef (value_type (arg));
+       const bfd_byte *contents = value_contents (arg);
+-      int len = TYPE_LENGTH (type);
++      ssize_t len = TYPE_LENGTH (type);
+ 
+       /* Calculate the potential last register needed.  */
+       last_regnum = regnum - (len + (len & 1));
+Index: gdb-7.5.0.20120926/gdb/bfin-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/bfin-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/bfin-tdep.c	2012-11-07 22:47:57.450984814 +0100
+@@ -506,7 +506,7 @@ bfin_push_dummy_call (struct gdbarch *gd
+   char buf[4];
+   int i;
+   long reg_r0, reg_r1, reg_r2;
+-  int total_len = 0;
++  ssize_t total_len = 0;
+   enum bfin_abi abi = bfin_abi (gdbarch);
+   CORE_ADDR func_addr = find_function_addr (function, NULL);
+ 
+@@ -530,7 +530,7 @@ bfin_push_dummy_call (struct gdbarch *gd
+     {
+       struct type *value_type = value_enclosing_type (args[i]);
+       struct type *arg_type = check_typedef (value_type);
+-      int container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
++      ssize_t container_len = (TYPE_LENGTH (value_type) + 3) & ~3;
+ 
+       sp -= container_len;
+       write_memory (sp, value_contents_writeable (args[i]), container_len);
+Index: gdb-7.5.0.20120926/gdb/cris-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/cris-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/cris-tdep.c	2012-11-07 22:47:57.453984810 +0100
+@@ -670,13 +670,13 @@ static CORE_ADDR cris_unwind_sp (struct
+ 
+ struct stack_item
+ {
+-  int len;
++  ssize_t len;
+   struct stack_item *prev;
+   void *data;
+ };
+ 
+ static struct stack_item *
+-push_stack_item (struct stack_item *prev, void *contents, int len)
++push_stack_item (struct stack_item *prev, void *contents, ssize_t len)
+ {
+   struct stack_item *si;
+   si = xmalloc (sizeof (struct stack_item));
+@@ -849,13 +849,13 @@ cris_push_dummy_call (struct gdbarch *gd
+ 
+   for (argnum = 0; argnum < nargs; argnum++)
+     {
+-      int len;
++      ssize_t len;
+       char *val;
+-      int reg_demand;
+-      int i;
++      ssize_t reg_demand;
++      ssize_t i;
+       
+-      len = TYPE_LENGTH (value_type (args[argnum]));
+       val = (char *) value_contents (args[argnum]);
++      len = TYPE_LENGTH (value_type (args[argnum]));
+       
+       /* How may registers worth of storage do we need for this argument?  */
+       reg_demand = (len / 4) + (len % 4 != 0 ? 1 : 0);
+Index: gdb-7.5.0.20120926/gdb/h8300-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/h8300-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/h8300-tdep.c	2012-11-07 22:47:57.456984806 +0100
+@@ -641,7 +641,7 @@ h8300_push_dummy_call (struct gdbarch *g
+ 		       int struct_return, CORE_ADDR struct_addr)
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+-  int stack_alloc = 0, stack_offset = 0;
++  LONGEST stack_alloc = 0, stack_offset = 0;
+   int wordsize = BINWORD (gdbarch);
+   int reg = E_ARG0_REGNUM;
+   int argument;
+@@ -668,11 +668,11 @@ h8300_push_dummy_call (struct gdbarch *g
+     {
+       struct cleanup *back_to;
+       struct type *type = value_type (args[argument]);
+-      int len = TYPE_LENGTH (type);
+       char *contents = (char *) value_contents (args[argument]);
++      ssize_t len = TYPE_LENGTH (type);
+ 
+       /* Pad the argument appropriately.  */
+-      int padded_len = align_up (len, wordsize);
++      ssize_t padded_len = align_up (len, wordsize);
+       gdb_byte *padded = xmalloc (padded_len);
+       back_to = make_cleanup (xfree, padded);
+ 
+@@ -701,7 +701,7 @@ h8300_push_dummy_call (struct gdbarch *g
+ 	      /* Heavens to Betsy --- it's really going in registers!
+ 	         Note that on the h8/300s, there are gaps between the
+ 	         registers in the register file.  */
+-	      int offset;
++	      ssize_t offset;
+ 
+ 	      for (offset = 0; offset < padded_len; offset += wordsize)
+ 		{
+Index: gdb-7.5.0.20120926/gdb/hppa-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/hppa-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/hppa-tdep.c	2012-11-07 22:48:31.378936083 +0100
+@@ -962,7 +962,7 @@ hppa64_push_dummy_call (struct gdbarch *
+     {
+       struct value *arg = args[i];
+       struct type *type = value_type (arg);
+-      int len = TYPE_LENGTH (type);
++      LONGEST len = TYPE_LENGTH (type);
+       const bfd_byte *valbuf;
+       bfd_byte fptrbuf[8];
+       int regnum;
+@@ -1157,7 +1157,7 @@ hppa64_return_value (struct gdbarch *gdb
+ 		     struct type *type, struct regcache *regcache,
+ 		     gdb_byte *readbuf, const gdb_byte *writebuf)
+ {
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+   int regnum, offset;
+ 
+   if (TYPE_LENGTH (type) > 16)
+Index: gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/i386-darwin-tdep.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/i386-darwin-tdep.c	2012-11-07 22:47:57.470984786 +0100
+@@ -166,7 +166,7 @@ i386_darwin_push_dummy_call (struct gdba
+ 
+   for (write_pass = 0; write_pass < 2; write_pass++)
+     {
+-      int args_space = 0;
++      LONGEST args_space = 0;
+       int num_m128 = 0;
+ 
+       if (struct_return)
+Index: gdb-7.5.0.20120926/gdb/i386-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/i386-tdep.c	2012-11-07 22:00:42.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/i386-tdep.c	2012-11-07 22:47:57.474984780 +0100
+@@ -2358,7 +2358,7 @@ i386_push_dummy_call (struct gdbarch *gd
+   gdb_byte buf[4];
+   int i;
+   int write_pass;
+-  int args_space = 0;
++  LONGEST args_space = 0;
+ 
+   /* Determine the total space required for arguments and struct
+      return address in a first pass (allowing for 16-byte-aligned
+@@ -2366,7 +2366,7 @@ i386_push_dummy_call (struct gdbarch *gd
+ 
+   for (write_pass = 0; write_pass < 2; write_pass++)
+     {
+-      int args_space_used = 0;
++      LONGEST args_space_used = 0;
+ 
+       if (struct_return)
+ 	{
+@@ -2383,7 +2383,7 @@ i386_push_dummy_call (struct gdbarch *gd
+ 
+       for (i = 0; i < nargs; i++)
+ 	{
+-	  int len = TYPE_LENGTH (value_enclosing_type (args[i]));
++	  LONGEST len = TYPE_LENGTH (value_enclosing_type (args[i]));
+ 
+ 	  if (write_pass)
+ 	    {
+@@ -2590,7 +2590,7 @@ i386_reg_struct_return_p (struct gdbarch
+ {
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+   enum type_code code = TYPE_CODE (type);
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+ 
+   gdb_assert (code == TYPE_CODE_STRUCT
+               || code == TYPE_CODE_UNION
+@@ -3042,7 +3042,7 @@ static int
+ i386_convert_register_p (struct gdbarch *gdbarch,
+ 			 int regnum, struct type *type)
+ {
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+ 
+   /* Values may be spread across multiple registers.  Most debugging
+      formats aren't expressive enough to specify the locations, so
+@@ -3075,7 +3075,7 @@ i386_register_to_value (struct frame_inf
+ 			int *optimizedp, int *unavailablep)
+ {
+   struct gdbarch *gdbarch = get_frame_arch (frame);
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+ 
+   if (i386_fp_regnum_p (gdbarch, regnum))
+     return i387_register_to_value (frame, regnum, type, to,
+@@ -3111,7 +3111,7 @@ static void
+ i386_value_to_register (struct frame_info *frame, int regnum,
+ 			struct type *type, const gdb_byte *from)
+ {
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+ 
+   if (i386_fp_regnum_p (get_frame_arch (frame), regnum))
+     {
+Index: gdb-7.5.0.20120926/gdb/ia64-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ia64-tdep.c	2012-11-07 22:00:42.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/ia64-tdep.c	2012-11-07 22:47:57.491984756 +0100
+@@ -3974,8 +3974,10 @@ ia64_push_dummy_call (struct gdbarch *gd
+   int argno;
+   struct value *arg;
+   struct type *type;
+-  int len, argoffset;
+-  int nslots, rseslots, memslots, slotnum, nfuncargs;
++  LONGEST argoffset;
++  LONGEST len;
++  int rseslots, slotnum, nfuncargs;
++  LONGEST nslots, memslots;
+   int floatreg;
+   ULONGEST bsp;
+   CORE_ADDR funcdescaddr, pc, global_pointer;
+Index: gdb-7.5.0.20120926/gdb/iq2000-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/iq2000-tdep.c	2012-05-16 16:35:06.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/iq2000-tdep.c	2012-11-07 22:47:57.509984729 +0100
+@@ -655,8 +655,9 @@ iq2000_push_dummy_call (struct gdbarch *
+   const bfd_byte *val;
+   bfd_byte buf[4];
+   struct type *type;
+-  int i, argreg, typelen, slacklen;
+-  int stackspace = 0;
++  int i, argreg, slacklen;
++  LONGEST typelen;
++  LONGEST stackspace = 0;
+   /* Used to copy struct arguments into the stack.  */
+   CORE_ADDR struct_ptr;
+ 
+Index: gdb-7.5.0.20120926/gdb/m32r-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m32r-tdep.c	2012-05-18 23:02:49.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/m32r-tdep.c	2012-11-07 22:47:57.516984719 +0100
+@@ -696,7 +696,7 @@ m32r_push_dummy_call (struct gdbarch *gd
+   CORE_ADDR regval;
+   gdb_byte *val;
+   gdb_byte valbuf[MAX_REGISTER_SIZE];
+-  int len;
++  LONGEST len;
+ 
+   /* First force sp to a 4-byte alignment.  */
+   sp = sp & ~3;
+Index: gdb-7.5.0.20120926/gdb/m68k-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m68k-tdep.c	2012-11-07 22:02:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/m68k-tdep.c	2012-11-07 22:49:45.881829032 +0100
+@@ -384,7 +384,7 @@ m68k_reg_struct_return_p (struct gdbarch
+ {
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+   enum type_code code = TYPE_CODE (type);
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+ 
+   gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION);
+ 
+@@ -513,9 +513,9 @@ m68k_push_dummy_call (struct gdbarch *gd
+   for (i = nargs - 1; i >= 0; i--)
+     {
+       struct type *value_type = value_enclosing_type (args[i]);
+-      int len = TYPE_LENGTH (value_type);
+-      int container_len = (len + 3) & ~3;
+-      int offset;
++      LONGEST len = TYPE_LENGTH (value_type);
++      LONGEST container_len = (len + 3) & ~3;
++      LONGEST offset;
+ 
+       /* Non-scalars bigger than 4 bytes are left aligned, others are
+ 	 right aligned.  */
+Index: gdb-7.5.0.20120926/gdb/m88k-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/m88k-tdep.c	2012-05-16 16:35:06.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/m88k-tdep.c	2012-11-07 22:47:57.520984714 +0100
+@@ -260,13 +260,13 @@ m88k_store_arguments (struct regcache *r
+ {
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   int num_register_words = 0;
+-  int num_stack_words = 0;
++  LONGEST num_stack_words = 0;
+   int i;
+ 
+   for (i = 0; i < nargs; i++)
+     {
+       struct type *type = value_type (args[i]);
+-      int len = TYPE_LENGTH (type);
++      LONGEST len = TYPE_LENGTH (type);
+ 
+       if (m88k_integral_or_pointer_p (type) && len < 4)
+ 	{
+@@ -308,8 +308,8 @@ m88k_store_arguments (struct regcache *r
+     {
+       const bfd_byte *valbuf = value_contents (args[i]);
+       struct type *type = value_type (args[i]);
+-      int len = TYPE_LENGTH (type);
+-      int stack_word = num_stack_words;
++      LONGEST len = TYPE_LENGTH (type);
++      LONGEST stack_word = num_stack_words;
+ 
+       if (m88k_in_register_p (type))
+ 	{
+Index: gdb-7.5.0.20120926/gdb/mep-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/mep-tdep.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/mep-tdep.c	2012-11-07 22:47:57.522984712 +0100
+@@ -2279,7 +2279,7 @@ push_large_arguments (CORE_ADDR sp, int
+ 
+   for (i = 0; i < argc; i++)
+     {
+-      unsigned arg_len = TYPE_LENGTH (value_type (argv[i]));
++      ULONGEST arg_len = TYPE_LENGTH (value_type (argv[i]));
+ 
+       if (arg_len > MEP_GPR_SIZE)
+         {
+Index: gdb-7.5.0.20120926/gdb/mips-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/mips-tdep.c	2012-11-07 22:02:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/mips-tdep.c	2012-11-07 22:47:57.534984694 +0100
+@@ -396,7 +396,7 @@ static void
+ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
+ 		    int reg_num, int length,
+ 		    enum bfd_endian endian, gdb_byte *in,
+-		    const gdb_byte *out, int buf_offset)
++		    const gdb_byte *out, LONGEST buf_offset)
+ {
+   int reg_offset = 0;
+ 
+@@ -419,8 +419,8 @@ mips_xfer_register (struct gdbarch *gdba
+     }
+   if (mips_debug)
+     fprintf_unfiltered (gdb_stderr,
+-			"xfer $%d, reg offset %d, buf offset %d, length %d, ",
+-			reg_num, reg_offset, buf_offset, length);
++			"xfer $%d, reg offset %d, buf offset %s, length %d, ",
++			reg_num, reg_offset, plongest (buf_offset), length);
+   if (mips_debug && out != NULL)
+     {
+       int i;
+@@ -4295,13 +4295,13 @@ mips_eabi_push_dummy_call (struct gdbarc
+       gdb_byte valbuf[MAX_REGISTER_SIZE];
+       struct value *arg = args[argnum];
+       struct type *arg_type = check_typedef (value_type (arg));
+-      int len = TYPE_LENGTH (arg_type);
++      LONGEST len = TYPE_LENGTH (arg_type);
+       enum type_code typecode = TYPE_CODE (arg_type);
+ 
+       if (mips_debug)
+ 	fprintf_unfiltered (gdb_stdlog,
+-			    "mips_eabi_push_dummy_call: %d len=%d type=%d",
+-			    argnum + 1, len, (int) typecode);
++			    "mips_eabi_push_dummy_call: %d len=%s type=%d",
++			    argnum + 1, plongest (len), (int) typecode);
+ 
+       /* Function pointer arguments to mips16 code need to be made into
+          mips16 pointers.  */
+@@ -4586,7 +4586,7 @@ mips_eabi_return_value (struct gdbarch *
+ 
+ static int
+ mips_n32n64_fp_arg_chunk_p (struct gdbarch *gdbarch, struct type *arg_type,
+-			    int offset)
++			    LONGEST offset)
+ {
+   int i;
+ 
+@@ -4601,7 +4601,7 @@ mips_n32n64_fp_arg_chunk_p (struct gdbar
+ 
+   for (i = 0; i < TYPE_NFIELDS (arg_type); i++)
+     {
+-      int pos;
++      LONGEST pos;
+       struct type *field_type;
+ 
+       /* We're only looking at normal fields.  */
+@@ -4643,7 +4643,7 @@ mips_n32n64_push_dummy_call (struct gdba
+   int argreg;
+   int float_argreg;
+   int argnum;
+-  int len = 0;
++  LONGEST len = 0;
+   int stack_offset = 0;
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   CORE_ADDR func_addr = find_function_addr (function, NULL);
+@@ -4994,11 +4994,11 @@ mips_n32n64_return_value (struct gdbarch
+ 				: MIPS_V0_REGNUM);
+ 	   field < TYPE_NFIELDS (type); field++, regnum += 2)
+ 	{
+-	  int offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field])
+-			/ TARGET_CHAR_BIT);
++	  LONGEST offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field])
++			    / TARGET_CHAR_BIT);
+ 	  if (mips_debug)
+-	    fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n",
+-				offset);
++	    fprintf_unfiltered (gdb_stderr, "Return float struct+%s\n",
++				plongest (offset));
+ 	  if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)) == 16)
+ 	    {
+ 	      /* A 16-byte long double field goes in two consecutive
+@@ -5040,8 +5040,8 @@ mips_n32n64_return_value (struct gdbarch
+ 	  if (offset + xfer > TYPE_LENGTH (type))
+ 	    xfer = TYPE_LENGTH (type) - offset;
+ 	  if (mips_debug)
+-	    fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
+-				offset, xfer, regnum);
++	    fprintf_unfiltered (gdb_stderr, "Return struct+%s:%d in $%d\n",
++				plongest (offset), xfer, regnum);
+ 	  mips_xfer_register (gdbarch, regcache,
+ 			      gdbarch_num_regs (gdbarch) + regnum,
+ 			      xfer, BFD_ENDIAN_UNKNOWN, readbuf, writebuf,
+@@ -5099,7 +5099,7 @@ mips_o32_push_dummy_call (struct gdbarch
+   int argreg;
+   int float_argreg;
+   int argnum;
+-  int len = 0;
++  LONGEST len = 0;
+   int stack_offset = 0;
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   CORE_ADDR func_addr = find_function_addr (function, NULL);
+@@ -5163,13 +5163,13 @@ mips_o32_push_dummy_call (struct gdbarch
+       const gdb_byte *val;
+       struct value *arg = args[argnum];
+       struct type *arg_type = check_typedef (value_type (arg));
+-      int len = TYPE_LENGTH (arg_type);
++      LONGEST len = TYPE_LENGTH (arg_type);
+       enum type_code typecode = TYPE_CODE (arg_type);
+ 
+       if (mips_debug)
+ 	fprintf_unfiltered (gdb_stdlog,
+-			    "mips_o32_push_dummy_call: %d len=%d type=%d",
+-			    argnum + 1, len, (int) typecode);
++			    "mips_o32_push_dummy_call: %d len=%s type=%d",
++			    argnum + 1, plongest (len), (int) typecode);
+ 
+       val = value_contents (arg);
+ 
+@@ -5627,8 +5627,8 @@ mips_o64_push_dummy_call (struct gdbarch
+   int argreg;
+   int float_argreg;
+   int argnum;
+-  int len = 0;
+-  int stack_offset = 0;
++  LONGEST len = 0;
++  LONGEST stack_offset = 0;
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   CORE_ADDR func_addr = find_function_addr (function, NULL);
+ 
+@@ -5689,13 +5689,13 @@ mips_o64_push_dummy_call (struct gdbarch
+       gdb_byte valbuf[MAX_REGISTER_SIZE];
+       struct value *arg = args[argnum];
+       struct type *arg_type = check_typedef (value_type (arg));
+-      int len = TYPE_LENGTH (arg_type);
++      LONGEST len = TYPE_LENGTH (arg_type);
+       enum type_code typecode = TYPE_CODE (arg_type);
+ 
+       if (mips_debug)
+ 	fprintf_unfiltered (gdb_stdlog,
+-			    "mips_o64_push_dummy_call: %d len=%d type=%d",
+-			    argnum + 1, len, (int) typecode);
++			    "mips_o64_push_dummy_call: %d len=%s type=%d",
++			    argnum + 1, plongest (len), (int) typecode);
+ 
+       val = value_contents (arg);
+ 
+Index: gdb-7.5.0.20120926/gdb/mn10300-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/mn10300-tdep.c	2012-05-18 23:02:49.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/mn10300-tdep.c	2012-11-07 22:47:57.542984682 +0100
+@@ -1228,7 +1228,7 @@ mn10300_push_dummy_call (struct gdbarch
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   const int push_size = register_size (gdbarch, E_PC_REGNUM);
+   int regs_used;
+-  int len, arg_len; 
++  LONGEST len, arg_len;
+   int stack_offset = 0;
+   int argnum;
+   char *val, valbuf[MAX_REGISTER_SIZE];
+Index: gdb-7.5.0.20120926/gdb/mt-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/mt-tdep.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/mt-tdep.c	2012-11-07 22:47:57.544984680 +0100
+@@ -783,9 +783,9 @@ mt_push_dummy_call (struct gdbarch *gdba
+   gdb_byte buf[MT_MAX_STRUCT_SIZE];
+   int argreg = MT_1ST_ARGREG;
+   int split_param_len = 0;
+-  int stack_dest = sp;
++  LONGEST stack_dest = sp;
+   int slacklen;
+-  int typelen;
++  LONGEST typelen;
+   int i, j;
+ 
+   /* First handle however many args we can fit into MT_1ST_ARGREG thru
+Index: gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/ppc-sysv-tdep.c	2012-05-18 23:02:49.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/ppc-sysv-tdep.c	2012-11-07 22:47:57.551984669 +0100
+@@ -69,7 +69,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function));
+   ULONGEST saved_sp;
+-  int argspace = 0;		/* 0 is an initial wrong guess.  */
++  LONGEST argspace = 0;		/* 0 is an initial wrong guess.  */
+   int write_pass;
+ 
+   gdb_assert (tdep->wordsize == 4);
+@@ -100,9 +100,9 @@ ppc_sysv_abi_push_dummy_call (struct gdb
+       /* Next available vector register for vector arguments.  */
+       int vreg = 2;
+       /* Arguments start above the "LR save word" and "Back chain".  */
+-      int argoffset = 2 * tdep->wordsize;
++      LONGEST argoffset = 2 * tdep->wordsize;
+       /* Structures start after the arguments.  */
+-      int structoffset = argoffset + argspace;
++      LONGEST structoffset = argoffset + argspace;
+ 
+       /* If the function is returning a `struct', then the first word
+          (which will be passed in r3) is used for struct return
+@@ -121,7 +121,7 @@ ppc_sysv_abi_push_dummy_call (struct gdb
+ 	{
+ 	  struct value *arg = args[argno];
+ 	  struct type *type = check_typedef (value_type (arg));
+-	  int len = TYPE_LENGTH (type);
++	  ssize_t len = TYPE_LENGTH (type);
+ 	  const bfd_byte *val = value_contents (arg);
+ 
+ 	  if (TYPE_CODE (type) == TYPE_CODE_FLT && len <= 8
+@@ -1557,14 +1557,14 @@ ppc64_sysv_abi_push_dummy_call (struct g
+ 	    }
+ 	  else
+ 	    {
+-	      int byte;
++	      ssize_t byte;
+ 	      for (byte = 0; byte < TYPE_LENGTH (type);
+ 		   byte += tdep->wordsize)
+ 		{
+ 		  if (write_pass && greg <= 10)
+ 		    {
+ 		      gdb_byte regval[MAX_REGISTER_SIZE];
+-		      int len = TYPE_LENGTH (type) - byte;
++		      ssize_t len = TYPE_LENGTH (type) - byte;
+ 		      if (len > tdep->wordsize)
+ 			len = tdep->wordsize;
+ 		      memset (regval, 0, sizeof regval);
+@@ -1592,7 +1592,7 @@ ppc64_sysv_abi_push_dummy_call (struct g
+ 		     register.  Work around this by always writing the
+ 		     value to memory.  Fortunately, doing this
+ 		     simplifies the code.  */
+-		  int len = TYPE_LENGTH (type);
++		  ssize_t len = TYPE_LENGTH (type);
+ 		  if (len < tdep->wordsize)
+ 		    write_memory (gparam + tdep->wordsize - len, val, len);
+ 		  else
+Index: gdb-7.5.0.20120926/gdb/rl78-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/rl78-tdep.c	2012-05-18 23:02:50.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/rl78-tdep.c	2012-11-07 22:47:57.557984660 +0100
+@@ -1019,8 +1019,8 @@ rl78_push_dummy_call (struct gdbarch *gd
+   for (i = nargs - 1; i >= 0; i--)
+     {
+       struct type *value_type = value_enclosing_type (args[i]);
+-      int len = TYPE_LENGTH (value_type);
+-      int container_len = (len + 1) & ~1;
++      LONGEST len = TYPE_LENGTH (value_type);
++      LONGEST container_len = (len + 1) & ~1;
+ 
+       sp -= container_len;
+       write_memory (rl78_make_data_address (sp),
+Index: gdb-7.5.0.20120926/gdb/rs6000-aix-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/rs6000-aix-tdep.c	2012-05-18 23:02:50.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/rs6000-aix-tdep.c	2012-11-07 22:47:57.560984657 +0100
+@@ -197,9 +197,9 @@ rs6000_push_dummy_call (struct gdbarch *
+   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   int ii;
+-  int len = 0;
++  LONGEST len = 0;
+   int argno;			/* current argument number */
+-  int argbytes;			/* current argument byte */
++  LONGEST argbytes;		/* current argument byte */
+   gdb_byte tmp_buffer[50];
+   int f_argno = 0;		/* current floating point argno */
+   int wordsize = gdbarch_tdep (gdbarch)->wordsize;
+@@ -327,7 +327,7 @@ ran_out_of_registers_for_arguments:
+ 
+   if ((argno < nargs) || argbytes)
+     {
+-      int space = 0, jj;
++      LONGEST space = 0, jj;
+ 
+       if (argbytes)
+ 	{
+Index: gdb-7.5.0.20120926/gdb/s390-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/s390-tdep.c	2012-11-07 22:03:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/s390-tdep.c	2012-11-07 22:47:57.569984644 +0100
+@@ -2481,7 +2481,7 @@ is_float_like (struct type *type)
+ 
+ 
+ static int
+-is_power_of_two (unsigned int n)
++is_power_of_two (ULONGEST n)
+ {
+   return ((n & (n - 1)) == 0);
+ }
+@@ -2667,7 +2667,7 @@ s390_push_dummy_call (struct gdbarch *gd
+       {
+         struct value *arg = args[i];
+         struct type *type = check_typedef (value_type (arg));
+-        unsigned length = TYPE_LENGTH (type);
++        ULONGEST length = TYPE_LENGTH (type);
+ 
+ 	if (s390_function_arg_pass_by_reference (type))
+ 	  {
+Index: gdb-7.5.0.20120926/gdb/score-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/score-tdep.c	2012-05-18 23:02:50.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/score-tdep.c	2012-11-07 22:47:57.571984640 +0100
+@@ -515,7 +515,7 @@ score_push_dummy_call (struct gdbarch *g
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   int argnum;
+   int argreg;
+-  int arglen = 0;
++  LONGEST arglen = 0;
+   CORE_ADDR stack_offset = 0;
+   CORE_ADDR addr = 0;
+ 
+Index: gdb-7.5.0.20120926/gdb/sh-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/sh-tdep.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/sh-tdep.c	2012-11-07 22:47:57.579984628 +0100
+@@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarc
+ static int
+ sh_use_struct_convention (int renesas_abi, struct type *type)
+ {
+-  int len = TYPE_LENGTH (type);
++  LONGEST len = TYPE_LENGTH (type);
+   int nelem = TYPE_NFIELDS (type);
+ 
+   /* The Renesas ABI returns aggregate types always on stack.  */
+@@ -907,7 +907,7 @@ sh_frame_align (struct gdbarch *ignore,
+ 
+ /* Helper function to justify value in register according to endianess.  */
+ static char *
+-sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len)
++sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, LONGEST len)
+ {
+   static char valbuf[4];
+ 
+@@ -1067,7 +1067,8 @@ sh_push_dummy_call_fpu (struct gdbarch *
+   struct type *type;
+   CORE_ADDR regval;
+   char *val;
+-  int len, reg_size = 0;
++  LONGEST len;
++  ssize_t reg_size = 0;
+   int pass_on_stack = 0;
+   int treat_as_flt;
+   int last_reg_arg = INT_MAX;
+@@ -1208,7 +1209,8 @@ sh_push_dummy_call_nofpu (struct gdbarch
+   struct type *type;
+   CORE_ADDR regval;
+   char *val;
+-  int len, reg_size = 0;
++  LONGEST len;
++  ssize_t reg_size = 0;
+   int pass_on_stack = 0;
+   int last_reg_arg = INT_MAX;
+ 
+Index: gdb-7.5.0.20120926/gdb/sh64-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/sh64-tdep.c	2012-06-06 20:03:53.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/sh64-tdep.c	2012-11-07 22:47:57.582984625 +0100
+@@ -1058,7 +1058,7 @@ sh64_push_dummy_call (struct gdbarch *gd
+ 		      CORE_ADDR struct_addr)
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+-  int stack_offset, stack_alloc;
++  LONGEST stack_offset, stack_alloc;
+   int int_argreg;
+   int float_argreg;
+   int double_argreg;
+@@ -1069,7 +1069,7 @@ sh64_push_dummy_call (struct gdbarch *gd
+   CORE_ADDR regval;
+   char *val;
+   char valbuf[8];
+-  int len;
++  LONGEST len;
+   int argreg_size;
+   int fp_args[12];
+ 
+Index: gdb-7.5.0.20120926/gdb/sparc-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/sparc-tdep.c	2012-11-07 22:00:43.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/sparc-tdep.c	2012-11-07 22:47:57.593984609 +0100
+@@ -470,7 +470,7 @@ sparc32_store_arguments (struct regcache
+   for (i = 0; i < nargs; i++)
+     {
+       struct type *type = value_type (args[i]);
+-      int len = TYPE_LENGTH (type);
++      LONGEST len = TYPE_LENGTH (type);
+ 
+       if (sparc_structure_or_union_p (type)
+ 	  || (sparc_floating_p (type) && len == 16)
+Index: gdb-7.5.0.20120926/gdb/sparc64-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/sparc64-tdep.c	2012-05-16 16:35:07.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/sparc64-tdep.c	2012-11-07 22:47:57.595984605 +0100
+@@ -639,7 +639,8 @@ sparc64_16_byte_align_p (struct type *ty
+ 
+ static void
+ sparc64_store_floating_fields (struct regcache *regcache, struct type *type,
+-			       const gdb_byte *valbuf, int element, int bitpos)
++			       const gdb_byte *valbuf, int element,
++			       LONGEST bitpos)
+ {
+   int len = TYPE_LENGTH (type);
+ 
+@@ -681,7 +682,7 @@ sparc64_store_floating_fields (struct re
+       for (i = 0; i < TYPE_NFIELDS (type); i++)
+ 	{
+ 	  struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
+-	  int subpos = bitpos + TYPE_FIELD_BITPOS (type, i);
++	  LONGEST subpos = bitpos + TYPE_FIELD_BITPOS (type, i);
+ 
+ 	  sparc64_store_floating_fields (regcache, subtype, valbuf,
+ 					 element, subpos);
+@@ -713,7 +714,7 @@ sparc64_store_floating_fields (struct re
+ 
+ static void
+ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
+-				 gdb_byte *valbuf, int bitpos)
++				 gdb_byte *valbuf, LONGEST bitpos)
+ {
+   if (sparc64_floating_p (type))
+     {
+@@ -750,7 +751,7 @@ sparc64_extract_floating_fields (struct
+       for (i = 0; i < TYPE_NFIELDS (type); i++)
+ 	{
+ 	  struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
+-	  int subpos = bitpos + TYPE_FIELD_BITPOS (type, i);
++	  LONGEST subpos = bitpos + TYPE_FIELD_BITPOS (type, i);
+ 
+ 	  sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos);
+ 	}
+@@ -783,7 +784,7 @@ sparc64_store_arguments (struct regcache
+   for (i = 0; i < nargs; i++)
+     {
+       struct type *type = value_type (args[i]);
+-      int len = TYPE_LENGTH (type);
++      LONGEST len = TYPE_LENGTH (type);
+ 
+       if (sparc64_structure_or_union_p (type)
+ 	  || (sparc64_complex_floating_p (type) && len == 32))
+@@ -883,7 +884,7 @@ sparc64_store_arguments (struct regcache
+     {
+       const gdb_byte *valbuf = value_contents (args[i]);
+       struct type *type = value_type (args[i]);
+-      int len = TYPE_LENGTH (type);
++      LONGEST len = TYPE_LENGTH (type);
+       int regnum = -1;
+       gdb_byte buf[16];
+ 
+Index: gdb-7.5.0.20120926/gdb/spu-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/spu-tdep.c	2012-11-07 22:09:24.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/spu-tdep.c	2012-11-07 22:47:57.598984602 +0100
+@@ -1372,7 +1372,7 @@ spu_push_dummy_call (struct gdbarch *gdb
+       struct value *arg = args[i];
+       struct type *type = check_typedef (value_type (arg));
+       const gdb_byte *contents = value_contents (arg);
+-      int n_regs = align_up (TYPE_LENGTH (type), 16) / 16;
++      LONGEST n_regs = align_up (TYPE_LENGTH (type), 16) / 16;
+ 
+       /* If the argument doesn't wholly fit into registers, it and
+ 	 all subsequent arguments go to the stack.  */
+@@ -1404,7 +1404,7 @@ spu_push_dummy_call (struct gdbarch *gdb
+ 	{
+ 	  struct value *arg = args[i];
+ 	  struct type *type = check_typedef (value_type (arg));
+-	  int len = TYPE_LENGTH (type);
++	  LONGEST len = TYPE_LENGTH (type);
+ 	  int preferred_slot;
+ 	  
+ 	  if (spu_scalar_value_p (type))
+Index: gdb-7.5.0.20120926/gdb/tic6x-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/tic6x-tdep.c	2012-06-08 16:24:57.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/tic6x-tdep.c	2012-11-07 22:50:31.792763178 +0100
+@@ -918,7 +918,7 @@ tic6x_push_dummy_call (struct gdbarch *g
+   int argnum;
+   int len = 0;
+   int stack_offset = 4;
+-  int references_offset = 4;
++  LONGEST references_offset = 4;
+   CORE_ADDR func_addr = find_function_addr (function, NULL);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   struct type *func_type = value_type (function);
+@@ -952,7 +952,7 @@ tic6x_push_dummy_call (struct gdbarch *g
+   /* Now make space on the stack for the args.  */
+   for (argnum = 0; argnum < nargs; argnum++)
+     {
+-      int len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4);
++      LONGEST len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4);
+       if (argnum >= 10 - argreg)
+ 	references_offset += len;
+       stack_offset += len;
+@@ -971,7 +971,7 @@ tic6x_push_dummy_call (struct gdbarch *g
+       const gdb_byte *val;
+       struct value *arg = args[argnum];
+       struct type *arg_type = check_typedef (value_type (arg));
+-      int len = TYPE_LENGTH (arg_type);
++      ssize_t len = TYPE_LENGTH (arg_type);
+       enum type_code typecode = TYPE_CODE (arg_type);
+ 
+       val = value_contents (arg);
+@@ -1131,7 +1131,8 @@ tic6x_push_dummy_call (struct gdbarch *g
+ 	    }
+ 	  else
+ 	    internal_error (__FILE__, __LINE__,
+-			    _("unexpected length %d of arg %d"), len, argnum);
++			    _("unexpected length %s of arg %d"),
++			    plongest (len), argnum);
+ 
+ 	  addr = sp + stack_offset;
+ 	  write_memory (addr, val, len);
+Index: gdb-7.5.0.20120926/gdb/tilegx-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/tilegx-tdep.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/tilegx-tdep.c	2012-11-07 22:47:57.610984584 +0100
+@@ -291,7 +291,7 @@ tilegx_push_dummy_call (struct gdbarch *
+   CORE_ADDR stack_dest = sp;
+   int argreg = TILEGX_R0_REGNUM;
+   int i, j;
+-  int typelen, slacklen, alignlen;
++  LONGEST typelen, slacklen, alignlen;
+   static const gdb_byte two_zero_words[8] = { 0 };
+ 
+   /* If struct_return is 1, then the struct return address will
+Index: gdb-7.5.0.20120926/gdb/v850-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/v850-tdep.c	2012-05-18 23:02:50.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/v850-tdep.c	2012-11-07 22:47:57.617984575 +0100
+@@ -809,7 +809,7 @@ v850_push_dummy_call (struct gdbarch *gd
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   int argreg;
+   int argnum;
+-  int len = 0;
++  LONGEST len = 0;
+   int stack_offset;
+ 
+   /* The offset onto the stack at which we will start copying parameters
+@@ -834,7 +834,7 @@ v850_push_dummy_call (struct gdbarch *gd
+      in four registers available.  Loop thru args from first to last.  */
+   for (argnum = 0; argnum < nargs; argnum++)
+     {
+-      int len;
++      LONGEST len;
+       gdb_byte *val;
+       gdb_byte valbuf[v850_reg_size];
+ 
+Index: gdb-7.5.0.20120926/gdb/vax-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/vax-tdep.c	2012-11-07 22:46:56.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/vax-tdep.c	2012-11-07 22:47:57.618984573 +0100
+@@ -116,7 +116,7 @@ vax_store_arguments (struct regcache *re
+   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   gdb_byte buf[4];
+-  int count = 0;
++  LONGEST count = 0;
+   int i;
+ 
+   /* We create an argument list on the stack, and make the argument
+@@ -125,7 +125,7 @@ vax_store_arguments (struct regcache *re
+   /* Push arguments in reverse order.  */
+   for (i = nargs - 1; i >= 0; i--)
+     {
+-      int len = TYPE_LENGTH (value_enclosing_type (args[i]));
++      LONGEST len = TYPE_LENGTH (value_enclosing_type (args[i]));
+ 
+       sp -= (len + 3) & ~3;
+       count += (len + 3) / 4;
+Index: gdb-7.5.0.20120926/gdb/xstormy16-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/xstormy16-tdep.c	2012-11-07 22:00:44.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/xstormy16-tdep.c	2012-11-07 22:47:57.626984562 +0100
+@@ -235,8 +235,9 @@ xstormy16_push_dummy_call (struct gdbarc
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   CORE_ADDR stack_dest = sp;
+   int argreg = E_1ST_ARG_REGNUM;
+-  int i, j;
+-  int typelen, slacklen;
++  int i, slacklen;
++  LONGEST j;
++  LONGEST typelen;
+   const gdb_byte *val;
+   char buf[xstormy16_pc_size];
+ 
+Index: gdb-7.5.0.20120926/gdb/xtensa-tdep.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/xtensa-tdep.c	2012-05-18 23:02:51.000000000 +0200
++++ gdb-7.5.0.20120926/gdb/xtensa-tdep.c	2012-11-07 22:47:57.629984557 +0100
+@@ -1653,8 +1653,7 @@ xtensa_store_return_value (struct type *
+ 
+       if (len > (callsize > 8 ? 8 : 16))
+ 	internal_error (__FILE__, __LINE__,
+-			_("unimplemented for this length: %d"),
+-			TYPE_LENGTH (type));
++			_("unimplemented for this length: %d"), len);
+       areg = arreg_number (gdbarch,
+ 			   gdbarch_tdep (gdbarch)->a0_base + 2 + callsize, wb);
+ 
+@@ -1728,18 +1727,18 @@ xtensa_push_dummy_call (struct gdbarch *
+ {
+   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+   int i;
+-  int size, onstack_size;
++  LONGEST size, onstack_size;
+   gdb_byte *buf = (gdb_byte *) alloca (16);
+   CORE_ADDR ra, ps;
+   struct argument_info
+   {
+     const bfd_byte *contents;
+-    int length;
++    ssize_t length;
+     int onstack;		/* onstack == 0 => in reg */
+     int align;			/* alignment */
+     union
+     {
+-      int offset;		/* stack offset if on stack.  */
++      ssize_t offset;		/* stack offset if on stack.  */
+       int regno;		/* regno if in register.  */
+     } u;
+   };
+@@ -1763,9 +1762,10 @@ xtensa_push_dummy_call (struct gdbarch *
+         {
+ 	  struct value *arg = args[i];
+ 	  struct type *arg_type = check_typedef (value_type (arg));
+-	  fprintf_unfiltered (gdb_stdlog, "%2d: %s %3d ", i,
+-			      host_address_to_string (arg),
+-			      TYPE_LENGTH (arg_type));
++	  const char *arg_type_len_s = pulongest (TYPE_LENGTH (arg_type));
++
++	  fprintf_unfiltered (gdb_stdlog, "%2d: %s %s ", i,
++			      host_address_to_string (arg), arg_type_len_s);
+ 	  switch (TYPE_CODE (arg_type))
+ 	    {
+ 	    case TYPE_CODE_INT:
+@@ -1835,8 +1835,8 @@ xtensa_push_dummy_call (struct gdbarch *
+ 	  info->align = TYPE_LENGTH (builtin_type (gdbarch)->builtin_long);
+ 	  break;
+ 	}
+-      info->length = TYPE_LENGTH (arg_type);
+       info->contents = value_contents (arg);
++      info->length = TYPE_LENGTH (arg_type);
+ 
+       /* Align size and onstack_size.  */
+       size = (size + info->align - 1) & ~(info->align - 1);
+@@ -1881,7 +1881,7 @@ xtensa_push_dummy_call (struct gdbarch *
+ 
+       if (info->onstack)
+ 	{
+-	  int n = info->length;
++	  ssize_t n = info->length;
+ 	  CORE_ADDR offset = sp + info->u.offset;
+ 
+ 	  /* Odd-sized structs are aligned to the lower side of a memory
+@@ -1897,7 +1897,7 @@ xtensa_push_dummy_call (struct gdbarch *
+ 	}
+       else
+ 	{
+-	  int n = info->length;
++	  ssize_t n = info->length;
+ 	  const bfd_byte *cp = info->contents;
+ 	  int r = info->u.regno;
+ 

diff --git a/gdb-rhbz795424-bitpos-24of25.patch b/gdb-rhbz795424-bitpos-24of25.patch
new file mode 100644
index 0000000..59d8439
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-24of25.patch
@@ -0,0 +1,113 @@
+http://sourceware.org/ml/gdb-cvs/2012-09/msg00160.html
+
+### src/gdb/ChangeLog	2012/09/26 23:53:53	1.14709
+### src/gdb/ChangeLog	2012/09/27 08:57:14	1.14710
+## -1,3 +1,16 @@
++2012-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
++
++	* gdbtypes.c (lookup_array_range_type): Expand parameters
++	LOW_BOUND and HIGH_BOUND to LONGEST.
++	(lookup_string_range_type): Likewise.
++	* gdbtypes.h (lookup_array_range_type): Likewise.
++	(lookup_string_range_type): Likewise.
++	* valops.c (value_cstring): Expand parameter LEN to ssize_t.
++	Expand HIGHBOUND to ssize_t.
++	(value_string): Likewise.
++	* value.h (value_cstring): Expand parameter LEN to ssize_t.
++	(value_string): Likewise.
++
+ 2012-09-27  Yao Qi  <yao@codesourcery.com>
+ 
+ 	PR breakpoints/13898
+Index: gdb-7.5.0.20120926/gdb/gdbtypes.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/gdbtypes.c	2012-11-07 22:09:57.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/gdbtypes.c	2012-11-07 22:50:47.048741164 +0100
+@@ -1022,7 +1022,7 @@ create_array_type (struct type *result_t
+ 
+ struct type *
+ lookup_array_range_type (struct type *element_type,
+-			 int low_bound, int high_bound)
++			 LONGEST low_bound, LONGEST high_bound)
+ {
+   struct gdbarch *gdbarch = get_type_arch (element_type);
+   struct type *index_type = builtin_type (gdbarch)->builtin_int;
+@@ -1058,7 +1058,7 @@ create_string_type (struct type *result_
+ 
+ struct type *
+ lookup_string_range_type (struct type *string_char_type,
+-			  int low_bound, int high_bound)
++			  LONGEST low_bound, LONGEST high_bound)
+ {
+   struct type *result_type;
+ 
+Index: gdb-7.5.0.20120926/gdb/gdbtypes.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/gdbtypes.h	2012-11-07 22:09:29.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/gdbtypes.h	2012-11-07 22:51:46.440655817 +0100
+@@ -1640,7 +1640,7 @@ extern struct type *create_range_type (s
+ 
+ extern struct type *create_array_type (struct type *, struct type *,
+ 				       struct type *);
+-extern struct type *lookup_array_range_type (struct type *, int, int);
++extern struct type *lookup_array_range_type (struct type *, LONGEST, LONGEST);
+ 
+ extern CORE_ADDR type_range_any_field_internal (struct type *range_type,
+ 						int fieldno);
+@@ -1656,7 +1656,7 @@ extern void finalize_type (struct type *
+ 
+ extern struct type *create_string_type (struct type *, struct type *,
+ 					struct type *);
+-extern struct type *lookup_string_range_type (struct type *, int, int);
++extern struct type *lookup_string_range_type (struct type *, LONGEST, LONGEST);
+ 
+ extern struct type *create_set_type (struct type *, struct type *);
+ 
+Index: gdb-7.5.0.20120926/gdb/valops.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/valops.c	2012-11-07 22:46:00.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/valops.c	2012-11-07 22:50:47.091741104 +0100
+@@ -1937,11 +1937,11 @@ value_array (int lowbound, int highbound
+ }
+ 
+ struct value *
+-value_cstring (char *ptr, int len, struct type *char_type)
++value_cstring (char *ptr, ssize_t len, struct type *char_type)
+ {
+   struct value *val;
+   int lowbound = current_language->string_lower_bound;
+-  int highbound = len / TYPE_LENGTH (char_type);
++  ssize_t highbound = len / TYPE_LENGTH (char_type);
+   struct type *stringtype
+     = lookup_array_range_type (char_type, lowbound, highbound + lowbound - 1);
+ 
+@@ -1960,11 +1960,11 @@ value_cstring (char *ptr, int len, struc
+    string may contain embedded null bytes.  */
+ 
+ struct value *
+-value_string (char *ptr, int len, struct type *char_type)
++value_string (char *ptr, ssize_t len, struct type *char_type)
+ {
+   struct value *val;
+   int lowbound = current_language->string_lower_bound;
+-  int highbound = len / TYPE_LENGTH (char_type);
++  ssize_t highbound = len / TYPE_LENGTH (char_type);
+   struct type *stringtype
+     = lookup_string_range_type (char_type, lowbound, highbound + lowbound - 1);
+ 
+Index: gdb-7.5.0.20120926/gdb/value.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/value.h	2012-11-07 22:09:30.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/value.h	2012-11-07 22:51:11.744705614 +0100
+@@ -593,9 +593,9 @@ extern struct value *value_mark (void);
+ 
+ extern void value_free_to_mark (struct value *mark);
+ 
+-extern struct value *value_cstring (char *ptr, int len,
++extern struct value *value_cstring (char *ptr, ssize_t len,
+ 				    struct type *char_type);
+-extern struct value *value_string (char *ptr, int len,
++extern struct value *value_string (char *ptr, ssize_t len,
+ 				   struct type *char_type);
+ extern struct value *value_bitstring (char *ptr, int len,
+ 				      struct type *index_type);

diff --git a/gdb-rhbz795424-bitpos-25of25-test.patch b/gdb-rhbz795424-bitpos-25of25-test.patch
new file mode 100644
index 0000000..e406b99
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-25of25-test.patch
@@ -0,0 +1,627 @@
+http://sourceware.org/ml/gdb-patches/2012-10/msg00231.html
+Subject: Re: [PATCH] Expand fortran array bounds sizes to LONGEST
+
+On Mon, 15 Oct 2012 15:25:55 +0200, Jan Kratochvil wrote:
+> I have filed for it now:
+> 	Invalid debug/ array bounds w/-fno-range-check and 32-bit target
+> 	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54934
+
+Therefore it looks as a valid gfortran FSF GCC HEAD bug so provided
+a hand-patched .S file for i386; patched GDB PASSes with it.
+
+
+Thanks,
+Jan
+
+
+2012-10-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
+	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.fortran/array-bounds.exp: New test file.
+	* gdb.fortran/array-bounds.f: New test file.
+	* gdb.fortran/array-bounds.S: New test file.
+
+--- /dev/null	2012-09-26 15:32:16.098506310 +0200
++++ gdb-7.2/gdb/testsuite/gdb.fortran/array-bounds.exp	2012-10-15 20:53:26.427072583 +0200
+@@ -0,0 +1,43 @@
++# Copyright 2012 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 <http://www.gnu.org/licenses/>.
++
++# This file is part of the gdb testsuite.  It contains test to ensure that
++# array bounds accept LONGEST.
++
++if { [skip_fortran_tests] } { return -1 }
++
++set testfile "array-bounds"
++
++if { [is_ilp32_target] && ([istarget "i\[34567\]86-*-linux*"]
++			   || [istarget "x86_64-*-linux*"]) } {
++    set srcfile ${testfile}.S
++    set opts {nodebug f90}
++} else {
++    set srcfile ${testfile}.f
++    set opts {debug f90}
++}
++
++if {[prepare_for_testing $testfile.exp $testfile $srcfile $opts]} {
++    print "compile failed"
++    return -1
++}
++
++if { ![runto MAIN__] } {
++    perror "Could not run to breakpoint `MAIN__'."
++    continue
++}
++
++gdb_test "print &foo" {.*\(4294967296:4294967297\).*}
++gdb_test "print &bar" {.*\(-4294967297:-4294967296\).*}
+--- /dev/null	2012-09-26 15:32:16.098506310 +0200
++++ gdb-7.2/gdb/testsuite/gdb.fortran/array-bounds.f	2012-10-15 19:35:12.500254261 +0200
+@@ -0,0 +1,22 @@
++c Copyright 2012 Free Software Foundation, Inc.
++
++c This program is free software; you can redistribute it and/or modify
++c it under the terms of the GNU General Public License as published by
++c the Free Software Foundation; either version 3 of the License, or
++c (at your option) any later version.
++c
++c This program is distributed in the hope that it will be useful,
++c but WITHOUT ANY WARRANTY; without even the implied warranty of
++c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++c GNU General Public License for more details.
++c
++c You should have received a copy of the GNU General Public License
++c along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++        dimension foo(4294967296_8:4294967297_8)
++        dimension bar(-4294967297_8:-4294967296_8)
++        bar = 42
++        foo=bar
++        stop
++        end
++
+--- /dev/null	2012-09-26 15:32:16.098506310 +0200
++++ gdb-7.2/gdb/testsuite/gdb.fortran/array-bounds.S	2012-10-15 20:52:36.851118215 +0200
+@@ -0,0 +1,529 @@
++/* Copyright 2012 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 <http://www.gnu.org/licenses/>.
++
++   This file is part of the gdb testsuite.  */
++
++	.file	"array-bounds.f"
++	.text
++.Ltext0:
++	.type	MAIN__, @function
++MAIN__:
++.LFB0:
++	.file 1 "gdb.fortran/array-bounds.f"
++	# gdb.fortran/array-bounds.f:16
++	.loc 1 16 0
++	.cfi_startproc
++# BLOCK 2 seq:0
++# PRED: ENTRY (FALLTHRU)
++	pushl	%ebp
++.LCFI0:
++	.cfi_def_cfa_offset 8
++	.cfi_offset 5, -8
++	movl	%esp, %ebp
++.LCFI1:
++	.cfi_def_cfa_register 5
++	subl	$40, %esp
++.LBB2:
++# SUCC: 3 (FALLTHRU)
++	# gdb.fortran/array-bounds.f:18
++	.loc 1 18 0
++	movl	$-1, %eax
++# BLOCK 3 seq:1
++# PRED: 2 (FALLTHRU) 4 [100.0%] 
++.L3:
++	# gdb.fortran/array-bounds.f:18
++	.loc 1 18 0 is_stmt 0 discriminator 1
++	testl	%eax, %eax
++# SUCC: 5 4 (FALLTHRU)
++	jg	.L2
++# BLOCK 4 seq:2
++# PRED: 3 (FALLTHRU)
++	# gdb.fortran/array-bounds.f:18
++	.loc 1 18 0 discriminator 2
++	leal	1(%eax), %ecx
++	movl	.LC0, %edx
++	movl	%edx, -16(%ebp,%ecx,4)
++	addl	$1, %eax
++# SUCC: 3 [100.0%] 
++	jmp	.L3
++# BLOCK 5 seq:3
++# PRED: 3
++.L2:
++.LBE2:
++	# gdb.fortran/array-bounds.f:19
++	.loc 1 19 0 is_stmt 1
++	movl	-16(%ebp), %eax
++	movl	-12(%ebp), %edx
++	movl	%eax, -24(%ebp)
++	movl	%edx, -20(%ebp)
++	# gdb.fortran/array-bounds.f:20
++	.loc 1 20 0
++	movl	$0, 4(%esp)
++	movl	$0, (%esp)
++# SUCC:
++	call	_gfortran_stop_string
++	.cfi_endproc
++.LFE0:
++	.size	MAIN__, .-MAIN__
++	.globl	main
++	.type	main, @function
++main:
++.LFB1:
++	# gdb.fortran/array-bounds.f:21
++	.loc 1 21 0
++	.cfi_startproc
++# BLOCK 2 seq:0
++# PRED: ENTRY (FALLTHRU)
++	pushl	%ebp
++.LCFI2:
++	.cfi_def_cfa_offset 8
++	.cfi_offset 5, -8
++	movl	%esp, %ebp
++.LCFI3:
++	.cfi_def_cfa_register 5
++	andl	$-16, %esp
++	subl	$16, %esp
++	# gdb.fortran/array-bounds.f:21
++	.loc 1 21 0
++	movl	12(%ebp), %eax
++	movl	%eax, 4(%esp)
++	movl	8(%ebp), %eax
++	movl	%eax, (%esp)
++	call	_gfortran_set_args
++	movl	$options.1.1824, 4(%esp)
++	movl	$7, (%esp)
++	call	_gfortran_set_options
++	call	MAIN__
++	movl	$0, %eax
++	leave
++.LCFI4:
++	.cfi_restore 5
++	.cfi_def_cfa 4, 4
++# SUCC: EXIT [100.0%] 
++	ret
++	.cfi_endproc
++.LFE1:
++	.size	main, .-main
++	.section	.rodata
++	.align 4
++	.type	options.1.1824, @object
++	.size	options.1.1824, 28
++options.1.1824:
++	.long	68
++	.long	1023
++	.long	0
++	.long	0
++	.long	1
++	.long	1
++	.long	0
++	.align 4
++.LC0:
++	.long	1109917696
++	.text
++.Letext0:
++	.section	.debug_info,"",@progbits
++.Ldebug_info0:
++	.long	2f - 1f	# Length of Compilation Unit Info
++1:
++	.value	0x2	# DWARF version number
++	.long	.Ldebug_abbrev0	# Offset Into Abbrev. Section
++	.byte	0x4	# Pointer Size (in bytes)
++dieb:	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
++	.long	.LASF5	# DW_AT_producer: "GNU Fortran 4.8.0 20121015 (experimental) -ffixed-form -m32 -mtune=generic -march=x86-64 -g -gdwarf-2 -fintrinsic-modules-path .../gcchead-root/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude"
++	.byte	0xe	# DW_AT_language
++	.byte	0x2	# DW_AT_identifier_case
++	.long	.LASF6	# DW_AT_name: "gdb.fortran/array-bounds.f"
++	.long	.LASF7	# DW_AT_comp_dir: ""
++	.long	.Ltext0	# DW_AT_low_pc
++	.long	.Letext0	# DW_AT_high_pc
++	.long	.Ldebug_line0	# DW_AT_stmt_list
++die26:	.uleb128 0x2	# (DIE (0x26) DW_TAG_subprogram)
++	.long	.LASF8	# DW_AT_name: "MAIN__"
++	.byte	0x1	# DW_AT_decl_file (gdb.fortran/array-bounds.f)
++	.byte	0x10	# DW_AT_decl_line
++	.long	.LFB0	# DW_AT_low_pc
++	.long	.LFE0	# DW_AT_high_pc
++	.long	.LLST0	# DW_AT_frame_base
++	.byte	0x1	# DW_AT_GNU_all_tail_call_sites
++	.byte	0x1	# DW_AT_main_subprogram
++	.byte	0x2	# DW_AT_calling_convention
++	.long	die66 - .Ldebug_info0	# DW_AT_sibling
++die40:	.uleb128 0x3	# (DIE (0x40) DW_TAG_variable)
++	.ascii "bar\0"	# DW_AT_name
++	.byte	0x1	# DW_AT_decl_file (gdb.fortran/array-bounds.f)
++	.byte	0x11	# DW_AT_decl_line
++	.long	die66 - .Ldebug_info0	# DW_AT_type
++	.byte	0x2	# DW_AT_location
++	.byte	0x91	# DW_OP_fbreg
++	.sleb128 -24
++die4e:	.uleb128 0x3	# (DIE (0x4e) DW_TAG_variable)
++	.ascii "foo\0"	# DW_AT_name
++	.byte	0x1	# DW_AT_decl_file (gdb.fortran/array-bounds.f)
++	.byte	0x10	# DW_AT_decl_line
++	.long	die88 - .Ldebug_info0	# DW_AT_type
++	.byte	0x2	# DW_AT_location
++	.byte	0x91	# DW_OP_fbreg
++	.sleb128 -32
++die5c:	.uleb128 0x4	# (DIE (0x5c) DW_TAG_lexical_block)
++	.long	.LBB2	# DW_AT_low_pc
++	.long	.LBE2	# DW_AT_high_pc
++	.byte	0	# end of children of DIE 0x26
++die66:	.uleb128 0x5	# (DIE (0x66) DW_TAG_array_type)
++	.long	die81 - .Ldebug_info0	# DW_AT_type
++	.long	die7a - .Ldebug_info0	# DW_AT_sibling
++die6f:	.uleb128 0x6	# (DIE (0x6f) DW_TAG_subrange_type)
++	.long	die7a - .Ldebug_info0	# DW_AT_type
++#if 0
++	.long	0xffffffff	# DW_AT_lower_bound
++	.byte	0	# DW_AT_upper_bound
++#else
++	.quad	0xfffffffeffffffff	# DW_AT_lower_bound
++	.quad	0xffffffff00000000	# DW_AT_upper_bound
++#endif
++	.byte	0	# end of children of DIE 0x66
++die7a:	.uleb128 0x7	# (DIE (0x7a) DW_TAG_base_type)
++#if 0
++	.byte	0x4	# DW_AT_byte_size
++#else
++	.byte	0x8	# DW_AT_byte_size
++#endif
++	.byte	0x5	# DW_AT_encoding
++	.long	.LASF0	# DW_AT_name: "integer(kind=4)"
++die81:	.uleb128 0x7	# (DIE (0x81) DW_TAG_base_type)
++	.byte	0x4	# DW_AT_byte_size
++	.byte	0x4	# DW_AT_encoding
++	.long	.LASF1	# DW_AT_name: "real(kind=4)"
++die88:	.uleb128 0x5	# (DIE (0x88) DW_TAG_array_type)
++	.long	die81 - .Ldebug_info0	# DW_AT_type
++	.long	die99 - .Ldebug_info0	# DW_AT_sibling
++die91:	.uleb128 0x8	# (DIE (0x91) DW_TAG_subrange_type)
++	.long	die7a - .Ldebug_info0	# DW_AT_type
++#if 0
++	.byte	0	# DW_AT_lower_bound
++	.byte	0x1	# DW_AT_upper_bound
++#else
++	.quad	0x100000000	# DW_AT_lower_bound
++	.quad	0x100000001	# DW_AT_upper_bound
++#endif
++	.byte	0	# end of children of DIE 0x88
++die99:	.uleb128 0x9	# (DIE (0x99) DW_TAG_subprogram)
++	.byte	0x1	# DW_AT_external
++	.long	.LASF9	# DW_AT_name: "main"
++	.byte	0x1	# DW_AT_decl_file (gdb.fortran/array-bounds.f)
++	.byte	0x15	# DW_AT_decl_line
++	.long	die7a - .Ldebug_info0	# DW_AT_type
++	.long	.LFB1	# DW_AT_low_pc
++	.long	.LFE1	# DW_AT_high_pc
++	.long	.LLST1	# DW_AT_frame_base
++	.byte	0x1	# DW_AT_GNU_all_tail_call_sites
++	.long	died4 - .Ldebug_info0	# DW_AT_sibling
++dieb6:	.uleb128 0xa	# (DIE (0xb6) DW_TAG_formal_parameter)
++	.long	.LASF2	# DW_AT_name: "argc"
++	.byte	0x1	# DW_AT_decl_file (gdb.fortran/array-bounds.f)
++	.byte	0x15	# DW_AT_decl_line
++	.long	died4 - .Ldebug_info0	# DW_AT_type
++	.byte	0x2	# DW_AT_location
++	.byte	0x91	# DW_OP_fbreg
++	.sleb128 0
++diec4:	.uleb128 0xa	# (DIE (0xc4) DW_TAG_formal_parameter)
++	.long	.LASF3	# DW_AT_name: "argv"
++	.byte	0x1	# DW_AT_decl_file (gdb.fortran/array-bounds.f)
++	.byte	0x15	# DW_AT_decl_line
++	.long	died9 - .Ldebug_info0	# DW_AT_type
++	.byte	0x3	# DW_AT_location
++	.byte	0x91	# DW_OP_fbreg
++	.sleb128 4
++	.byte	0x6	# DW_OP_deref
++	.byte	0	# end of children of DIE 0x99
++died4:	.uleb128 0xb	# (DIE (0xd4) DW_TAG_const_type)
++	.long	die7a - .Ldebug_info0	# DW_AT_type
++died9:	.uleb128 0xc	# (DIE (0xd9) DW_TAG_pointer_type)
++	.byte	0x4	# DW_AT_byte_size
++	.long	diedf - .Ldebug_info0	# DW_AT_type
++diedf:	.uleb128 0x7	# (DIE (0xdf) DW_TAG_base_type)
++	.byte	0x1	# DW_AT_byte_size
++	.byte	0x8	# DW_AT_encoding
++	.long	.LASF4	# DW_AT_name: "character(kind=1)"
++	.byte	0	# end of children of DIE 0xb
++2:
++	.section	.debug_abbrev,"",@progbits
++.Ldebug_abbrev0:
++	.uleb128 0x1	# (abbrev code)
++	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
++	.byte	0x1	# DW_children_yes
++	.uleb128 0x25	# (DW_AT_producer)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.uleb128 0x13	# (DW_AT_language)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x42	# (DW_AT_identifier_case)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3	# (DW_AT_name)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.uleb128 0x1b	# (DW_AT_comp_dir)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.uleb128 0x11	# (DW_AT_low_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x12	# (DW_AT_high_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x10	# (DW_AT_stmt_list)
++	.uleb128 0x6	# (DW_FORM_data4)
++	.byte	0
++	.byte	0
++	.uleb128 0x2	# (abbrev code)
++	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
++	.byte	0x1	# DW_children_yes
++	.uleb128 0x3	# (DW_AT_name)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.uleb128 0x3a	# (DW_AT_decl_file)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3b	# (DW_AT_decl_line)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x11	# (DW_AT_low_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x12	# (DW_AT_high_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x40	# (DW_AT_frame_base)
++	.uleb128 0x6	# (DW_FORM_data4)
++	.uleb128 0x2116	# (DW_AT_GNU_all_tail_call_sites)
++	.uleb128 0xc	# (DW_FORM_flag)
++	.uleb128 0x6a	# (DW_AT_main_subprogram)
++	.uleb128 0xc	# (DW_FORM_flag)
++	.uleb128 0x36	# (DW_AT_calling_convention)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x1	# (DW_AT_sibling)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.byte	0
++	.byte	0
++	.uleb128 0x3	# (abbrev code)
++	.uleb128 0x34	# (TAG: DW_TAG_variable)
++	.byte	0	# DW_children_no
++	.uleb128 0x3	# (DW_AT_name)
++	.uleb128 0x8	# (DW_FORM_string)
++	.uleb128 0x3a	# (DW_AT_decl_file)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3b	# (DW_AT_decl_line)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.uleb128 0x2	# (DW_AT_location)
++	.uleb128 0xa	# (DW_FORM_block1)
++	.byte	0
++	.byte	0
++	.uleb128 0x4	# (abbrev code)
++	.uleb128 0xb	# (TAG: DW_TAG_lexical_block)
++	.byte	0	# DW_children_no
++	.uleb128 0x11	# (DW_AT_low_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x12	# (DW_AT_high_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.byte	0
++	.byte	0
++	.uleb128 0x5	# (abbrev code)
++	.uleb128 0x1	# (TAG: DW_TAG_array_type)
++	.byte	0x1	# DW_children_yes
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.uleb128 0x1	# (DW_AT_sibling)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.byte	0
++	.byte	0
++	.uleb128 0x6	# (abbrev code)
++	.uleb128 0x21	# (TAG: DW_TAG_subrange_type)
++	.byte	0	# DW_children_no
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++#if 0
++	.uleb128 0x22	# (DW_AT_lower_bound)
++	.uleb128 0x6	# (DW_FORM_data4)
++	.uleb128 0x2f	# (DW_AT_upper_bound)
++	.uleb128 0xb	# (DW_FORM_data1)
++#else
++	.uleb128 0x22	# (DW_AT_lower_bound)
++	.uleb128 0x7	# (DW_FORM_data8)
++	.uleb128 0x2f	# (DW_AT_upper_bound)
++	.uleb128 0x7	# (DW_FORM_data8)
++#endif
++	.byte	0
++	.byte	0
++	.uleb128 0x7	# (abbrev code)
++	.uleb128 0x24	# (TAG: DW_TAG_base_type)
++	.byte	0	# DW_children_no
++	.uleb128 0xb	# (DW_AT_byte_size)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3e	# (DW_AT_encoding)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3	# (DW_AT_name)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.byte	0
++	.byte	0
++	.uleb128 0x8	# (abbrev code)
++	.uleb128 0x21	# (TAG: DW_TAG_subrange_type)
++	.byte	0	# DW_children_no
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++#if 0
++	.uleb128 0x22	# (DW_AT_lower_bound)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x2f	# (DW_AT_upper_bound)
++	.uleb128 0xb	# (DW_FORM_data1)
++#else
++	.uleb128 0x22	# (DW_AT_lower_bound)
++	.uleb128 0x7	# (DW_FORM_data8)
++	.uleb128 0x2f	# (DW_AT_upper_bound)
++	.uleb128 0x7	# (DW_FORM_data8)
++#endif
++	.byte	0
++	.byte	0
++	.uleb128 0x9	# (abbrev code)
++	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
++	.byte	0x1	# DW_children_yes
++	.uleb128 0x3f	# (DW_AT_external)
++	.uleb128 0xc	# (DW_FORM_flag)
++	.uleb128 0x3	# (DW_AT_name)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.uleb128 0x3a	# (DW_AT_decl_file)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3b	# (DW_AT_decl_line)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.uleb128 0x11	# (DW_AT_low_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x12	# (DW_AT_high_pc)
++	.uleb128 0x1	# (DW_FORM_addr)
++	.uleb128 0x40	# (DW_AT_frame_base)
++	.uleb128 0x6	# (DW_FORM_data4)
++	.uleb128 0x2116	# (DW_AT_GNU_all_tail_call_sites)
++	.uleb128 0xc	# (DW_FORM_flag)
++	.uleb128 0x1	# (DW_AT_sibling)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.byte	0
++	.byte	0
++	.uleb128 0xa	# (abbrev code)
++	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
++	.byte	0	# DW_children_no
++	.uleb128 0x3	# (DW_AT_name)
++	.uleb128 0xe	# (DW_FORM_strp)
++	.uleb128 0x3a	# (DW_AT_decl_file)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x3b	# (DW_AT_decl_line)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.uleb128 0x2	# (DW_AT_location)
++	.uleb128 0xa	# (DW_FORM_block1)
++	.byte	0
++	.byte	0
++	.uleb128 0xb	# (abbrev code)
++	.uleb128 0x26	# (TAG: DW_TAG_const_type)
++	.byte	0	# DW_children_no
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.byte	0
++	.byte	0
++	.uleb128 0xc	# (abbrev code)
++	.uleb128 0xf	# (TAG: DW_TAG_pointer_type)
++	.byte	0	# DW_children_no
++	.uleb128 0xb	# (DW_AT_byte_size)
++	.uleb128 0xb	# (DW_FORM_data1)
++	.uleb128 0x49	# (DW_AT_type)
++	.uleb128 0x13	# (DW_FORM_ref4)
++	.byte	0
++	.byte	0
++	.byte	0
++	.section	.debug_loc,"",@progbits
++.Ldebug_loc0:
++.LLST0:
++	.long	.LFB0-.Ltext0	# Location list begin address (*.LLST0)
++	.long	.LCFI0-.Ltext0	# Location list end address (*.LLST0)
++	.value	0x2	# Location expression size
++	.byte	0x74	# DW_OP_breg4
++	.sleb128 4
++	.long	.LCFI0-.Ltext0	# Location list begin address (*.LLST0)
++	.long	.LCFI1-.Ltext0	# Location list end address (*.LLST0)
++	.value	0x2	# Location expression size
++	.byte	0x74	# DW_OP_breg4
++	.sleb128 8
++	.long	.LCFI1-.Ltext0	# Location list begin address (*.LLST0)
++	.long	.LFE0-.Ltext0	# Location list end address (*.LLST0)
++	.value	0x2	# Location expression size
++	.byte	0x75	# DW_OP_breg5
++	.sleb128 8
++	.long	0	# Location list terminator begin (*.LLST0)
++	.long	0	# Location list terminator end (*.LLST0)
++.LLST1:
++	.long	.LFB1-.Ltext0	# Location list begin address (*.LLST1)
++	.long	.LCFI2-.Ltext0	# Location list end address (*.LLST1)
++	.value	0x2	# Location expression size
++	.byte	0x74	# DW_OP_breg4
++	.sleb128 4
++	.long	.LCFI2-.Ltext0	# Location list begin address (*.LLST1)
++	.long	.LCFI3-.Ltext0	# Location list end address (*.LLST1)
++	.value	0x2	# Location expression size
++	.byte	0x74	# DW_OP_breg4
++	.sleb128 8
++	.long	.LCFI3-.Ltext0	# Location list begin address (*.LLST1)
++	.long	.LCFI4-.Ltext0	# Location list end address (*.LLST1)
++	.value	0x2	# Location expression size
++	.byte	0x75	# DW_OP_breg5
++	.sleb128 8
++	.long	.LCFI4-.Ltext0	# Location list begin address (*.LLST1)
++	.long	.LFE1-.Ltext0	# Location list end address (*.LLST1)
++	.value	0x2	# Location expression size
++	.byte	0x74	# DW_OP_breg4
++	.sleb128 4
++	.long	0	# Location list terminator begin (*.LLST1)
++	.long	0	# Location list terminator end (*.LLST1)
++	.section	.debug_aranges,"",@progbits
++	.long	0x1c	# Length of Address Ranges Info
++	.value	0x2	# DWARF Version
++	.long	.Ldebug_info0	# Offset of Compilation Unit Info
++	.byte	0x4	# Size of Address
++	.byte	0	# Size of Segment Descriptor
++	.value	0	# Pad to 8 byte boundary
++	.value	0
++	.long	.Ltext0	# Address
++	.long	.Letext0-.Ltext0	# Length
++	.long	0
++	.long	0
++	.section	.debug_line,"",@progbits
++.Ldebug_line0:
++	.section	.debug_str,"MS",@progbits,1
++.LASF4:
++	.string	"character(kind=1)"
++.LASF5:
++	.string	"GNU Fortran 4.8.0 20121015 (experimental) -ffixed-form -m32 -mtune=generic -march=x86-64 -g -gdwarf-2 -fintrinsic-modules-path .../gcchead-root/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude"
++.LASF7:
++	.string	""
++.LASF0:
++#if 0
++	.string	"integer(kind=4)"
++#else
++	.string	"integer(kind=8)"
++#endif
++.LASF9:
++	.string	"main"
++.LASF8:
++	.string	"MAIN__"
++.LASF6:
++	.string	"gdb.fortran/array-bounds.f"
++.LASF2:
++	.string	"argc"
++.LASF1:
++	.string	"real(kind=4)"
++.LASF3:
++	.string	"argv"
++	.ident	"GCC: (GNU) 4.8.0 20121015 (experimental)"
++	.section	.note.GNU-stack,"",@progbits
+

diff --git a/gdb-rhbz795424-bitpos-25of25.patch b/gdb-rhbz795424-bitpos-25of25.patch
new file mode 100644
index 0000000..fa3a6be
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-25of25.patch
@@ -0,0 +1,156 @@
+http://sourceware.org/ml/gdb-patches/2012-08/msg00562.html
+Subject: [PATCH] Expand fortran array bounds sizes to LONGEST
+
+
+--MP_/90J7bck2fqDySEX9JkZtaqL
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+Hi,
+
+Range bounds for a gdb type can have LONGEST values for low and high
+bounds. Fortran range bounds functions however use only int. The larger
+ranges don't compile by default on gcc, but it is possible to override
+the check in the compiler by using -fno-range-check. As a result, this
+check is necessary so that we don't print junk in case of an overflow.
+
+Attached patch does this expansion and also includes a test case that
+verifies that the problem is fixed. I have also verified on x86_64 that
+this patch does not cause any regressions.
+
+Regards,
+Siddhesh
+
+gdb/ChangeLog:
+
+	* f-lang.h (f77_get_upperbound): Return LONGEST.
+	(f77_get_lowerbound): Likewise.
+	* f-typeprint.c (f_type_print_varspec_suffix): Expand
+	UPPER_BOUND and LOWER_BOUND to LONGEST.  Use plongest to format
+	print them.
+	(f_type_print_base): Expand UPPER_BOUND to LONGEST.  Use
+	plongest to format print it.
+	* f-valprint.c (f77_get_lowerbound): Return LONGEST.
+	(f77_get_upperbound): Likewise.
+	(f77_get_dynamic_length_of_aggregate): Expand UPPER_BOUND,
+	LOWER_BOUND to LONGEST.
+	(f77_create_arrayprint_offset_tbl): Likewise.
+
+testsuite/ChangeLog:
+
+	* gdb.fortran/array-bounds.exp: New test case.
+	* gdb.fortran/array-bounds.f: New test case.
+
+--MP_/90J7bck2fqDySEX9JkZtaqL
+Content-Type: text/x-patch
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment; filename=f77-bounds.patch
+
+Index: gdb-7.5.0.20120926/gdb/f-lang.h
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/f-lang.h	2012-11-07 22:12:39.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/f-lang.h	2012-11-07 22:52:02.688632498 +0100
+@@ -66,9 +66,9 @@ enum f90_range_type
+ extern char *real_main_name;	/* Name of main function.  */
+ extern int real_main_c_value;	/* C_value field of main function.  */
+ 
+-extern int f77_get_upperbound (struct type *);
++extern LONGEST f77_get_upperbound (struct type *);
+ 
+-extern int f77_get_lowerbound (struct type *);
++extern LONGEST f77_get_lowerbound (struct type *);
+ 
+ extern void f77_get_dynamic_array_length (struct type *);
+ 
+Index: gdb-7.5.0.20120926/gdb/f-typeprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/f-typeprint.c	2012-11-07 22:00:41.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/f-typeprint.c	2012-11-07 22:52:02.689632497 +0100
+@@ -182,7 +182,7 @@ f_type_print_varspec_suffix (struct type
+ 			     int show, int passed_a_ptr, int demangled_args,
+ 			     int arrayprint_recurse_level)
+ {
+-  int upper_bound, lower_bound;
++  LONGEST upper_bound, lower_bound;
+ 
+   /* No static variables are permitted as an error call may occur during
+      execution of this function.  */
+@@ -212,7 +212,7 @@ f_type_print_varspec_suffix (struct type
+ 
+       lower_bound = f77_get_lowerbound (type);
+       if (lower_bound != 1)	/* Not the default.  */
+-	fprintf_filtered (stream, "%d:", lower_bound);
++	fprintf_filtered (stream, "%s:", plongest (lower_bound));
+ 
+       /* Make sure that, if we have an assumed size array, we
+          print out a warning and print the upperbound as '*'.  */
+@@ -222,7 +222,7 @@ f_type_print_varspec_suffix (struct type
+       else
+ 	{
+ 	  upper_bound = f77_get_upperbound (type);
+-	  fprintf_filtered (stream, "%d", upper_bound);
++	  fprintf_filtered (stream, "%s", plongest (upper_bound));
+ 	}
+ 
+       if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_ARRAY)
+@@ -291,7 +291,7 @@ void
+ f_type_print_base (struct type *type, struct ui_file *stream, int show,
+ 		   int level)
+ {
+-  int upper_bound;
++  LONGEST upper_bound;
+   int index;
+ 
+   QUIT;
+@@ -373,7 +373,7 @@ f_type_print_base (struct type *type, st
+       else
+ 	{
+ 	  upper_bound = f77_get_upperbound (type);
+-	  fprintf_filtered (stream, "character*%d", upper_bound);
++	  fprintf_filtered (stream, "character*%s", plongest (upper_bound));
+ 	}
+       break;
+ 
+Index: gdb-7.5.0.20120926/gdb/f-valprint.c
+===================================================================
+--- gdb-7.5.0.20120926.orig/gdb/f-valprint.c	2012-11-07 22:09:29.000000000 +0100
++++ gdb-7.5.0.20120926/gdb/f-valprint.c	2012-11-07 22:52:21.888604907 +0100
+@@ -57,7 +57,7 @@ LONGEST f77_array_offset_tbl[MAX_FORTRAN
+ 
+ #define F77_DIM_BYTE_STRIDE(n) (f77_array_offset_tbl[n][0])
+ 
+-int
++LONGEST
+ f77_get_lowerbound (struct type *type)
+ {
+   f_object_address_data_valid_or_error (type);
+@@ -68,7 +68,7 @@ f77_get_lowerbound (struct type *type)
+   return TYPE_ARRAY_LOWER_BOUND_VALUE (type);
+ }
+ 
+-int
++LONGEST
+ f77_get_upperbound (struct type *type)
+ {
+   f_object_address_data_valid_or_error (type);
+@@ -92,8 +92,8 @@ f77_get_upperbound (struct type *type)
+ static void
+ f77_get_dynamic_length_of_aggregate (struct type *type)
+ {
+-  int upper_bound = -1;
+-  int lower_bound = 1;
++  LONGEST upper_bound = -1;
++  LONGEST lower_bound = 1;
+ 
+   /* Recursively go all the way down into a possibly multi-dimensional
+      F77 array and get the bounds.  For simple arrays, this is pretty
+@@ -128,7 +128,7 @@ f77_create_arrayprint_offset_tbl (struct
+   struct type *tmp_type;
+   LONGEST eltlen;
+   int ndimen = 1;
+-  int upper, lower;
++  LONGEST upper, lower;
+ 
+   tmp_type = type;
+ 

diff --git a/gdb-rhbz795424-bitpos-lazyvalue.patch b/gdb-rhbz795424-bitpos-lazyvalue.patch
new file mode 100644
index 0000000..20e8e51
--- /dev/null
+++ b/gdb-rhbz795424-bitpos-lazyvalue.patch
@@ -0,0 +1,425 @@
+--- gdb-7.5.0.20120926-m64/gdb/value.c-orig	2012-11-09 17:08:52.137406118 +0100
++++ gdb-7.5.0.20120926-m64/gdb/value.c	2012-11-09 17:32:38.324199230 +0100
+@@ -663,7 +663,6 @@ allocate_value_lazy (struct type *type)
+      description correctly.  */
+   check_typedef (type);
+ 
+-  ulongest_fits_host_or_error (TYPE_LENGTH (type));
+   val = (struct value *) xzalloc (sizeof (struct value));
+   val->contents = NULL;
+   val->next = all_values;
+--- /dev/null	2012-10-18 11:08:13.202328239 +0200
++++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types.exp	2012-11-09 18:13:56.286587994 +0100
+@@ -0,0 +1,59 @@
++# This testcase is part of GDB, the GNU debugger.
++
++# Copyright 2012 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 <http://www.gnu.org/licenses/>.
++
++standard_testfile .c longest-types-64bit.S
++
++proc test { name } { with_test_prefix $name {
++    # 64-bit array size should not overflow
++    gdb_test "print &f->buf" {= \(char \(\*\)\[1099494850560\]\) 0x0}
++
++    # The offset should not overflow
++    gdb_test "print &f->buf2" {= \(char \(\*\)\[2\]\) 0xffff000000}
++}}
++
++
++# Test 64-bit file first as it is not compiled so its compilation never fails.
++
++set file64bitbz2uu ${srcdir}/${subdir}/${testfile}-64bit.bz2.uu
++set file64bit ${objdir}/${subdir}/${testfile}-64bit
++
++if {[catch "system \"uudecode -o - ${file64bitbz2uu} | bzip2 -dc >${file64bit}\""] != 0} {
++    untested "failed uudecode or bzip2"
++    return -1
++}
++file stat ${file64bit} file64bitstat
++if {$file64bitstat(size) != 9501} {
++    untested "uudecode or bzip2 produce invalid result"
++    return -1
++}
++
++clean_restart ${file64bit}
++
++#if { [prepare_for_testing ${testfile}.exp ${testfile}-64bit $srcfile2 {nodebug}] } {
++#    return -1
++#}
++
++test "64bit"
++
++
++# And here is the native build test.
++
++if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {debug quiet}] } {
++    return -1
++}
++
++test "native"
+--- /dev/null	2012-10-18 11:08:13.202328239 +0200
++++ ./gdb/testsuite/gdb.base/longest-types.c	2012-11-09 17:08:51.374406344 +0100
+@@ -0,0 +1,28 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2012 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 <http://www.gnu.org/licenses/>.  */
++
++struct foo
++{
++  char buf[0xffff000000];
++  char buf2[2];
++} *f;
++
++int
++main (void)
++{
++  return 0;
++}
+--- /dev/null	2012-10-18 11:08:13.202328239 +0200
++++ ./gdb/testsuite/gdb.base/longest-types-64bit.S	2012-11-09 17:51:37.597846130 +0100
+@@ -0,0 +1,249 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++   Copyright 2012 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 <http://www.gnu.org/licenses/>.  */
++
++	.file	"longest-types-64bit.c"
++	.text
++.Ltext0:
++	.globl main
++main:
++	.comm	f,8,8
++.Letext0:
++	.file 1 "gdb.base/longest-types-64bit.c"
++	.section	.debug_info,"",@progbits
++.Ldebug_info0:
++	.4byte	0x9a	/* Length of Compilation Unit Info */
++	.2byte	0x2	/* DWARF version number */
++	.4byte	.Ldebug_abbrev0	/* Offset Into Abbrev. Section */
++	.byte	0x8	/* Pointer Size (in bytes) */
++	.uleb128 0x1	/* (DIE (0xb) DW_TAG_compile_unit) */
++	.4byte	.LASF3	/* DW_AT_producer: "GNU C 4.7.3 20121109 (prerelease)" */
++	.byte	0x1	/* DW_AT_language */
++	.4byte	.LASF4	/* DW_AT_name: "gdb.base/longest-types-64bit.c" */
++	.4byte	.LASF5	/* DW_AT_comp_dir: "" */
++	.4byte	.Ldebug_line0	/* DW_AT_stmt_list */
++	.uleb128 0x2	/* (DIE (0x1d) DW_TAG_structure_type) */
++	.ascii "foo\0"	/* DW_AT_name */
++	.4byte	0xff000002	/* DW_AT_byte_size */
++	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
++	.byte	0x12	/* DW_AT_decl_line */
++	.4byte	0x4e	/* DW_AT_sibling */
++	.uleb128 0x3	/* (DIE (0x2c) DW_TAG_member) */
++	.ascii "buf\0"	/* DW_AT_name */
++	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
++	.byte	0x14	/* DW_AT_decl_line */
++	.4byte	0x4e	/* DW_AT_type */
++	.byte	0x2	/* DW_AT_data_member_location */
++	.byte	0x23	/* DW_OP_plus_uconst */
++	.uleb128 0
++	.uleb128 0x4	/* (DIE (0x3a) DW_TAG_member) */
++	.4byte	.LASF0	/* DW_AT_name: "buf2" */
++	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
++	.byte	0x15	/* DW_AT_decl_line */
++	.4byte	0x73	/* DW_AT_type */
++	.byte	0x7	/* DW_AT_data_member_location */
++	.byte	0x23	/* DW_OP_plus_uconst */
++	.uleb128 0xffff000000
++	.byte	0	/* end of children of DIE 0x1d */
++	.uleb128 0x5	/* (DIE (0x4e) DW_TAG_array_type) */
++	.4byte	0x6c	/* DW_AT_type */
++	.4byte	0x65	/* DW_AT_sibling */
++	.uleb128 0x6	/* (DIE (0x57) DW_TAG_subrange_type) */
++	.4byte	0x65	/* DW_AT_type */
++	.quad	0xfffeffffff	/* DW_AT_upper_bound */
++	.byte	0	/* end of children of DIE 0x4e */
++	.uleb128 0x7	/* (DIE (0x65) DW_TAG_base_type) */
++	.byte	0x8	/* DW_AT_byte_size */
++	.byte	0x7	/* DW_AT_encoding */
++	.4byte	.LASF1	/* DW_AT_name: "sizetype" */
++	.uleb128 0x7	/* (DIE (0x6c) DW_TAG_base_type) */
++	.byte	0x1	/* DW_AT_byte_size */
++	.byte	0x6	/* DW_AT_encoding */
++	.4byte	.LASF2	/* DW_AT_name: "char" */
++	.uleb128 0x5	/* (DIE (0x73) DW_TAG_array_type) */
++	.4byte	0x6c	/* DW_AT_type */
++	.4byte	0x83	/* DW_AT_sibling */
++	.uleb128 0x8	/* (DIE (0x7c) DW_TAG_subrange_type) */
++	.4byte	0x65	/* DW_AT_type */
++	.byte	0x1	/* DW_AT_upper_bound */
++	.byte	0	/* end of children of DIE 0x73 */
++	.uleb128 0x9	/* (DIE (0x83) DW_TAG_variable) */
++	.ascii "f\0"	/* DW_AT_name */
++	.byte	0x1	/* DW_AT_decl_file (gdb.base/longest-types-64bit.c) */
++	.byte	0x16	/* DW_AT_decl_line */
++	.4byte	0x97	/* DW_AT_type */
++	.byte	0x1	/* DW_AT_external */
++	.byte	0x9	/* DW_AT_location */
++	.byte	0x3	/* DW_OP_addr */
++	.quad	f
++	.uleb128 0xa	/* (DIE (0x97) DW_TAG_pointer_type) */
++	.byte	0x8	/* DW_AT_byte_size */
++	.4byte	0x1d	/* DW_AT_type */
++	.byte	0	/* end of children of DIE 0xb */
++	.section	.debug_abbrev,"",@progbits
++.Ldebug_abbrev0:
++	.uleb128 0x1	/* (abbrev code) */
++	.uleb128 0x11	/* (TAG: DW_TAG_compile_unit) */
++	.byte	0x1	/* DW_children_yes */
++	.uleb128 0x25	/* (DW_AT_producer) */
++	.uleb128 0xe	/* (DW_FORM_strp) */
++	.uleb128 0x13	/* (DW_AT_language) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3	/* (DW_AT_name) */
++	.uleb128 0xe	/* (DW_FORM_strp) */
++	.uleb128 0x1b	/* (DW_AT_comp_dir) */
++	.uleb128 0xe	/* (DW_FORM_strp) */
++	.uleb128 0x10	/* (DW_AT_stmt_list) */
++	.uleb128 0x6	/* (DW_FORM_data4) */
++	.byte	0
++	.byte	0
++	.uleb128 0x2	/* (abbrev code) */
++	.uleb128 0x13	/* (TAG: DW_TAG_structure_type) */
++	.byte	0x1	/* DW_children_yes */
++	.uleb128 0x3	/* (DW_AT_name) */
++	.uleb128 0x8	/* (DW_FORM_string) */
++	.uleb128 0xb	/* (DW_AT_byte_size) */
++	.uleb128 0x6	/* (DW_FORM_data4) */
++	.uleb128 0x3a	/* (DW_AT_decl_file) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3b	/* (DW_AT_decl_line) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x1	/* (DW_AT_sibling) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.byte	0
++	.byte	0
++	.uleb128 0x3	/* (abbrev code) */
++	.uleb128 0xd	/* (TAG: DW_TAG_member) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0x3	/* (DW_AT_name) */
++	.uleb128 0x8	/* (DW_FORM_string) */
++	.uleb128 0x3a	/* (DW_AT_decl_file) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3b	/* (DW_AT_decl_line) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.uleb128 0x38	/* (DW_AT_data_member_location) */
++	.uleb128 0xa	/* (DW_FORM_block1) */
++	.byte	0
++	.byte	0
++	.uleb128 0x4	/* (abbrev code) */
++	.uleb128 0xd	/* (TAG: DW_TAG_member) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0x3	/* (DW_AT_name) */
++	.uleb128 0xe	/* (DW_FORM_strp) */
++	.uleb128 0x3a	/* (DW_AT_decl_file) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3b	/* (DW_AT_decl_line) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.uleb128 0x38	/* (DW_AT_data_member_location) */
++	.uleb128 0xa	/* (DW_FORM_block1) */
++	.byte	0
++	.byte	0
++	.uleb128 0x5	/* (abbrev code) */
++	.uleb128 0x1	/* (TAG: DW_TAG_array_type) */
++	.byte	0x1	/* DW_children_yes */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.uleb128 0x1	/* (DW_AT_sibling) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.byte	0
++	.byte	0
++	.uleb128 0x6	/* (abbrev code) */
++	.uleb128 0x21	/* (TAG: DW_TAG_subrange_type) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.uleb128 0x2f	/* (DW_AT_upper_bound) */
++	.uleb128 0x7	/* (DW_FORM_data8) */
++	.byte	0
++	.byte	0
++	.uleb128 0x7	/* (abbrev code) */
++	.uleb128 0x24	/* (TAG: DW_TAG_base_type) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0xb	/* (DW_AT_byte_size) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3e	/* (DW_AT_encoding) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3	/* (DW_AT_name) */
++	.uleb128 0xe	/* (DW_FORM_strp) */
++	.byte	0
++	.byte	0
++	.uleb128 0x8	/* (abbrev code) */
++	.uleb128 0x21	/* (TAG: DW_TAG_subrange_type) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.uleb128 0x2f	/* (DW_AT_upper_bound) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.byte	0
++	.byte	0
++	.uleb128 0x9	/* (abbrev code) */
++	.uleb128 0x34	/* (TAG: DW_TAG_variable) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0x3	/* (DW_AT_name) */
++	.uleb128 0x8	/* (DW_FORM_string) */
++	.uleb128 0x3a	/* (DW_AT_decl_file) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x3b	/* (DW_AT_decl_line) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.uleb128 0x3f	/* (DW_AT_external) */
++	.uleb128 0xc	/* (DW_FORM_flag) */
++	.uleb128 0x2	/* (DW_AT_location) */
++	.uleb128 0xa	/* (DW_FORM_block1) */
++	.byte	0
++	.byte	0
++	.uleb128 0xa	/* (abbrev code) */
++	.uleb128 0xf	/* (TAG: DW_TAG_pointer_type) */
++	.byte	0	/* DW_children_no */
++	.uleb128 0xb	/* (DW_AT_byte_size) */
++	.uleb128 0xb	/* (DW_FORM_data1) */
++	.uleb128 0x49	/* (DW_AT_type) */
++	.uleb128 0x13	/* (DW_FORM_ref4) */
++	.byte	0
++	.byte	0
++	.byte	0
++	.section	.debug_aranges,"",@progbits
++	.4byte	0x1c	/* Length of Address Ranges Info */
++	.2byte	0x2	/* DWARF Version */
++	.4byte	.Ldebug_info0	/* Offset of Compilation Unit Info */
++	.byte	0x8	/* Size of Address */
++	.byte	0	/* Size of Segment Descriptor */
++	.2byte	0	/* Pad to 16 byte boundary */
++	.2byte	0
++	.quad	0
++	.quad	0
++	.section	.debug_line,"",@progbits
++.Ldebug_line0:
++	.section	.debug_str,"MS",@progbits,1
++.LASF4:
++	.string	"gdb.base/longest-types-64bit.c"
++.LASF3:
++	.string	"GNU C 4.7.3 20121109 (prerelease)"
++.LASF0:
++	.string	"buf2"
++.LASF1:
++	.string	"sizetype"
++.LASF5:
++	.string	""
++.LASF2:
++	.string	"char"
++	.ident	"GCC: (GNU) 4.7.3 20121109 (prerelease)"
++	.section	.note.GNU-stack,"",@progbits
+--- /dev/null	2012-10-18 11:08:13.202328239 +0200
++++ gdb-7.5.0.20120926-m64-test/gdb/testsuite/gdb.base/longest-types-64bit.bz2.uu	2012-11-09 18:04:52.995692771 +0100
+@@ -0,0 +1,67 @@
++begin 755 gdb.base/longest-types-64bit.bz2
++M0EIH.3%!62936<'N#OH`"G/________^______?_Y______//]7SQD5'^/_%
++M=VY7?F_[X`F]]SG7531-==V:Z-.FW;M.U7=';:UH@<&FD31,E3]J'HE-/TR@
++M]4_5/32;%/U3]1--HU/U$#$R'I'J,FC0T-,)B'J#:CU,F@]0`/4:>F@CU/4,
++MA@$S2>IH!H`TR/0-$$:9`C(&FHU3VE-J;4\%,@>4T:#]49-J/4`>HT!H#3)^
++MJ`!H-``T]0&@-```:'J``&@`:9!`R9,@&3(`#3!#0!H``-#$--`,@``T`T#(
++M:`:`&0&@::,0:-```:``-`E-$1#4-3:4]3R9-39(Q/)#3R-30:9#$T!D!H&@
++M,CTGI!H#(#0T`#0``T`T`:``-``T`0,F3(!DR``TP0T`:``#0Q#30#(``-`-
++M`R&@&@!D!H&FC$&C0``&@`#0)%)H32>JGZ&!)Z1B1X@)DTVC4>H`&0:``R&@
++M,C0:``T``,C0``!H``#(`T`:#0U^\?]7K8M.96V/2[?M*DC)>WIUF)H7T\<T
++M[0D)70G25.YB!,:;8Q(;&XPAB4+$Q%:P)PA-;E=!-&$KNR22EM>$:KKRE&\Q
++M..M]L1*,!>D!X)RW,[,1I,9N%X-N&2+*:&)DJY4(VFQG%9K[/?J06WACF6-I
++MJ&JJ9,ZK4;X28M@[==%ME(A54:%>+3->MRK(G!8#TY>@E$6DR&<_5:C&/RZE
++MI<ON+RY5`LA"@DD$$DF!I9O]5X%G985_=V<.;?K9:G2R-#K<CB,1;26A<H4G
++M3R3I!)WX,-%>,!E6#`;*8R*E@++*))U)[6=OKFM%'+$-H5\X@1D)_Y*"NKV.
++M&\F8?SXW^<O]_DW.8WD@HY.NMMIBXFVROM_SKZ#4-`>HQ:Y@(Q[.>PEG=]@^
++M%C"3EZ/1X'H*02ZQH":6"@;8Z0LEW6<OKJ%$`01%`B;O!N*W1V.HC$``,:CS
++M6(/OTI'-:O6=7$/#?0T9Q[GSY1)6V`+CV@#XWMF`<S:AG<!43X"VGD,E=>)>
++M6^V=*`FB'5G4MD8L3J5XT#SW;J1]ZO+"SPIS%J(P46+Q=CC2$H-`-B&TD)M`
++M&A:066DA%AB0C6,460>M8B+$:-BR&@NM()F`S',,F8+#&0.SMOK@.G<'83N.
++MDA"#5-`JVC("1*TA;/M()&8J0+YH%IFV)+OA@4,`E?3M$[$@&Q`3]A!$&A(-
++M$PBT+2,@PU+2H9(T-H3N6'(2;""%2T*1I2P@`L?AG8&A!=31J7)1(9FB'8X=
++MWJ0S#YEG9K$.#.[L.[CNA"4JSJ^GK2*)UH=MC0.R8+E75'.09<NU&R0G1>[G
++MMQ1*[GI:>#>K`_NZS:V6>$K;OX6#!!N'"2413$DTL&]7KY>B<3V5!!C8#X5+
++MF%9<N\]C%B6OS;LH@1LR3R<LS+<]N]9\JZ<LJ#2_S2'UW('DZ!N>X!8NOKM5
++M+"N&P4.75C16!A9Q;:C.6N`WZDV=-]!<BTB<1Q*P(T4'&*2:@$=J@(M8)!5=
++MO;[ECS>,5PG<T[XC594XI0@RVPD86,M11%(T>]SNP[GV^L?YGI]7_'D8N?XV
++M'[7KZJWYVMXGBQS[`!)YI%3:D)I2!;%'R`W&YB<`9O2#F"C/)F;JK9P+@3&(
++MAH31[W)=YCODQDUKNM7A"3.C!2%CHTJNZ"Z\+#F-?(DLE>XAC%07B8;$%J_L
++MJPK48QC&,916=IM+<1&WRKLB6&Q2O79*!7S$,`7J8*!`!=K:5W550[NH9M#_
++MKL!LT,&;59GZW7S"5Z4%`%&!`9"J9`0:IR&H=MTKT=PEYC$,4K90M9AT'%;_
++MB0HVLE)(W&YWF,C:TURXO:`M[RX(A-GT97456Q4Z*HPU*4J:*[WU-4GD.9UV
++MSA#L4X[[*Y+)8IF.EO<.TP4IC2?(4HX)W1#:GOMOD2F;HM1BV#<E%PM+0&N5
++MP@$\$FD4C-Q^L"H^)NP2-.^JTT!8+!;'Z=KM7%'K@\)*PSETF&M6<Q#>;PH[
++M7:PJ-!#,!6N<3')-0C,>15'IZ>@U^CJJJ+>+>%%)%BBATD\)*F6&BLMIR&?\
++MQ2_?33@"NR1/CN\:)>5DG6`>$;$3QA94'-3]*CU6YG])<=2)'GC"RP-RK&-3
++MZDT-M_)R+F06DS?CR>E@^!,33"U6X<@OXO$Q>U$\T@IU<H-42=0YE[$,T`\H
++M('>'@T=>K`G7H8K5GLXMS3*^@JLVBHHE'.&?9RKC?Y`&&3J5!/C$++<@U#Q'
++M9R3I.$+S`%]-.UO>WH^C73F<&;RIJR+(Q@7(3PP*W[-O,,DD3S7BUK^I@D%*
++M`Y<*2TXJ&7;2'6'R.U>]0-="M`K+&N%/==N4U@9%@M1)U&251C($^S"WL"]T
++M-XN'D2[II3-$K%+&`3['O)%,8G*E%_8RV6A5B_4(2/?-AIC.\/>,YFJ<(G.8
++MAVP?UN*=ME:7&T!C%)I:&4H:-5>&^!&0>A.O'0G'/6&ZZ964@04&=#DC`%&:
++MUNLOS?,?'T:T!8L80<H_W1>='M:96K4;JX)6.('1#J$.1/L)$IS<4/*'2D34
++M/@J\BA(I2T40JS%9G8F!7U5_!#'U!+[7$ES&)@:*QAET-IBX6'_N5^7/#>@V
++MN3&,-6(AG[8&!8LV+F_U"W?/)+Y^,;=1K:SW28<0WA2"UPHP^8FG#R$!`Y`,
++MLF<`U*NNU\[6N03"*?I8D=K7.Z*H=A_3<H1Z%.Q8%2SR@I45('.EGR<N^\`Z
++M\[Z\D+/3>7;S=LVC(BQ,5<M0A"#`]7UK7W3%5(:FBMER3XSP15N!)`-^ZJZ%
++M:4)>8Q_\#G`'P*_-]T!G4$`V0BS]'S)D/;V7R?.2F?SF)N+2+#P2_<G#1B)C
++M(8?NF/+?:UMR3B#9$MBDCI2G7&N'T`FV!ERQ[21DOJ_8I73#BILTTSK)B5P<
++MG22S=*7TI>G(49TCE&*UIVT-MP808VTVV-$(*`VT<%>%96AHOL`(7%SI2%-R
++M#G2F02VQQH-7KT3E05I9Z)E\$Y8ED1KU`(4QHT%B]1$F:F1&8DAN.Q4&*?F@
++M.8D965.$PRH<VD+()"8&I%<R"P,Y[A,)^B(O%1(J%,)M(O6)8E%LY?C6X@@K
++M(F!2TA\,RE<O"E2*G?JE2YF\*OJM?$KWXW6R(3LR-)W.[:ZJC?ZE4,("J$()
++M5@U!62M"WBJ=&Q(L$5,4494K=.0B0#,C3$*``XLTF$DN!6P#%,4K%HTIC[*O
++M6"4S,;RN&@=NP7@72:=U#&JPBQ-60OEAWY;CUYF+$73.R>T5HD,G=G!KTF3D
++M94"&ZA-F,.19=8`\(Q;A07Q%!19*3#*F9Q+D(0K@V87@O.=7EJIM6`!4`>D!
++M)49QHA!BV+:4O@K00$$!5*6>A@2@4D)@R\"%$2F"O:24J*L(RP#N;O4K7I&2
++M[#)KR47H-N[<O^S-)"_Q\>VJ%3>$`9,AF8QID&I3G+D`*]BX98B$2K":A7_\
++M_]7LT!4,$NL5)NE>9[:MK2_/'GO:7"P`=<X'"U9""0<PJ`3`.:*(Z]-.GQ,9
++M>P(\L]O?"-APH(834$,W!IJS+U1F1C.!D$!&KS^-6%F90PQ[F]F=$^QE\X+-
++M@.W*LPH_78B>MHH@69RU[*'1J@8QAC\KSV@IG\(;_CUW:ZR2.,0$E3LZ_^P=
++M<_DCP"Q<`;+_;YP#^U%&E^#2M%,T?F3UN^>TSH)GFL"\%RF[KNZ+[R+@<&.$
++MC42)B96\1-.O_I).K7)X]W>EQ):4C(XB*+:S%0_37D^EBP+1HU(D?3"%_O2R
++M6-#X>AU#<$*!/,W6QC^;O^%]LR&_X'<8X$<3CUU_QFAJ;">H)2443GD4W!4#
++?<55!2^6_8J$)-O<>\H0U/6Q^>UG0%W)%.%"0P>X.^@``
++`
++end

diff --git a/gdb.spec b/gdb.spec
index c745cf1..e320908 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -34,7 +34,7 @@ Version: 7.5.0.20120926
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 25%{?dist}
+Release: 26%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
 Group: Development/Debuggers
@@ -577,6 +577,31 @@ Patch728: gdb-check-type.patch
 # entry values: Fix resolving in inlined frames.
 Patch729: gdb-entryval-inlined.patch
 
+# Fix `GDB cannot access struct member whose offset is larger than 256MB'
+# (RH BZ 795424).
+Patch797: gdb-rhbz795424-bitpos-06of25.patch
+Patch798: gdb-rhbz795424-bitpos-07of25.patch
+Patch799: gdb-rhbz795424-bitpos-08of25.patch
+Patch800: gdb-rhbz795424-bitpos-09of25.patch
+Patch801: gdb-rhbz795424-bitpos-10of25.patch
+Patch802: gdb-rhbz795424-bitpos-11of25.patch
+Patch803: gdb-rhbz795424-bitpos-12of25.patch
+Patch804: gdb-rhbz795424-bitpos-13of25.patch
+Patch805: gdb-rhbz795424-bitpos-14of25.patch
+Patch806: gdb-rhbz795424-bitpos-15of25.patch
+Patch807: gdb-rhbz795424-bitpos-16of25.patch
+Patch808: gdb-rhbz795424-bitpos-17of25.patch
+Patch809: gdb-rhbz795424-bitpos-18of25.patch
+Patch810: gdb-rhbz795424-bitpos-19of25.patch
+Patch811: gdb-rhbz795424-bitpos-20of25.patch
+Patch812: gdb-rhbz795424-bitpos-21of25.patch
+Patch813: gdb-rhbz795424-bitpos-22of25.patch
+Patch814: gdb-rhbz795424-bitpos-23of25.patch
+Patch815: gdb-rhbz795424-bitpos-24of25.patch
+Patch816: gdb-rhbz795424-bitpos-25of25.patch
+Patch817: gdb-rhbz795424-bitpos-25of25-test.patch
+Patch818: gdb-rhbz795424-bitpos-lazyvalue.patch
+
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
 # RL_STATE_FEDORA_GDB would not be found for:
 # Patch642: gdb-readline62-ask-more-rh.patch
@@ -889,6 +914,28 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c gdb/go-exp.c
 %patch726 -p1
 %patch728 -p1
 %patch729 -p1
+%patch797 -p1
+%patch798 -p1
+%patch799 -p1
+%patch800 -p1
+%patch801 -p1
+%patch802 -p1
+%patch803 -p1
+%patch804 -p1
+%patch805 -p1
+%patch806 -p1
+%patch807 -p1
+%patch808 -p1
+%patch809 -p1
+%patch810 -p1
+%patch811 -p1
+%patch812 -p1
+%patch813 -p1
+%patch814 -p1
+%patch815 -p1
+%patch816 -p1
+%patch817 -p1
+%patch818 -p1
 
 %patch393 -p1
 %if 0%{!?el5:1} || 0%{?scl:1}
@@ -1385,6 +1432,10 @@ fi
 %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
 
 %changelog
+* Fri Nov  9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.0.20120926-26.fc18
+- Fix `GDB cannot access struct member whose offset is larger than 256MB'
+  (RH BZ 871066).
+
 * Fri Oct  5 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.0.20120926-25.fc18
 - entry values: Fix resolving in inlined frames.
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-27 23:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-27 23:55 [rpms/gdb] gdb-17.2-rebase-f44: Fix `GDB cannot access struct member whose offset is larger than 256MB' Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox