92b52c5
http://sourceware.org/ml/gdb-patches/2012-09/msg00631.html
92b52c5
Subject: [PATCH 1/4] Expand bitpos and type.length to LONGEST and ULONGEST
92b52c5
92b52c5
92b52c5
--MP_/yp5f+W_ED2JtUlSyBi8xujr
92b52c5
Content-Type: text/plain; charset=US-ASCII
92b52c5
Content-Transfer-Encoding: 7bit
92b52c5
Content-Disposition: inline
92b52c5
92b52c5
Hi,
92b52c5
92b52c5
This is patch 1/4, which implements the bulk of the changes in type
92b52c5
length and bitpos/type offset. I have verified that there are no
92b52c5
regressions resulting from this patch by running the testsuite on
92b52c5
Fedora 16 x86_64.  Patch and changelog attached.
92b52c5
92b52c5
Regards,
92b52c5
Siddhesh
92b52c5
92b52c5
--MP_/yp5f+W_ED2JtUlSyBi8xujr
92b52c5
Content-Type: text/plain
92b52c5
Content-Transfer-Encoding: quoted-printable
92b52c5
Content-Disposition: attachment; filename=ChangeLog-main
92b52c5
92b52c5
gdb/ChangeLog
92b52c5
92b52c5
2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
92b52c5
92b52c5
	* ada-lang.c (fat_pntr_bounds_bitpos): Return LONGEST.
92b52c5
	(fat_pntr_data_bitpos): Likewise.
92b52c5
	(desc_bound_bitpos): Likewise.
92b52c5
	(constrained_packed_array_type): Expand ELT_BITS parameter to
92b52c5
	LONGEST.
92b52c5
	(move_bits): Expand parameters SRC_OFFSET and N to LONGEST.
92b52c5
	(cond_offset_host): Expand parameter OFFSET to LONGEST.
92b52c5
	(cond_offset_target): Likewise.
92b52c5
	(ada_type_of_array): Expand ARRAY_BITSIZE to LONGEST.
92b52c5
	(decode_constrained_packed_array_type): Expand BITS to LONGEST.
92b52c5
	(decode_constrained_packed_array): Expand BIT_POS to LONGEST.
92b52c5
	(ada_value_primitive_packed_val): Expand parameter OFFSET to
92b52c5
	LONGEST.  Expand TARG, NTARG and NEW_OFFSET to LONGEST.
92b52c5
	(ada_value_assign): Expand FROM_SIZE to LONGEST.
92b52c5
	(value_assign_to_component): Expand BITS to LONGEST.
92b52c5
	(ensure_lval): Expand LEN to LONGEST.
92b52c5
	(value_pointer): Expand LEN to ULONGEST.
92b52c5
	(value_tag_from_contents_and_address): Expand TAG_BYTE_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(ada_value_primitive_field): Expand parameter OFFSET to LONGEST.
92b52c5
	Expand bit_pos to LONGEST.
92b52c5
	(find_struct_field): Expand parameters OFFSET and BYTE_OFFSET_P to
92b52c5
	LONGEST.  Expand BIT_POS and FLD_OFFSET to LONGEST.
92b52c5
	(ada_search_struct_field): Expand parameter OFFSET to LONGEST.
92b52c5
	Expand VAR_OFFSET to LONGEST.
92b52c5
	(ada_index_struct_field): Expand parameters INDEX and OFFSET to
92b52c5
	LONGEST.
92b52c5
	(ada_index_struct_field_1): Expand parameters INDEX_P and OFFSET
92b52c5
	to LONGEST.
92b52c5
	(ada_value_struct_elt): Expand BYTE_OFFSET to LONGEST.
92b52c5
	(align_value): Return ULONGEST.  Expand parameter OFF and
92b52c5
	ALIGNMENT to ULONGEST.
92b52c5
	(ada_template_to_fixed_record_type_1): Expand OFF, BIT_LEN and
92b52c5
	fld_bit_len to LONGEST.  Expand FIELD_OFFSET to LONGEST.  Use
92b52c5
	pulongest function to print TYPE_LENGTH.
92b52c5
	(to_fixed_array_type): Expand LEN to LONGEST.
92b52c5
	* ada-lang.h (ada_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(ada_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	(ada_value_primitive_packed_val): Expand parameter OFFSET to
92b52c5
	LONGEST.
92b52c5
	* ada-typeprint.c (ada_print_type): Use pulongest to print
92b52c5
	TYPE_LENGTH.
92b52c5
	* ada-valprint.c (val_print_packed_array_elements): Expand ELTLEN
92b52c5
	to ULONGEST.
92b52c5
	(char_at): Expand parameter I to LONGEST.
92b52c5
	(printstr): Expand parameter LENGTH, I, REP1, REPS to ULONGEST.
92b52c5
	Use pulongest to format print REPS.
92b52c5
	(ada_printstr): Expand parameter LENGTH to LONGEST.
92b52c5
	(ada_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	(ada_val_print_array): Expand ELTLEN, LEN to ULONGEST and TEMP_LEN
92b52c5
	to LONGEST.
92b52c5
	(ada_val_print_1): Expand parameter OFFSET to LONGEST.
92b52c5
	(print_variant_part): Expand parameters OFFSET and OUTER_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(print_field_values): Likewise.  Expand BIT_POS to LONGEST.
92b52c5
	* annotate.c (annotate_array_section_begin): Expand parameter
92b52c5
	IDX to LONGEST.  Use plongest to format-print IDX.
92b52c5
	(annotate_elt_rep): Expand parameter REPCOUNT to ULONGEST.  Use
92b52c5
	plongest to format-print REPCOUNT.
92b52c5
	* annotate.h: Likewise.
92b52c5
	* arm-linux-nat.c (arm_linux_region_ok_for_hw_watchpoint):
92b52c5
	Expand parameter parameter LEN to LONGEST.
92b52c5
	* ax-gdb.c (gen_left_shift): Expand parameter DISTANCE to LONGEST.
92b52c5
	(gen_offset): Expand parameter OFFSET to LONGEST.
92b52c5
	(gen_bitfield_ref): Expand parameters START, END to LONGEST.
92b52c5
	Expand BOUND_START, BOUND_END, OFFSET to LONGEST.
92b52c5
	(gen_primitive_field): Expand parameter OFFSET to LONGEST.
92b52c5
	(gen_struct_ref_recursive): Likewise.
92b52c5
	* ax-general.c (ax_trace_quick): Expand parameter N to LONGEST.
92b52c5
	* ax.h (ax_trace_quick): Likewise.
92b52c5
	* breakpoint.c (breakpoint_address_match_range): Expand parameter
92b52c5
	LEN1 to LONGEST.
92b52c5
	(can_use_hardware_watchpoint): Expand LEN to LONGEST.
92b52c5
	* breakpoint.h (struct bp_target_info): Expand member LENGTH to
92b52c5
	LONGEST.
92b52c5
	(struct bp_location): Likewise.
92b52c5
	* c-lang.c (c_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	(evaluate_subexp_c): Expand ELEMENT_SIZE, I to LONGEST.
92b52c5
	* c-lang.h (c_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(c_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	(cp_print_value_fields): Expand parameter OFFSET to LONGEST.
92b52c5
	(cp_print_value_fields_rtti): Likewise.
92b52c5
	* c-typeprint.c (c_type_print_varspec_suffix): Remove cast down to
92b52c5
	int and use plongest to print LONGEST.
92b52c5
	* c-valprint.c (c_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.  Expand OFFSET to LONGEST, ELTLEN to ULONGEST.
92b52c5
	(c_value_print): Expand TOP to LONGEST.
92b52c5
	* cp-abi.c (baseclass_offset): Return LONGEST.  Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.  Expand RES to LONGEST.
92b52c5
	(value_virtual_fn_field): Expand parameter OFFSET to LONGEST.
92b52c5
	(value_rtti_type): Expand parameter TOP to point to LONGEST.
92b52c5
	* cp-abi.h (value_virtual_fn_field): Expand OFFSET to LONGEST.
92b52c5
	(value_rtti_type): Expand TOP to point to LONGEST.
92b52c5
	(baseclass_offset): Return LONGEST.  Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.
92b52c5
	(struct cp_abi_ops): Expand parameter OFFSET for VIRTUAL_FN_FIELD
92b52c5
	to LONGEST.  Expand parameter TOP to point to LONGEST in
92b52c5
	VALUE_RTTI_TYPE.  Return LONGEST from BASECLASS_OFFSET and expand
92b52c5
	parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	* cp-valprint.c (cp_print_value_fields): Expand parameter OFFSET
92b52c5
	to LONGEST.  Expand I_OFFSET to LONGEST.
92b52c5
	(cp_print_value_fields_rtti): Expand parameter OFFSET to
92b52c5
	LONGEST.  Expand TOP to LONGEST.
92b52c5
	(cp_print_value): Expand parameter OFFSET to LONGEST.  Expand
92b52c5
	THISOFFSET, BOFFSET to LONGEST.
92b52c5
	* d-lang.h (d_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	* d-valprint.c (dynamic_array_type): Likewise.
92b52c5
	(d_val_print): Likewise.
92b52c5
	* doublest.c (floatformat_from_length): Expand parameter LEN to
92b52c5
	LONGEST.  Use plongest to format string for LONGEST.
92b52c5
	* dwarf2loc.c (copy_bitwise): Expand parameters DEST_OFFSET_BITS,
92b52c5
	BIT_COUNT to ULONGEST.  Rename parameter SOURCE_OFFSET_BITS to
92b52c5
	SOURCE_OFFSET and expand to ULONGEST.  New variable
92b52c5
	SOURCE_OFFSET_BITS.
92b52c5
	(read_pieced_value): Expand OFFSET, DEST_OFFSET_BITS,
92b52c5
	SOURCE_OFFSET_BITS, SOURCE_OFFSET to LONGEST.  Expand TYPE_LEN,
92b52c5
	THIS_SIZE, THIS_SIZE_BITS to ULONGEST.
92b52c5
	(write_pieced_value): Likewise.
92b52c5
	(check_pieced_value_bits): Expand parameters BIT_OFFSET and
92b52c5
	BIT_LENGTH to LONGEST.  Expand THIS_SIZE_BITS to ULONGEST.
92b52c5
	(check_pieced_value_validity): Expand parameters BIT_OFFSET and
92b52c5
	BIT_LENGTH to LONGEST.
92b52c5
	(check_pieced_synthetic_pointer): Likewise.
92b52c5
	(indirect_pieced_value): Expand BIT_LENGTH, BYTE_OFFSET and
92b52c5
	BIT_OFFSET to LONGEST.
92b52c5
	(dwarf2_evaluate_loc_desc_full): Expand N to ULONGEST.
92b52c5
	* dwarf2read.c (dwarf2_const_value_length_mismatch_complaint):
92b52c5
	Expand parameters ARG2 and ARG3 to LONGEST.  Use plongest to
92b52c5
	print ARG2 and ARG3.
92b52c5
	(dwarf2_add_field): Expand ANONYMOUS_SIZE, BIT_OFFSET to
92b52c5
	LONGEST.
92b52c5
	* eval.c (evaluate_struct_tuple): Expand BITPOS to LONGEST.
92b52c5
	(init_array_element): Expand ELEMENT_SIZE to LONGEST.
92b52c5
	(binop_promote): Expand PROMOTED_LEN1, PROMOTED_LEN2, RESULT_LEN
92b52c5
	to ULONGEST.
92b52c5
	(evaluate_subexp_standard): Expand MEM_OFFSET, TOP, ELEMENT_SIZE
92b52c5
	to LONGEST.
92b52c5
	* f-lang.c (f_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	* f-lang.h (f_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	* f-valprint.c (f77_array_offset_tbl): Make LONGEST.
92b52c5
	(f77_create_arrayprint_offset_tbl): Expand ELTLEN to LONGEST.
92b52c5
	(f77_print_array_1): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.  Expand I to LONGEST.
92b52c5
	(f77_print_array): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	(f_val_print): Likewise.  Expand OFFSET to LONGEST.
92b52c5
	* findvar.c (default_value_from_register): Expand LEN to LONGEST.
92b52c5
	(read_frame_register_value): Expand OFFSET, REG_OFFSET, LEN,
92b52c5
	REG_LEN to LONGEST.
92b52c5
	* frame.c (get_frame_register_bytes): Expand parameter LEN to
92b52c5
	LONGEST.
92b52c5
	* frame.h (get_frame_register_bytes): Likewise.
92b52c5
	* gdbtypes.c (init_type): Expand parameter LENGTH to LONGEST.
92b52c5
	(is_unique_ancestor_worker): Expand parameters OFFSET,
92b52c5
	EMBEDDED_OFFSET to LONGEST.  Expand THIS_OFFSET to LONGEST.
92b52c5
	(is_unique_ancestor): Expand OFFSET to LONGEST.
92b52c5
	(recursive_dump_type): Use pulongest to format print TYPE_LENGTH.
92b52c5
	Use plongest to format print TYPE_FIELD_BITPOS.
92b52c5
	(arch_type): Expand parameter LENGTH to LONGEST.
92b52c5
	* gdbtypes.h (struct type.main_type.fld_bnds.fields): Expand
92b52c5
	member BITPOS to LONGEST.
92b52c5
	(struct type): Expand member LENGTH to ULONGEST.
92b52c5
	(init_type): Expand parameter LENGTH to LONGEST.
92b52c5
	(arch_type): Likewise.
92b52c5
	* gnu-v2-abi.c (gnuv2_virtual_fn_field): Expand parameter OFFSET
92b52c5
	to LONGEST.
92b52c5
	(gnuv2_value_rtti_type): Expand parameter TOP to point to LONGEST.
92b52c5
	(gnuv2_baseclass_offset): Return LONGEST.  Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.  Expand FIELD_OFFSET, BOFFSET,
92b52c5
	FIELD_LENGTH to LONGEST.
92b52c5
	* gnu-v3-abi.c (build_gdb_vtable_type): Expand OFFSET to LONGEST.
92b52c5
	(vtable_address_point_offset): Return LONGEST.
92b52c5
	(gnuv3_rtti_type): Expand parameter TOP_P to point to LONGEST.
92b52c5
	(gnuv3_virtual_fn_field): Expand parameter OFFSET to LONGEST.
92b52c5
	(gnuv3_baseclass_offset): Return LONGEST.  Expand parameter
92b52c5
	EMBEDDED_OFSET to LONGEST.  Expand CUR_BASE_OFFSET, BASE_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(gnuv3_find_method_in): Expand POS to LONGEST.
92b52c5
	* go-lang.h (go_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	* go-valprint.c (print_go_string): Likewise.
92b52c5
	(go_val_print): Likewise.
92b52c5
	* i386-nat.c (i386_handle_nonaligned_watchpoint): Expand
92b52c5
	parameter LEN to LONGEST.
92b52c5
	(i386_region_ok_for_watchpoint): Likewise.
92b52c5
	* inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): Expand
92b52c5
	parameter LEN to LONGEST.
92b52c5
	* jv-lang.c (java_link_class_type): Expand BOFFSET to LONGEST.
92b52c5
	(java_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	* jv-lang.h (java_val_print): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	* jv-valprint.c (java_print_value_fields): Expand parameter OFFSET
92b52c5
	to LONGEST.
92b52c5
	(java_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	* language.c (unk_lang_printstr): Expand parameter LENGTH to
92b52c5
	ULONGEST.
92b52c5
	(unk_lang_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	* language.h (language_defn): Expand parameter LENGTH of
92b52c5
	LA_PRINTSTR to ULONGEST.  Expand parameter EMBEDDED_OFFSET of
92b52c5
	LA_VAL_PRINT to LONGEST.
92b52c5
	* m2-lang.c (m2_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	Expand I, REP1, REPS to ULONGEST.  Use pulongest to format print
92b52c5
	REPS.
92b52c5
	* m2-lang.h (m2_val_print): Expand parameter embedded_offset to
92b52c5
	LONGEST.
92b52c5
	* m2-typeprint.c (m2_array): New variable VAL.  Use pulongest to
92b52c5
	* format print VAL.
92b52c5
	(m2_enum): expand LASTVAL to LONGEST.
92b52c5
	* m2-valprint.c (m2_print_long_set): Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.
92b52c5
	(m2_print_unbounded_array): Likewise.
92b52c5
	(m2_print_array_contents): Likewise.
92b52c5
	(m2_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	Expand I, LEN, TEMP_LEN to ULONGEST.
92b52c5
	* memrange.c (mem_ranges_overlap): Expand parameters LEN1, LEN2 to
92b52c5
	LONGEST.
92b52c5
	* memrange.h (struct mem_range): Expand member LENGTH to LONGEST.
92b52c5
	(mem_ranges_overlap): Expand parameters LEN1, LEN2 to LONGEST.
92b52c5
	* mips-linux-nat.c (mips_linux_region_ok_for_hw_watchpoint):
92b52c5
	Expand parameter LEN to LONGEST.
92b52c5
	* objc-lang.c (objc_printstr): Expand parameter LENGTH to
92b52c5
	ULONGEST.  Expand I, REP1, REPS to ULONGEST.  use pulongest to
92b52c5
	format print REPS.
92b52c5
	* opencl-lang.c (lookup_opencl_vector_type): Expand parameter
92b52c5
	EL_LENGTH to ULONGEST.  Expand LENGTH to ULONGEST.
92b52c5
	(lval_func_read): Expand OFFSET, N, I, J and ELSIZE to LONGEST.
92b52c5
	(lval_func_write): Likewise.
92b52c5
	(lval_func_check_validity): Expand parameter LENGTH to LONGEST.
92b52c5
	Expand ELSIZE, START, END, I, STARTREST, ENDREST, COMP_OFFSET,
92b52c5
	COMP_LENGTH to LONGEST.
92b52c5
	(lval_func_check_any_valid): Expand ELSIZE to LONGEST.
92b52c5
	(lval_func_check_synthetic_pointer): Expand parameters OFFSET and
92b52c5
	LENGTH to LONGEST.  Expand ELSIZE, START, END, I, STARTREST,
92b52c5
	ENDREST, COMP_LENGTH, COMP_OFFSET to LONGEST.
92b52c5
	* p-lang.c (is_pascal_string_type): Expand parameters LENGTH_POS,
92b52c5
	STRING_POS, LENGTH_SIZE to point to LONGEST.
92b52c5
	(pascal_printstr): Expand parameter LENGTH to ULONGEST.  Expand
92b52c5
	I, REP1, REPS to ULONGEST.  Use pulongest to format print REPS.
92b52c5
	* p-lang.h (pascal_val_print): Expand parameter EMBEDDED_OFFSET
92b52c5
	to LONGEST.
92b52c5
	(is_pascal_string_type): Expand parameters LENGTH_POS, STRING_POS,
92b52c5
	LENGTH_SIZE to point to LONGEST.
92b52c5
	(pascal_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	(pascal_object_print_value_fields): Expand parameter OFFSET to
92b52c5
	LONGEST.
92b52c5
	* p-valprint.c (pascal_val_print): Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.  Expand ELTLEN to ULONGEST.  Expand
92b52c5
	LENGTH_SIZE, LENGTH_POS, STRING_POS to LONGEST.
92b52c5
	(pascal_object_print_value_fields): Expand parameter OFFSET to
92b52c5
	LONGEST.
92b52c5
	(pascal_object_print_value): Likewise.  Expand BOFFSET,
92b52c5
	THISOFFSET to LONGEST.
92b52c5
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint):
92b52c5
	Expand parameter LEN to point to LONGEST.
92b52c5
	* printcmd.c (print_formatted): Expand LEN to LONGEST.
92b52c5
	(print_scalar_formatted): Likewise.
92b52c5
	* procfs.c (procfs_region_ok_for_hw_watchpoint): Expand
92b52c5
	parameter LEN to LONGEST.
92b52c5
	* python/py-prettyprint.c (apply_val_pretty_printer): Expand
92b52c5
	parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	* python/python.h (apply_val_pretty_printer): Likewise.
92b52c5
	* regcache.c (regcache_xfer_part): Expand parameter OFFSET to
92b52c5
	LONGEST.
92b52c5
	(regcache_raw_read_part): Likewise.
92b52c5
	(regcache_raw_write_part): Likewise.
92b52c5
	(regcache_cooked_read_part): Likewise.
92b52c5
	(regcache_cooked_write_part): Likewise.
92b52c5
	* regcache.h (regcache_raw_read_part): Likewise.
92b52c5
	(regcache_raw_write_part): Likewise.
92b52c5
	(regcache_cooked_read_part): Likewise.
92b52c5
	(regcache_cooked_write_part): Likewise.
92b52c5
	* remote.c (remote_region_ok_for_hw_watchpoint): Expand
92b52c5
	parameter LEN to LONGEST.
92b52c5
	* s390-nat.c (s390_region_ok_for_hw_watchpoint): Expand
92b52c5
	parameter LEN to LONGEST.
92b52c5
	* spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Expand
92b52c5
	parameter len to LONGEST.
92b52c5
	* stack.c (print_frame_nameless_args): Expand parameter START to
92b52c5
	LONGEST.
92b52c5
	(print_frame_args): Expand HIGHEST_OFFSET, CURRENT_OFFSET,
92b52c5
	ARG_SIZE, START to LONGEST.
92b52c5
	* symmisc.c (print_symbol): Expand I to ULONGEST.  Use pulongest
92b52c5
	to format print TYPE_LENGTH.
92b52c5
	* target.c (default_region_ok_for_hw_watchpoint): Expand parameter
92b52c5
	LEN to LONGEST.
92b52c5
	(debug_to_region_ok_for_hw_watchpoint): Likewise.
92b52c5
	* target.h (struct target_ops): Expand parameter LEN to LONGEST
92b52c5
	for TO_REGION_OK_FOR_HW_WATCHPOINT.
92b52c5
	* tracepoint.c (add_memrange): Expand parameter LEN to LONGEST.
92b52c5
	Use plongest to format print LEN.
92b52c5
	(collect_symbol): Expand LEN to ULONGEST.  Use pulongest to
92b52c5
	format print LEN.
92b52c5
	(scope_info): Expand J to LONGEST.  Use pulongest to format
92b52c5
	print TYPE_LENGTH.
92b52c5
	* typeprint.c (whatis_exp): Expand TOP to LONGEST.
92b52c5
	* valarith.c (value_subscripted_rvalue): Expand parameters INDEX
92b52c5
	and LOWERBOUND to LONGEST.  Expand ELT_SIZE, ELT_OFFS to ULONGEST.
92b52c5
	(value_concat): expand INVAL1LEN and INVAL2LEN to ssize_t.
92b52c5
	(value_logical_not): Expand LEN to LONGEST.
92b52c5
	(value_strcmp): Expand LEN1, LEN2, I, LEN to LONGEST.
92b52c5
	* valops.c (value_allocate_space_in_inferior): Expand parameter
92b52c5
	LEN to LONGEST.
92b52c5
	(value_cast_structs): Expand TOP to LONGEST.
92b52c5
	(value_cast): Expand ELEMENT_LENGTH to ULONGEST.  Expand
92b52c5
	VAL_LENGTH to LONGEST.
92b52c5
	(dynamic_cast_check_1): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.  Expand OFFSET to LONGEST.
92b52c5
	(dynamic_cast_check_2): Likewise.
92b52c5
	(value_dynamic_cast): Expand TOP to LONGEST.
92b52c5
	(read_value_memory): Expand EMBEDDED_OFFSET to LONGEST.
92b52c5
	(value_assign): Expand CHANGED_LEN, OFFSET to LONGEST.
92b52c5
	(value_array): Expand TYPELENGTH to ULONGEST.
92b52c5
	(update_search_result): Expand parameters LAST_BOFFSET, BOFFSET
92b52c5
	to LONGEST.
92b52c5
	(do_search_struct_field): Expand parameter OFFSET, LAST_BOFFSET
92b52c5
	to LONGEST.  Expand NEW_OFFSET, BOFFSET to LONGEST.
92b52c5
	(search_struct_field): Expand parameter OFFSET to LONGEST.
92b52c5
	Expand BOFFSET to LONGEST.
92b52c5
	(search_struct_method): Expand parameter OFFSET to LONGEST.
92b52c5
	Expand BASE_OFFSET, THIS_OFFSET to LONGEST.
92b52c5
	(find_method_list): Expand parameters OFFSET, BOFFSET to
92b52c5
	LONGEST.  Expand BASE_OFFSET to LONGEST.
92b52c5
	(value_find_oload_method_list): Expand parameter BOFFSET to point
92b52c5
	to LONGEST.
92b52c5
	(find_overload_match): Expand BOFFSET to LONGEST.
92b52c5
	(value_struct_elt_for_reference): Expand parameter OFFSET to
92b52c5
	LONGEST.  Remove unneeded cast.  Expand BASE_OFFSET to LONGEST.
92b52c5
	(value_rtti_indirect_type): Expand parameter TOP to point to
92b52c5
	LONGEST.
92b52c5
	(value_full_object): Expand parameter XTOP to LONGEST.  Expand
92b52c5
	TOP to LONGEST.
92b52c5
	* valprint.c (valprint_check_validity): Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.
92b52c5
	(generic_val_print): Likewise.
92b52c5
	(val_print): Likewise.
92b52c5
	(val_print_scalar_formatted): Likewise.
92b52c5
	(print_hex_chars): Expand parameter LEN to ULONGEST.
92b52c5
	(val_print_array_elements): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST, I to ULONGEST.  Expand LEN, ELTLEN, REP1, REPS to
92b52c5
	ULONGEST.  Use pulongest to format print REPS.
92b52c5
	(generic_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	* valprint.h (val_print_array_elements): Expand parameter
92b52c5
	EMBEDDED_OFFSET to LONGEST.
92b52c5
	(val_print_scalar_formatted): Likewise.
92b52c5
	(print_hex_chars): Expand parameter LEN to ULONGEST.
92b52c5
	(generic_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	(generic_printstr): Expand parameter LENGTH to ULONGEST.
92b52c5
	* value.c (struct range): Expand members OFFSET, LENGTH to
92b52c5
	LONGEST.
92b52c5
	(ranges_overlap): Expand parameters OFFSET1, OFFSET2, LEN1 AND
92b52c5
	LEN2 to LONGEST.
92b52c5
	(range_contain): Expand parameter OFFSET, LENGTH to LONGEST.
92b52c5
	(struct value): Expand members OFFSET, EMBEDDED_OFFSET,
92b52c5
	POINTED_TO_OFFSET to LONGEST.
92b52c5
	(value_bytes_available): Expand parameters OFFSET, LENGTH to
92b52c5
	LONGEST.
92b52c5
	(mark_value_bytes_unavailable): Likewise.
92b52c5
	(find_first_range_overlap): Likewise.
92b52c5
	(value_available_contents_eq): Expand parameters OFFSET1, OFFSET2
92b52c5
	and LENGTH to LONGEST.
92b52c5
	(value_offset): Return LONGEST.
92b52c5
	(set_value_offset): Expand parameter OFFSET to LONGEST.
92b52c5
	(value_contents_copy_raw): Expand parameters SRC_OFFSET,
92b52c5
	DST_OFFSET, LENGTH to ssize_t.
92b52c5
	(value_contents_copy): Likewise.
92b52c5
	(value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST.
92b52c5
	(value_bits_synthetic_pointer): Likewise.
92b52c5
	(value_embedded_offset): Return LONGEST.
92b52c5
	(set_value_embedded_offset): Expand parameter VAL to LONGEST.
92b52c5
	(value_pointed_to_offset): Return LONGEST.
92b52c5
	(set_value_pointed_to_offset): Expand parameter VAL to LONGEST.
92b52c5
	(set_internalvar_component): Expand parameter OFFSET to LONGEST.
92b52c5
	(value_primitive_field): Likewise.  Expand BITPOS, BOFFSET,
92b52c5
	CONTAINER_BITSIZE to LONGEST.
92b52c5
	(value_fn_field): Expand parameter OFFSET to LONGEST.
92b52c5
	(unpack_value_bits_as_long_1): Expand parameters EMBEDDED_OFFSET,
92b52c5
	BITPOS to LONGEST.  Expand READ_OFFSET to LONGEST.
92b52c5
	(unpack_value_bits_as_long): Expand parameter EMBEDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(unpack_value_field_as_long_1): Likewise.  Expand BITPOS to
92b52c5
	LONGEST.
92b52c5
	(unpack_value_field_as_long): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(value_field_bitfield): Likewise.
92b52c5
	(modify_field): Expand parameter BITPOS to LONGEST.  Expand
92b52c5
	BYTESIZE to LONGEST.
92b52c5
	* value.h (value_offset): Return LONGEST.
92b52c5
	(set_value_offset): Expand parameter OFFSET to LONGEST.
92b52c5
	(value_pointed_to_offset): Return LONGEST.
92b52c5
	(set_value_pointed_to_offset): Expand parameter VAL to LONGEST.
92b52c5
	(value_embedded_offset): Return LONGEST.
92b52c5
	(set_value_embedded_offset): Expand parameter VAL to LONGEST.
92b52c5
	(struct lval_funcs): Expand parameters OFFSET and LENGTH to
92b52c5
	LONGEST for CHECK_VALIDITY.  Likewise for CHECK_SYNTHETIC_POINTER.
92b52c5
	(valprint_check_validity): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST.
92b52c5
	(value_bits_synthetic_pointer): Likewise.
92b52c5
	(value_bytes_available): Likewise.
92b52c5
	(mark_value_bytes_unavailable): Likewise.
92b52c5
	(value_available_contents_eq): Fix comment.  Expand parameters
92b52c5
	OFFSET1, OFFSET2, LENGTH to LONGEST.
92b52c5
	(read_value_memory): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(unpack_value_bits_as_long): Expand parameter EMBEDDED_OFFSET to
92b52c5
	LONGEST.
92b52c5
	(unpack_value_field_as_long): Likewise.
92b52c5
	(value_field_bitfield): Likewise.
92b52c5
	(value_contents_copy_raw): Expand parameters SRC_OFFSET,
92b52c5
	DST_OFFSET, LENGTH to LONGEST.
92b52c5
	(value_contents_copy): Likewise.
92b52c5
	(value_primitive_field): Expand parameter OFFSET to LONGEST.
92b52c5
	(value_rtti_indirect_type): Expand parameter TOP to point to
92b52c5
	LONGEST.
92b52c5
	(value_full_object): Expand parameter XTOP to LONGEST.
92b52c5
	(set_internalvar_component): Expand parameter OFFSET to LONGEST.
92b52c5
	(value_fn_field): Expand parameter OFFSET to LONGEST.
92b52c5
	(modify_field): Expand parameter BITPOS to LONGEST.
92b52c5
	(val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
92b52c5
	(value_allocate_space_in_inferior): Expand parameter LEN to
92b52c5
	LONGEST.
92b52c5
92b52c5
gdb/testsuite/ChangeLog:
92b52c5
92b52c5
2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
92b52c5
92b52c5
	* gdb.base/longest-types.exp: Add test case to get offset of
92b52c5
	BUF2.
92b52c5
92b52c5
--MP_/yp5f+W_ED2JtUlSyBi8xujr
92b52c5
Content-Type: text/x-patch
92b52c5
Content-Transfer-Encoding: 7bit
92b52c5
Content-Disposition: attachment; filename=bitpos-main.patch
92b52c5
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ada-lang.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ada-lang.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ada-lang.c	2014-06-24 16:07:27.245986875 +0200
eb6cb2d
@@ -78,7 +78,7 @@ static struct type *desc_bounds_type (st
92b52c5
 
92b52c5
 static struct value *desc_bounds (struct value *);
92b52c5
 
92b52c5
-static int fat_pntr_bounds_bitpos (struct type *);
92b52c5
+static LONGEST fat_pntr_bounds_bitpos (struct type *);
92b52c5
 
92b52c5
 static int fat_pntr_bounds_bitsize (struct type *);
92b52c5
 
eb6cb2d
@@ -86,13 +86,13 @@ static struct type *desc_data_target_typ
92b52c5
 
92b52c5
 static struct value *desc_data (struct value *);
92b52c5
 
92b52c5
-static int fat_pntr_data_bitpos (struct type *);
92b52c5
+static LONGEST fat_pntr_data_bitpos (struct type *);
92b52c5
 
92b52c5
 static int fat_pntr_data_bitsize (struct type *);
92b52c5
 
92b52c5
 static struct value *desc_one_bound (struct value *, int, int);
92b52c5
 
92b52c5
-static int desc_bound_bitpos (struct type *, int, int);
92b52c5
+static LONGEST desc_bound_bitpos (struct type *, int, int);
92b52c5
 
92b52c5
 static int desc_bound_bitsize (struct type *, int, int);
92b52c5
 
eb6cb2d
@@ -172,7 +172,7 @@ static struct type *static_unwrap_type (
92b52c5
 
92b52c5
 static struct value *unwrap_value (struct value *);
92b52c5
 
92b52c5
-static struct type *constrained_packed_array_type (struct type *, long *);
92b52c5
+static struct type *constrained_packed_array_type (struct type *, LONGEST *);
92b52c5
 
92b52c5
 static struct type *decode_constrained_packed_array_type (struct type *);
92b52c5
 
eb6cb2d
@@ -187,7 +187,8 @@ static int ada_is_unconstrained_packed_a
92b52c5
 static struct value *value_subscript_packed (struct value *, int,
92b52c5
                                              struct value **);
92b52c5
 
92b52c5
-static void move_bits (gdb_byte *, int, const gdb_byte *, int, int, int);
92b52c5
+static void move_bits (gdb_byte *, int, const gdb_byte *, LONGEST, LONGEST,
92b52c5
+		       int);
92b52c5
 
92b52c5
 static struct value *coerce_unspec_val_to_type (struct value *,
92b52c5
                                                 struct type *);
eb6cb2d
@@ -215,14 +216,14 @@ static struct value *value_val_atr (stru
92b52c5
 static struct symbol *standard_lookup (const char *, const struct block *,
92b52c5
                                        domain_enum);
92b52c5
 
92b52c5
-static struct value *ada_search_struct_field (char *, struct value *, int,
92b52c5
+static struct value *ada_search_struct_field (char *, struct value *, LONGEST,
92b52c5
                                               struct type *);
92b52c5
 
92b52c5
-static struct value *ada_value_primitive_field (struct value *, int, int,
92b52c5
+static struct value *ada_value_primitive_field (struct value *, LONGEST, int,
92b52c5
                                                 struct type *);
92b52c5
 
92b52c5
-static int find_struct_field (const char *, struct type *, int,
92b52c5
-                              struct type **, int *, int *, int *, int *);
92b52c5
+static int find_struct_field (const char *, struct type *, LONGEST,
92b52c5
+			      struct type **, LONGEST *, int *, int *, int *);
92b52c5
 
92b52c5
 static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR,
92b52c5
                                                 struct value *);
eb6cb2d
@@ -238,7 +239,7 @@ static void ada_language_arch_info (stru
92b52c5
 
92b52c5
 static void check_size (const struct type *);
92b52c5
 
92b52c5
-static struct value *ada_index_struct_field (int, struct value *, int,
92b52c5
+static struct value *ada_index_struct_field (LONGEST, struct value *, LONGEST,
92b52c5
 					     struct type *);
92b52c5
 
92b52c5
 static struct value *assign_aggregate (struct value *, struct value *, 
eb6cb2d
@@ -694,7 +695,7 @@ coerce_unspec_val_to_type (struct value
92b52c5
 }
92b52c5
 
92b52c5
 static const gdb_byte *
92b52c5
-cond_offset_host (const gdb_byte *valaddr, long offset)
92b52c5
+cond_offset_host (const gdb_byte *valaddr, LONGEST offset)
92b52c5
 {
92b52c5
   if (valaddr == NULL)
92b52c5
     return NULL;
eb6cb2d
@@ -703,7 +704,7 @@ cond_offset_host (const gdb_byte *valadd
92b52c5
 }
92b52c5
 
92b52c5
 static CORE_ADDR
92b52c5
-cond_offset_target (CORE_ADDR address, long offset)
92b52c5
+cond_offset_target (CORE_ADDR address, LONGEST offset)
92b52c5
 {
92b52c5
   if (address == 0)
92b52c5
     return 0;
eb6cb2d
@@ -1711,7 +1712,7 @@ desc_bounds (struct value *arr)
92b52c5
 /* If TYPE is the type of an array-descriptor (fat pointer),  the bit
92b52c5
    position of the field containing the address of the bounds data.  */
92b52c5
 
92b52c5
-static int
92b52c5
+static LONGEST
92b52c5
 fat_pntr_bounds_bitpos (struct type *type)
92b52c5
 {
92b52c5
   return TYPE_FIELD_BITPOS (desc_base_type (type), 1);
eb6cb2d
@@ -1777,7 +1778,7 @@ desc_data (struct value *arr)
92b52c5
 /* If TYPE is the type of an array-descriptor (fat pointer), the bit
92b52c5
    position of the field containing the address of the data.  */
92b52c5
 
92b52c5
-static int
92b52c5
+static LONGEST
92b52c5
 fat_pntr_data_bitpos (struct type *type)
92b52c5
 {
92b52c5
   return TYPE_FIELD_BITPOS (desc_base_type (type), 0);
eb6cb2d
@@ -1812,7 +1813,7 @@ desc_one_bound (struct value *bounds, in
92b52c5
    of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
92b52c5
    bound, if WHICH is 1.  The first bound is I=1.  */
92b52c5
 
92b52c5
-static int
92b52c5
+static LONGEST
92b52c5
 desc_bound_bitpos (struct type *type, int i, int which)
92b52c5
 {
92b52c5
   return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2);
eb6cb2d
@@ -2002,7 +2003,7 @@ ada_type_of_array (struct value *arr, in
92b52c5
 	         zero, and does not need to be recomputed.  */
92b52c5
 	      if (lo < hi)
92b52c5
 		{
92b52c5
-		  int array_bitsize =
92b52c5
+		  LONGEST array_bitsize =
92b52c5
 		        (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0);
92b52c5
 
92b52c5
 		  TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8;
eb6cb2d
@@ -2154,7 +2155,7 @@ decode_packed_array_bitsize (struct type
92b52c5
    in bits.  */
92b52c5
 
92b52c5
 static struct type *
92b52c5
-constrained_packed_array_type (struct type *type, long *elt_bits)
92b52c5
+constrained_packed_array_type (struct type *type, LONGEST *elt_bits)
92b52c5
 {
92b52c5
   struct type *new_elt_type;
92b52c5
   struct type *new_type;
eb6cb2d
@@ -2206,7 +2207,7 @@ decode_constrained_packed_array_type (st
92b52c5
   char *name;
92b52c5
   const char *tail;
92b52c5
   struct type *shadow_type;
92b52c5
-  long bits;
92b52c5
+  LONGEST bits;
92b52c5
 
92b52c5
   if (!raw_name)
92b52c5
     raw_name = ada_type_name (desc_base_type (type));
eb6cb2d
@@ -2277,7 +2278,8 @@ decode_constrained_packed_array (struct
92b52c5
  	 array with no wrapper.  In order to interpret the value through
92b52c5
  	 the (left-justified) packed array type we just built, we must
92b52c5
  	 first left-justify it.  */
92b52c5
-      int bit_size, bit_pos;
92b52c5
+      int bit_size;
92b52c5
+      LONGEST bit_pos;
92b52c5
       ULONGEST mod;
92b52c5
 
92b52c5
       mod = ada_modulus (value_type (arr)) - 1;
eb6cb2d
@@ -2378,15 +2380,16 @@ has_negatives (struct type *type)
92b52c5
 
92b52c5
 struct value *
92b52c5
 ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
92b52c5
-				long offset, int bit_offset, int bit_size,
92b52c5
+				LONGEST offset, int bit_offset, int bit_size,
92b52c5
                                 struct type *type)
92b52c5
 {
92b52c5
   struct value *v;
92b52c5
-  int src,                      /* Index into the source area */
92b52c5
-    targ,                       /* Index into the target area */
92b52c5
-    srcBitsLeft,                /* Number of source bits left to move */
92b52c5
-    nsrc, ntarg,                /* Number of source and target bytes */
92b52c5
-    unusedLS,                   /* Number of bits in next significant
92b52c5
+  int src;                      /* Index into the source area */
92b52c5
+  LONGEST targ;                 /* Index into the target area */
92b52c5
+  int srcBitsLeft,              /* Number of source bits left to move */
92b52c5
+    nsrc;                       /* Number of source bytes */
92b52c5
+  LONGEST ntarg;                /* Number of target bytes */
92b52c5
+  int unusedLS,                 /* Number of bits in next significant
92b52c5
                                    byte of source that are unused */
92b52c5
     accumSize;                  /* Number of meaningful bits in accum */
92b52c5
   unsigned char *bytes;         /* First byte containing data to unpack */
eb6cb2d
@@ -2420,7 +2423,7 @@ ada_value_primitive_packed_val (struct v
92b52c5
 
92b52c5
   if (obj != NULL)
92b52c5
     {
92b52c5
-      long new_offset = offset;
92b52c5
+      LONGEST new_offset = offset;
92b52c5
 
92b52c5
       set_value_component_location (v, obj);
92b52c5
       set_value_bitpos (v, bit_offset + value_bitpos (obj));
eb6cb2d
@@ -2536,7 +2539,7 @@ ada_value_primitive_packed_val (struct v
92b52c5
    not overlap.  */
92b52c5
 static void
92b52c5
 move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source,
92b52c5
-	   int src_offset, int n, int bits_big_endian_p)
92b52c5
+	   LONGEST src_offset, LONGEST n, int bits_big_endian_p)
92b52c5
 {
92b52c5
   unsigned int accum, mask;
92b52c5
   int accum_bits, chunk_size;
eb6cb2d
@@ -2626,7 +2629,7 @@ ada_value_assign (struct value *toval, s
92b52c5
     {
92b52c5
       int len = (value_bitpos (toval)
92b52c5
 		 + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
92b52c5
-      int from_size;
92b52c5
+      LONGEST from_size;
872aab0
       gdb_byte *buffer = alloca (len);
92b52c5
       struct value *val;
92b52c5
       CORE_ADDR to_addr = value_address (toval);
eb6cb2d
@@ -2671,7 +2674,7 @@ value_assign_to_component (struct value
92b52c5
     (LONGEST)  (value_address (component) - value_address (container));
92b52c5
   int bit_offset_in_container = 
92b52c5
     value_bitpos (component) - value_bitpos (container);
92b52c5
-  int bits;
92b52c5
+  LONGEST bits;
92b52c5
   
92b52c5
   val = value_cast (value_type (component), val);
92b52c5
 
eb6cb2d
@@ -4196,7 +4199,7 @@ ensure_lval (struct value *val)
92b52c5
   if (VALUE_LVAL (val) == not_lval
92b52c5
       || VALUE_LVAL (val) == lval_internalvar)
92b52c5
     {
92b52c5
-      int len = TYPE_LENGTH (ada_check_typedef (value_type (val)));
92b52c5
+      LONGEST len = TYPE_LENGTH (ada_check_typedef (value_type (val)));
92b52c5
       const CORE_ADDR addr =
92b52c5
         value_as_long (value_allocate_space_in_inferior (len));
92b52c5
 
eb6cb2d
@@ -4270,7 +4273,7 @@ static CORE_ADDR
92b52c5
 value_pointer (struct value *value, struct type *type)
92b52c5
 {
92b52c5
   struct gdbarch *gdbarch = get_type_arch (type);
92b52c5
-  unsigned len = TYPE_LENGTH (type);
92b52c5
+  ULONGEST len = TYPE_LENGTH (type);
92b52c5
   gdb_byte *buf = alloca (len);
92b52c5
   CORE_ADDR addr;
92b52c5
 
eb6cb2d
@@ -6374,7 +6377,7 @@ value_tag_from_contents_and_address (str
92b52c5
 				     const gdb_byte *valaddr,
92b52c5
                                      CORE_ADDR address)
92b52c5
 {
92b52c5
-  int tag_byte_offset;
92b52c5
+  LONGEST tag_byte_offset;
92b52c5
   struct type *tag_type;
92b52c5
 
92b52c5
   if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
eb6cb2d
@@ -6839,7 +6842,7 @@ ada_in_variant (LONGEST val, struct type
92b52c5
    only in that it can handle packed values of arbitrary type.  */
92b52c5
 
92b52c5
 static struct value *
92b52c5
-ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
92b52c5
+ada_value_primitive_field (struct value *arg1, LONGEST offset, int fieldno,
92b52c5
                            struct type *arg_type)
92b52c5
 {
92b52c5
   struct type *type;
eb6cb2d
@@ -6851,7 +6854,7 @@ ada_value_primitive_field (struct value
92b52c5
 
92b52c5
   if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0)
92b52c5
     {
92b52c5
-      int bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
92b52c5
+      LONGEST bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
92b52c5
       int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno);
92b52c5
 
92b52c5
       return ada_value_primitive_packed_val (arg1, value_contents (arg1),
eb6cb2d
@@ -6878,9 +6881,9 @@ ada_value_primitive_field (struct value
92b52c5
    Returns 1 if found, 0 otherwise.  */
92b52c5
 
92b52c5
 static int
92b52c5
-find_struct_field (const char *name, struct type *type, int offset,
92b52c5
+find_struct_field (const char *name, struct type *type, LONGEST offset,
92b52c5
                    struct type **field_type_p,
92b52c5
-                   int *byte_offset_p, int *bit_offset_p, int *bit_size_p,
92b52c5
+		   LONGEST *byte_offset_p, int *bit_offset_p, int *bit_size_p,
92b52c5
 		   int *index_p)
92b52c5
 {
92b52c5
   int i;
eb6cb2d
@@ -6898,8 +6901,8 @@ find_struct_field (const char *name, str
92b52c5
 
92b52c5
   for (i = 0; i < TYPE_NFIELDS (type); i += 1)
92b52c5
     {
92b52c5
-      int bit_pos = TYPE_FIELD_BITPOS (type, i);
92b52c5
-      int fld_offset = offset + bit_pos / 8;
92b52c5
+      LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i);
92b52c5
+      LONGEST fld_offset = offset + bit_pos / 8;
92b52c5
       const char *t_field_name = TYPE_FIELD_NAME (type, i);
92b52c5
 
92b52c5
       if (t_field_name == NULL)
eb6cb2d
@@ -6969,7 +6972,7 @@ num_visible_fields (struct type *type)
92b52c5
    Searches recursively through wrapper fields (e.g., '_parent').  */
92b52c5
 
92b52c5
 static struct value *
92b52c5
-ada_search_struct_field (char *name, struct value *arg, int offset,
92b52c5
+ada_search_struct_field (char *name, struct value *arg, LONGEST offset,
92b52c5
                          struct type *type)
92b52c5
 {
92b52c5
   int i;
eb6cb2d
@@ -7002,7 +7005,7 @@ ada_search_struct_field (char *name, str
92b52c5
           int j;
92b52c5
           struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type,
92b52c5
 									i));
92b52c5
-          int var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
92b52c5
+	  LONGEST var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
92b52c5
 
92b52c5
           for (j = 0; j < TYPE_NFIELDS (field_type); j += 1)
92b52c5
             {
eb6cb2d
@@ -7020,8 +7023,8 @@ ada_search_struct_field (char *name, str
92b52c5
   return NULL;
92b52c5
 }
92b52c5
 
92b52c5
-static struct value *ada_index_struct_field_1 (int *, struct value *,
92b52c5
-					       int, struct type *);
92b52c5
+static struct value *ada_index_struct_field_1 (LONGEST *, struct value *,
92b52c5
+					       LONGEST, struct type *);
92b52c5
 
92b52c5
 
92b52c5
 /* Return field #INDEX in ARG, where the index is that returned by
eb6cb2d
@@ -7030,7 +7033,7 @@ static struct value *ada_index_struct_fi
92b52c5
  * If found, return value, else return NULL.  */
92b52c5
 
92b52c5
 static struct value *
92b52c5
-ada_index_struct_field (int index, struct value *arg, int offset,
92b52c5
+ada_index_struct_field (LONGEST index, struct value *arg, LONGEST offset,
92b52c5
 			struct type *type)
92b52c5
 {
92b52c5
   return ada_index_struct_field_1 (&index, arg, offset, type);
eb6cb2d
@@ -7042,7 +7045,7 @@ ada_index_struct_field (int index, struc
92b52c5
  * *INDEX_P.  */
92b52c5
 
92b52c5
 static struct value *
92b52c5
-ada_index_struct_field_1 (int *index_p, struct value *arg, int offset,
92b52c5
+ada_index_struct_field_1 (LONGEST *index_p, struct value *arg, LONGEST offset,
92b52c5
 			  struct type *type)
92b52c5
 {
92b52c5
   int i;
eb6cb2d
@@ -7132,7 +7135,8 @@ ada_value_struct_elt (struct value *arg,
92b52c5
     v = ada_search_struct_field (name, arg, 0, t);
92b52c5
   else
92b52c5
     {
92b52c5
-      int bit_offset, bit_size, byte_offset;
92b52c5
+      int bit_offset, bit_size;
92b52c5
+      LONGEST byte_offset;
92b52c5
       struct type *field_type;
92b52c5
       CORE_ADDR address;
92b52c5
 
eb6cb2d
@@ -7449,8 +7453,8 @@ ada_coerce_ref (struct value *val0)
92b52c5
 /* Return OFF rounded upward if necessary to a multiple of
92b52c5
    ALIGNMENT (a power of 2).  */
92b52c5
 
92b52c5
-static unsigned int
92b52c5
-align_value (unsigned int off, unsigned int alignment)
92b52c5
+static ULONGEST
92b52c5
+align_value (ULONGEST off, ULONGEST alignment)
92b52c5
 {
92b52c5
   return (off + alignment - 1) & ~(alignment - 1);
92b52c5
 }
eb6cb2d
@@ -7832,10 +7836,9 @@ ada_template_to_fixed_record_type_1 (str
92b52c5
   struct value *mark = value_mark ();
92b52c5
   struct value *dval;
92b52c5
   struct type *rtype;
92b52c5
-  int nfields, bit_len;
92b52c5
+  int nfields;
92b52c5
   int variant_field;
92b52c5
-  long off;
92b52c5
-  int fld_bit_len;
92b52c5
+  LONGEST off, bit_len, fld_bit_len;
92b52c5
   int f;
92b52c5
 
92b52c5
   /* Compute the number of fields in this record type that are going
eb6cb2d
@@ -7913,7 +7916,7 @@ ada_template_to_fixed_record_type_1 (str
92b52c5
 	     that follow this one.  */
92b52c5
 	  if (ada_is_aligner_type (field_type))
92b52c5
 	    {
92b52c5
-	      long field_offset = TYPE_FIELD_BITPOS (field_type, f);
92b52c5
+	      LONGEST field_offset = TYPE_FIELD_BITPOS (field_type, f);
92b52c5
 
92b52c5
 	      field_valaddr = cond_offset_host (field_valaddr, field_offset);
92b52c5
 	      field_address = cond_offset_target (field_address, field_offset);
eb6cb2d
@@ -8049,11 +8052,11 @@ ada_template_to_fixed_record_type_1 (str
92b52c5
   if (TYPE_LENGTH (type) <= 0)
92b52c5
     {
92b52c5
       if (TYPE_NAME (rtype))
92b52c5
-	warning (_("Invalid type size for `%s' detected: %d."),
92b52c5
-		 TYPE_NAME (rtype), TYPE_LENGTH (type));
92b52c5
+	warning (_("Invalid type size for `%s' detected: %s."),
92b52c5
+		 TYPE_NAME (rtype), pulongest (TYPE_LENGTH (type)));
92b52c5
       else
92b52c5
-	warning (_("Invalid type size for <unnamed> detected: %d."),
92b52c5
-		 TYPE_LENGTH (type));
92b52c5
+	warning (_("Invalid type size for <unnamed> detected: %s."),
92b52c5
+		 pulongest (TYPE_LENGTH (type)));
92b52c5
     }
92b52c5
   else
92b52c5
     {
eb6cb2d
@@ -8393,7 +8396,8 @@ to_fixed_array_type (struct type *type0,
92b52c5
 	 type was a regular (non-packed) array type.  As a result, the
92b52c5
 	 bitsize of the array elements needs to be set again, and the array
92b52c5
 	 length needs to be recomputed based on that bitsize.  */
92b52c5
-      int len = TYPE_LENGTH (result) / TYPE_LENGTH (TYPE_TARGET_TYPE (result));
92b52c5
+      LONGEST len = (TYPE_LENGTH (result)
92b52c5
+		     / TYPE_LENGTH (TYPE_TARGET_TYPE (result)));
92b52c5
       int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0);
92b52c5
 
92b52c5
       TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ada-lang.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ada-lang.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ada-lang.h	2014-06-24 16:07:27.245986875 +0200
eb6cb2d
@@ -181,7 +181,7 @@ extern void ada_print_type (struct type
92b52c5
 extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
92b52c5
 			       struct ui_file *stream);
92b52c5
 
92b52c5
-extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
92b52c5
+extern void ada_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
92b52c5
 			   struct ui_file *, int,
92b52c5
 			   const struct value *,
92b52c5
 			   const struct value_print_options *);
eb6cb2d
@@ -196,7 +196,7 @@ extern void ada_emit_char (int, struct t
92b52c5
 extern void ada_printchar (int, struct type *, struct ui_file *);
92b52c5
 
92b52c5
 extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *,
92b52c5
-			  unsigned int, const char *, int,
92b52c5
+			  ULONGEST, const char *, int,
92b52c5
 			  const struct value_print_options *);
92b52c5
 
92b52c5
 struct value *ada_convert_actual (struct value *actual,
eb6cb2d
@@ -267,7 +267,7 @@ extern int ada_is_constrained_packed_arr
92b52c5
 
92b52c5
 extern struct value *ada_value_primitive_packed_val (struct value *,
92b52c5
 						     const gdb_byte *,
92b52c5
-                                                     long, int, int,
92b52c5
+						     LONGEST, int, int,
92b52c5
                                                      struct type *);
92b52c5
 
92b52c5
 extern struct type *ada_coerce_to_simple_array_type (struct type *);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ada-typeprint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ada-typeprint.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ada-typeprint.c	2014-06-24 16:07:27.245986875 +0200
eb6cb2d
@@ -865,8 +865,8 @@ ada_print_type (struct type *type0, cons
92b52c5
 	    const char *name = ada_type_name (type);
92b52c5
 
92b52c5
 	    if (!ada_is_range_type_name (name))
92b52c5
-	      fprintf_filtered (stream, _("<%d-byte integer>"),
92b52c5
-				TYPE_LENGTH (type));
92b52c5
+	      fprintf_filtered (stream, _("<%s-byte integer>"),
92b52c5
+				pulongest (TYPE_LENGTH (type)));
92b52c5
 	    else
92b52c5
 	      {
92b52c5
 		fprintf_filtered (stream, "range ");
eb6cb2d
@@ -887,7 +887,8 @@ ada_print_type (struct type *type0, cons
92b52c5
 	  }
92b52c5
 	break;
92b52c5
       case TYPE_CODE_FLT:
92b52c5
-	fprintf_filtered (stream, _("<%d-byte float>"), TYPE_LENGTH (type));
92b52c5
+	fprintf_filtered (stream, _("<%s-byte float>"),
92b52c5
+			  pulongest (TYPE_LENGTH (type)));
92b52c5
 	break;
92b52c5
       case TYPE_CODE_ENUM:
92b52c5
 	if (show < 0)
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ada-valprint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ada-valprint.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ada-valprint.c	2014-06-24 16:07:27.246986876 +0200
2c55a54
@@ -35,11 +35,11 @@
2c55a54
 #include "objfiles.h"
92b52c5
 
92b52c5
 static int print_field_values (struct type *, const gdb_byte *,
92b52c5
-			       int,
92b52c5
+			       LONGEST,
92b52c5
 			       struct ui_file *, int,
92b52c5
 			       const struct value *,
92b52c5
 			       const struct value_print_options *,
2c55a54
-			       int, struct type *, int,
2c55a54
+			       int, struct type *, LONGEST,
2c55a54
 			       const struct language_defn *);
92b52c5
 
2c55a54
 
2c55a54
@@ -131,7 +131,7 @@ val_print_packed_array_elements (struct
92b52c5
   unsigned int things_printed = 0;
92b52c5
   unsigned len;
92b52c5
   struct type *elttype, *index_type;
92b52c5
-  unsigned eltlen;
92b52c5
+  ULONGEST eltlen;
92b52c5
   unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
92b52c5
   struct value *mark = value_mark ();
92b52c5
   LONGEST low = 0;
2c55a54
@@ -280,7 +280,7 @@ ada_emit_char (int c, struct type *type,
92b52c5
    of a character.  */
92b52c5
 
92b52c5
 static int
92b52c5
-char_at (const gdb_byte *string, int i, int type_len,
92b52c5
+char_at (const gdb_byte *string, LONGEST i, int type_len,
92b52c5
 	 enum bfd_endian byte_order)
92b52c5
 {
92b52c5
   if (type_len == 1)
2c55a54
@@ -442,11 +442,11 @@ ada_print_scalar (struct type *type, LON
92b52c5
 
92b52c5
 static void
92b52c5
 printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
92b52c5
-	  unsigned int length, int force_ellipses, int type_len,
92b52c5
+	  ULONGEST length, int force_ellipses, int type_len,
92b52c5
 	  const struct value_print_options *options)
92b52c5
 {
92b52c5
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (elttype));
92b52c5
-  unsigned int i;
92b52c5
+  ULONGEST i;
92b52c5
   unsigned int things_printed = 0;
92b52c5
   int in_quotes = 0;
92b52c5
   int need_comma = 0;
2c55a54
@@ -461,9 +461,9 @@ printstr (struct ui_file *stream, struct
92b52c5
     {
92b52c5
       /* Position of the character we are examining
92b52c5
          to see whether it is repeated.  */
92b52c5
-      unsigned int rep1;
92b52c5
+      ULONGEST rep1;
92b52c5
       /* Number of repetitions we have detected so far.  */
92b52c5
-      unsigned int reps;
92b52c5
+      ULONGEST reps;
92b52c5
 
92b52c5
       QUIT;
92b52c5
 
2c55a54
@@ -494,7 +494,8 @@ printstr (struct ui_file *stream, struct
92b52c5
 	  ada_emit_char (char_at (string, i, type_len, byte_order),
92b52c5
 			 elttype, stream, '\'', type_len);
92b52c5
 	  fputs_filtered ("'", stream);
92b52c5
-	  fprintf_filtered (stream, _(" <repeats %u times>"), reps);
92b52c5
+	  fprintf_filtered (stream, _(" <repeats %s times>"),
92b52c5
+			    pulongest (reps));
92b52c5
 	  i = rep1 - 1;
92b52c5
 	  things_printed += options->repeat_count_threshold;
92b52c5
 	  need_comma = 1;
2c55a54
@@ -522,7 +523,7 @@ printstr (struct ui_file *stream, struct
92b52c5
 
92b52c5
 void
92b52c5
 ada_printstr (struct ui_file *stream, struct type *type,
92b52c5
-	      const gdb_byte *string, unsigned int length,
92b52c5
+	      const gdb_byte *string, ULONGEST length,
92b52c5
 	      const char *encoding, int force_ellipses,
92b52c5
 	      const struct value_print_options *options)
92b52c5
 {
2c55a54
@@ -532,12 +533,12 @@ ada_printstr (struct ui_file *stream, st
92b52c5
 
92b52c5
 static int
92b52c5
 print_variant_part (struct type *type, int field_num,
92b52c5
-		    const gdb_byte *valaddr, int offset,
92b52c5
+		    const gdb_byte *valaddr, LONGEST offset,
92b52c5
 		    struct ui_file *stream, int recurse,
92b52c5
 		    const struct value *val,
92b52c5
 		    const struct value_print_options *options,
92b52c5
 		    int comma_needed,
2c55a54
-		    struct type *outer_type, int outer_offset,
2c55a54
+		    struct type *outer_type, LONGEST outer_offset,
2c55a54
 		    const struct language_defn *language)
92b52c5
 {
92b52c5
   struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
2c55a54
@@ -573,11 +574,11 @@ print_variant_part (struct type *type, i
92b52c5
 
92b52c5
 static int
92b52c5
 print_field_values (struct type *type, const gdb_byte *valaddr,
92b52c5
-		    int offset, struct ui_file *stream, int recurse,
92b52c5
+		    LONGEST offset, struct ui_file *stream, int recurse,
92b52c5
 		    const struct value *val,
92b52c5
 		    const struct value_print_options *options,
92b52c5
 		    int comma_needed,
2c55a54
-		    struct type *outer_type, int outer_offset,
2c55a54
+		    struct type *outer_type, LONGEST outer_offset,
2c55a54
 		    const struct language_defn *language)
92b52c5
 {
92b52c5
   int i, len;
2c55a54
@@ -644,7 +645,7 @@ print_field_values (struct type *type, c
92b52c5
 	    }
92b52c5
 	  else
92b52c5
 	    {
92b52c5
-	      int bit_pos = TYPE_FIELD_BITPOS (type, i);
92b52c5
+	      LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i);
92b52c5
 	      int bit_size = TYPE_FIELD_BITSIZE (type, i);
92b52c5
 	      struct value_print_options opts;
92b52c5
 
2c55a54
@@ -690,8 +691,8 @@ ada_val_print_string (struct type *type,
2c55a54
 {
2c55a54
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
2c55a54
   struct type *elttype = TYPE_TARGET_TYPE (type);
2c55a54
-  unsigned int eltlen;
2c55a54
-  unsigned int len;
2c55a54
+  ULONGEST eltlen;
2c55a54
+  ULONGEST len;
2c55a54
 
2c55a54
   /* We know that ELTTYPE cannot possibly be null, because we assume
2c55a54
      that we're called only when TYPE is a string-like type.
2c55a54
@@ -710,7 +711,7 @@ ada_val_print_string (struct type *type,
2c55a54
      elements up to it.  */
2c55a54
   if (options->stop_print_at_null)
2c55a54
     {
2c55a54
-      int temp_len;
2c55a54
+      LONGEST temp_len;
2c55a54
 
2c55a54
       /* Look for a NULL char.  */
2c55a54
       for (temp_len = 0;
2c55a54
@@ -1069,7 +1070,7 @@ ada_val_print_ref (struct type *type, co
2c55a54
 
2c55a54
 static void
2c55a54
 ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
2c55a54
-		 int offset, CORE_ADDR address,
2c55a54
+		 LONGEST offset, CORE_ADDR address,
2c55a54
 		 struct ui_file *stream, int recurse,
2c55a54
 		 const struct value *original_value,
2c55a54
 		 const struct value_print_options *options,
2c55a54
@@ -1150,7 +1151,7 @@ ada_val_print_1 (struct type *type, cons
2c55a54
 
2c55a54
 void
2c55a54
 ada_val_print (struct type *type, const gdb_byte *valaddr,
2c55a54
-	       int embedded_offset, CORE_ADDR address,
2c55a54
+	       LONGEST embedded_offset, CORE_ADDR address,
2c55a54
 	       struct ui_file *stream, int recurse,
2c55a54
 	       const struct value *val,
2c55a54
 	       const struct value_print_options *options)
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/annotate.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/annotate.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/annotate.c	2014-06-24 16:07:27.246986876 +0200
eb6cb2d
@@ -524,21 +524,21 @@ annotate_frame_end (void)
92b52c5
 }
92b52c5
 
92b52c5
 void
92b52c5
-annotate_array_section_begin (int idx, struct type *elttype)
92b52c5
+annotate_array_section_begin (LONGEST idx, struct type *elttype)
92b52c5
 {
92b52c5
   if (annotation_level == 2)
92b52c5
     {
92b52c5
-      printf_filtered (("\n\032\032array-section-begin %d "), idx);
92b52c5
+      printf_filtered (("\n\032\032array-section-begin %s "), plongest (idx));
92b52c5
       print_value_flags (elttype);
92b52c5
       printf_filtered (("\n"));
92b52c5
     }
92b52c5
 }
92b52c5
 
92b52c5
 void
92b52c5
-annotate_elt_rep (unsigned int repcount)
92b52c5
+annotate_elt_rep (ULONGEST repcount)
92b52c5
 {
92b52c5
   if (annotation_level == 2)
92b52c5
-    printf_filtered (("\n\032\032elt-rep %u\n"), repcount);
92b52c5
+    printf_filtered (("\n\032\032elt-rep %s\n"), pulongest (repcount));
92b52c5
 }
92b52c5
 
92b52c5
 void
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/annotate.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/annotate.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/annotate.h	2014-06-24 16:07:27.246986876 +0200
ab333d9
@@ -92,8 +92,8 @@ extern void annotate_frame_source_end (v
92b52c5
 extern void annotate_frame_where (void);
92b52c5
 extern void annotate_frame_end (void);
92b52c5
 
92b52c5
-extern void annotate_array_section_begin (int, struct type *);
92b52c5
-extern void annotate_elt_rep (unsigned int);
92b52c5
+extern void annotate_array_section_begin (LONGEST, struct type *);
92b52c5
+extern void annotate_elt_rep (ULONGEST);
92b52c5
 extern void annotate_elt_rep_end (void);
92b52c5
 extern void annotate_elt (void);
92b52c5
 extern void annotate_array_section_end (void);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/arm-linux-nat.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/arm-linux-nat.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/arm-linux-nat.c	2014-06-24 16:07:27.246986876 +0200
eb6cb2d
@@ -1187,7 +1187,7 @@ arm_linux_remove_hw_breakpoint (struct t
92b52c5
    ADDR?  */
92b52c5
 static int
eb6cb2d
 arm_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
eb6cb2d
-				       CORE_ADDR addr, int len)
eb6cb2d
+				       CORE_ADDR addr, LONGEST len)
92b52c5
 {
92b52c5
   const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap ();
92b52c5
   CORE_ADDR max_wp_length, aligned_addr;
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ax-gdb.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ax-gdb.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ax-gdb.c	2014-06-24 16:07:27.247986877 +0200
eb6cb2d
@@ -83,12 +83,12 @@ static void gen_traced_pop (struct gdbar
92b52c5
 static void gen_sign_extend (struct agent_expr *, struct type *);
92b52c5
 static void gen_extend (struct agent_expr *, struct type *);
92b52c5
 static void gen_fetch (struct agent_expr *, struct type *);
92b52c5
-static void gen_left_shift (struct agent_expr *, int);
92b52c5
+static void gen_left_shift (struct agent_expr *, LONGEST);
92b52c5
 
92b52c5
 
92b52c5
 static void gen_frame_args_address (struct gdbarch *, struct agent_expr *);
92b52c5
 static void gen_frame_locals_address (struct gdbarch *, struct agent_expr *);
92b52c5
-static void gen_offset (struct agent_expr *ax, int offset);
92b52c5
+static void gen_offset (struct agent_expr *ax, LONGEST offset);
92b52c5
 static void gen_sym_offset (struct agent_expr *, struct symbol *);
92b52c5
 static void gen_var_ref (struct gdbarch *, struct agent_expr *ax,
92b52c5
 			 struct axs_value *value, struct symbol *var);
eb6cb2d
@@ -136,15 +136,16 @@ static void gen_deref (struct agent_expr
92b52c5
 static void gen_address_of (struct agent_expr *, struct axs_value *);
92b52c5
 static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax,
92b52c5
 			      struct axs_value *value,
92b52c5
-			      struct type *type, int start, int end);
92b52c5
+			      struct type *type, LONGEST start, LONGEST end);
92b52c5
 static void gen_primitive_field (struct expression *exp,
92b52c5
 				 struct agent_expr *ax,
92b52c5
 				 struct axs_value *value,
92b52c5
-				 int offset, int fieldno, struct type *type);
92b52c5
+				 LONGEST offset, int fieldno,
92b52c5
+				 struct type *type);
92b52c5
 static int gen_struct_ref_recursive (struct expression *exp,
92b52c5
 				     struct agent_expr *ax,
92b52c5
 				     struct axs_value *value,
92b52c5
-				     char *field, int offset,
92b52c5
+				     char *field, LONGEST offset,
92b52c5
 				     struct type *type);
92b52c5
 static void gen_struct_ref (struct expression *exp, struct agent_expr *ax,
92b52c5
 			    struct axs_value *value,
eb6cb2d
@@ -539,7 +540,7 @@ gen_fetch (struct agent_expr *ax, struct
92b52c5
    right shift it by -DISTANCE bits if DISTANCE < 0.  This generates
92b52c5
    unsigned (logical) right shifts.  */
92b52c5
 static void
92b52c5
-gen_left_shift (struct agent_expr *ax, int distance)
92b52c5
+gen_left_shift (struct agent_expr *ax, LONGEST distance)
92b52c5
 {
92b52c5
   if (distance > 0)
92b52c5
     {
eb6cb2d
@@ -593,7 +594,7 @@ gen_frame_locals_address (struct gdbarch
92b52c5
    programming in ML, it would be clearer why these are the same
92b52c5
    thing.  */
92b52c5
 static void
92b52c5
-gen_offset (struct agent_expr *ax, int offset)
92b52c5
+gen_offset (struct agent_expr *ax, LONGEST offset)
92b52c5
 {
92b52c5
   /* It would suffice to simply push the offset and add it, but this
92b52c5
      makes it easier to read positive and negative offsets in the
eb6cb2d
@@ -1249,7 +1250,7 @@ gen_address_of (struct agent_expr *ax, s
92b52c5
 static void
92b52c5
 gen_bitfield_ref (struct expression *exp, struct agent_expr *ax,
92b52c5
 		  struct axs_value *value, struct type *type,
92b52c5
-		  int start, int end)
92b52c5
+		  LONGEST start, LONGEST end)
92b52c5
 {
92b52c5
   /* Note that ops[i] fetches 8 << i bits.  */
92b52c5
   static enum agent_op ops[]
eb6cb2d
@@ -1284,13 +1285,13 @@ gen_bitfield_ref (struct expression *exp
92b52c5
 
92b52c5
   /* The first and one-after-last bits in the field, but rounded down
92b52c5
      and up to byte boundaries.  */
92b52c5
-  int bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT;
92b52c5
-  int bound_end = (((end + TARGET_CHAR_BIT - 1)
92b52c5
-		    / TARGET_CHAR_BIT)
92b52c5
-		   * TARGET_CHAR_BIT);
92b52c5
+  LONGEST bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT;
92b52c5
+  LONGEST bound_end = (((end + TARGET_CHAR_BIT - 1)
92b52c5
+			/ TARGET_CHAR_BIT)
92b52c5
+		       * TARGET_CHAR_BIT);
92b52c5
 
92b52c5
   /* current bit offset within the structure */
92b52c5
-  int offset;
92b52c5
+  LONGEST offset;
92b52c5
 
92b52c5
   /* The index in ops of the opcode we're considering.  */
92b52c5
   int op;
eb6cb2d
@@ -1409,7 +1410,7 @@ gen_bitfield_ref (struct expression *exp
92b52c5
 static void
92b52c5
 gen_primitive_field (struct expression *exp,
92b52c5
 		     struct agent_expr *ax, struct axs_value *value,
92b52c5
-		     int offset, int fieldno, struct type *type)
92b52c5
+		     LONGEST offset, int fieldno, struct type *type)
92b52c5
 {
92b52c5
   /* Is this a bitfield?  */
92b52c5
   if (TYPE_FIELD_PACKED (type, fieldno))
eb6cb2d
@@ -1434,7 +1435,7 @@ gen_primitive_field (struct expression *
92b52c5
 static int
92b52c5
 gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
92b52c5
 			  struct axs_value *value,
92b52c5
-			  char *field, int offset, struct type *type)
92b52c5
+			  char *field, LONGEST offset, struct type *type)
92b52c5
 {
92b52c5
   int i, rslt;
92b52c5
   int nbases = TYPE_N_BASECLASSES (type);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ax-general.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ax-general.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ax-general.c	2014-06-24 16:07:27.247986877 +0200
872aab0
@@ -195,7 +195,7 @@ ax_zero_ext (struct agent_expr *x, int n
92b52c5
 
92b52c5
 /* Append a trace_quick instruction to EXPR, to record N bytes.  */
92b52c5
 void
92b52c5
-ax_trace_quick (struct agent_expr *x, int n)
92b52c5
+ax_trace_quick (struct agent_expr *x, LONGEST n)
92b52c5
 {
92b52c5
   /* N must fit in a byte.  */
92b52c5
   if (n < 0 || n > 255)
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/ax.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/ax.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/ax.h	2014-06-24 16:07:27.247986877 +0200
872aab0
@@ -207,7 +207,7 @@ extern void ax_ext (struct agent_expr *E
92b52c5
 extern void ax_zero_ext (struct agent_expr *EXPR, int N);
92b52c5
 
92b52c5
 /* Append a trace_quick instruction to EXPR, to record N bytes.  */
92b52c5
-extern void ax_trace_quick (struct agent_expr *EXPR, int N);
92b52c5
+extern void ax_trace_quick (struct agent_expr *EXPR, LONGEST N);
92b52c5
 
92b52c5
 /* Append a goto op to EXPR.  OP is the actual op (must be aop_goto or
92b52c5
    aop_if_goto).  We assume we don't know the target offset yet,
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/breakpoint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/breakpoint.c	2014-06-24 16:07:27.070986681 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/breakpoint.c	2014-06-24 16:07:27.249986879 +0200
eb6cb2d
@@ -6930,7 +6930,7 @@ breakpoint_address_match (struct address
92b52c5
 
92b52c5
 static int
92b52c5
 breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1,
92b52c5
-				int len1, struct address_space *aspace2,
92b52c5
+				LONGEST len1, struct address_space *aspace2,
92b52c5
 				CORE_ADDR addr2)
92b52c5
 {
556378e
   return ((gdbarch_has_global_breakpoints (target_gdbarch ())
eb6cb2d
@@ -11542,7 +11542,7 @@ can_use_hardware_watchpoint (struct valu
92b52c5
 		      && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
92b52c5
 		{
92b52c5
 		  CORE_ADDR vaddr = value_address (v);
92b52c5
-		  int len;
92b52c5
+		  LONGEST len;
92b52c5
 		  int num_regs;
92b52c5
 
92b52c5
 		  len = (target_exact_watchpoints
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/breakpoint.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/breakpoint.h	2014-06-24 16:07:27.036986643 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/breakpoint.h	2014-06-24 16:07:27.250986881 +0200
eb6cb2d
@@ -244,7 +244,7 @@ struct bp_target_info
92b52c5
 
92b52c5
   /* If this is a ranged breakpoint, then this field contains the
92b52c5
      length of the range that will be watched for execution.  */
92b52c5
-  int length;
92b52c5
+  LONGEST length;
92b52c5
 
92b52c5
   /* If the breakpoint lives in memory and reading that memory would
92b52c5
      give back the breakpoint, instead of the original contents, then
eb6cb2d
@@ -413,7 +413,7 @@ struct bp_location
92b52c5
   /* For hardware watchpoints, the size of the memory region being
92b52c5
      watched.  For hardware ranged breakpoints, the size of the
92b52c5
      breakpoint range.  */
92b52c5
-  int length;
92b52c5
+  LONGEST length;
92b52c5
 
92b52c5
   /* Type of hardware watchpoint.  */
92b52c5
   enum target_hw_bp_type watchpoint_type;
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/c-lang.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/c-lang.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/c-lang.c	2014-06-24 16:07:27.250986881 +0200
2c55a54
@@ -190,7 +190,7 @@ c_printchar (int c, struct type *type, s
92b52c5
 
92b52c5
 void
92b52c5
 c_printstr (struct ui_file *stream, struct type *type, 
92b52c5
-	    const gdb_byte *string, unsigned int length, 
92b52c5
+	    const gdb_byte *string, ULONGEST length,
92b52c5
 	    const char *user_encoding, int force_ellipses,
92b52c5
 	    const struct value_print_options *options)
92b52c5
 {
2c55a54
@@ -679,7 +679,7 @@ evaluate_subexp_c (struct type *expect_t
92b52c5
 	  }
92b52c5
 	else
92b52c5
 	  {
92b52c5
-	    int i;
92b52c5
+	    LONGEST i;
92b52c5
 
92b52c5
 	    /* Write the terminating character.  */
92b52c5
 	    for (i = 0; i < TYPE_LENGTH (type); ++i)
2c55a54
@@ -688,7 +688,7 @@ evaluate_subexp_c (struct type *expect_t
92b52c5
 	    if (satisfy_expected)
92b52c5
 	      {
92b52c5
 		LONGEST low_bound, high_bound;
92b52c5
-		int element_size = TYPE_LENGTH (type);
92b52c5
+		LONGEST element_size = TYPE_LENGTH (type);
92b52c5
 
92b52c5
 		if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type),
92b52c5
 					 &low_bound, &high_bound) < 0)
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/c-lang.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/c-lang.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/c-lang.h	2014-06-24 16:07:27.250986881 +0200
eb6cb2d
@@ -74,7 +74,7 @@ extern void c_print_typedef (struct type
92b52c5
 			     struct ui_file *);
92b52c5
 
92b52c5
 extern void c_val_print (struct type *, const gdb_byte *,
92b52c5
-			 int, CORE_ADDR,
92b52c5
+			 LONGEST, CORE_ADDR,
92b52c5
 			 struct ui_file *, int,
92b52c5
 			 const struct value *,
92b52c5
 			 const struct value_print_options *);
eb6cb2d
@@ -94,7 +94,7 @@ extern void c_printchar (int, struct typ
92b52c5
 extern void c_printstr (struct ui_file * stream,
92b52c5
 			struct type *elttype,
92b52c5
 			const gdb_byte *string,
92b52c5
-			unsigned int length,
92b52c5
+			ULONGEST length,
92b52c5
 			const char *user_encoding,
92b52c5
 			int force_ellipses,
92b52c5
 			const struct value_print_options *options);
eb6cb2d
@@ -120,14 +120,14 @@ extern void cp_print_class_member (const
92b52c5
 				   struct ui_file *, char *);
92b52c5
 
92b52c5
 extern void cp_print_value_fields (struct type *, struct type *,
92b52c5
-				   const gdb_byte *, int, CORE_ADDR,
92b52c5
+				   const gdb_byte *, LONGEST, CORE_ADDR,
92b52c5
 				   struct ui_file *, int,
92b52c5
 				   const struct value *,
92b52c5
 				   const struct value_print_options *,
92b52c5
 				   struct type **, int);
92b52c5
 
92b52c5
 extern void cp_print_value_fields_rtti (struct type *,
92b52c5
-					const gdb_byte *, int, CORE_ADDR,
92b52c5
+					const gdb_byte *, LONGEST, CORE_ADDR,
92b52c5
 					struct ui_file *, int,
92b52c5
 					const struct value *,
92b52c5
 					const struct value_print_options *,
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/c-valprint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/c-valprint.c	2014-06-24 16:07:26.285985810 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/c-valprint.c	2014-06-24 16:07:27.250986881 +0200
eb6cb2d
@@ -133,7 +133,7 @@ static const struct generic_val_print_de
92b52c5
 
92b52c5
 void
92b52c5
 c_val_print (struct type *type, const gdb_byte *valaddr,
92b52c5
-	     int embedded_offset, CORE_ADDR address,
92b52c5
+	     LONGEST embedded_offset, CORE_ADDR address,
92b52c5
 	     struct ui_file *stream, int recurse,
92b52c5
 	     const struct value *original_value,
92b52c5
 	     const struct value_print_options *options)
eb6cb2d
@@ -144,7 +144,7 @@ c_val_print (struct type *type, const gd
92b52c5
   unsigned len;
92b52c5
   struct type *elttype, *unresolved_elttype;
92b52c5
   struct type *unresolved_type = type;
92b52c5
-  unsigned eltlen;
92b52c5
+  ULONGEST eltlen;
92b52c5
   CORE_ADDR addr;
92b52c5
 
92b52c5
   CHECK_TYPEDEF (type);
eb6cb2d
@@ -380,9 +380,9 @@ c_val_print (struct type *type, const gd
92b52c5
 	  /* Print vtable entry - we only get here if NOT using
92b52c5
 	     -fvtable_thunks.  (Otherwise, look under
92b52c5
 	     TYPE_CODE_PTR.)  */
92b52c5
-	  int offset = (embedded_offset
92b52c5
-			+ TYPE_FIELD_BITPOS (type,
92b52c5
-					     VTBL_FNADDR_OFFSET) / 8);
92b52c5
+	  LONGEST offset = (embedded_offset
92b52c5
+			    + TYPE_FIELD_BITPOS (type,
92b52c5
+						 VTBL_FNADDR_OFFSET) / 8);
92b52c5
 	  struct type *field_type = TYPE_FIELD_TYPE (type,
92b52c5
 						     VTBL_FNADDR_OFFSET);
92b52c5
 	  CORE_ADDR addr
eb6cb2d
@@ -461,7 +461,8 @@ c_value_print (struct value *val, struct
92b52c5
 	       const struct value_print_options *options)
92b52c5
 {
92b52c5
   struct type *type, *real_type, *val_type;
92b52c5
-  int full, top, using_enc;
92b52c5
+  int full, using_enc;
92b52c5
+  LONGEST top;
92b52c5
   struct value_print_options opts = *options;
92b52c5
 
92b52c5
   opts.deref_ref = 1;
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/cp-abi.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/cp-abi.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/cp-abi.c	2014-06-24 16:07:27.250986881 +0200
92b52c5
@@ -68,13 +68,13 @@ is_operator_name (const char *name)
92b52c5
   return (*current_cp_abi.is_operator_name) (name);
92b52c5
 }
92b52c5
 
92b52c5
-int
92b52c5
+LONGEST
92b52c5
 baseclass_offset (struct type *type, int index, const gdb_byte *valaddr,
92b52c5
-		  int embedded_offset, CORE_ADDR address,
92b52c5
+		  LONGEST embedded_offset, CORE_ADDR address,
92b52c5
 		  const struct value *val)
92b52c5
 {
92b52c5
   volatile struct gdb_exception ex;
92b52c5
-  int res = 0;
92b52c5
+  LONGEST res = 0;
92b52c5
 
92b52c5
   gdb_assert (current_cp_abi.baseclass_offset != NULL);
92b52c5
 
92b52c5
@@ -98,7 +98,7 @@ baseclass_offset (struct type *type, int
92b52c5
 struct value *
92b52c5
 value_virtual_fn_field (struct value **arg1p,
92b52c5
 			struct fn_field *f, int j,
92b52c5
-			struct type *type, int offset)
92b52c5
+			struct type *type, LONGEST offset)
92b52c5
 {
92b52c5
   if ((current_cp_abi.virtual_fn_field) == NULL)
92b52c5
     return NULL;
92b52c5
@@ -108,7 +108,7 @@ value_virtual_fn_field (struct value **a
92b52c5
 
92b52c5
 struct type *
92b52c5
 value_rtti_type (struct value *v, int *full,
92b52c5
-		 int *top, int *using_enc)
92b52c5
+		 LONGEST *top, int *using_enc)
92b52c5
 {
92b52c5
   struct type *ret = NULL;
92b52c5
   volatile struct gdb_exception e;
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/cp-abi.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/cp-abi.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/cp-abi.h	2014-06-24 16:07:27.251986882 +0200
92b52c5
@@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi
92b52c5
 					     struct fn_field *f,
92b52c5
 					     int j,
92b52c5
 					     struct type *type,
92b52c5
-					     int offset);
92b52c5
+					     LONGEST offset);
92b52c5
 
92b52c5
 
92b52c5
 /* Try to find the run-time type of VALUE, using C++ run-time type
92b52c5
@@ -135,7 +135,7 @@ extern struct value *value_virtual_fn_fi
92b52c5
    FULL, TOP, and USING_ENC can each be zero, in which case we don't
92b52c5
    provide the corresponding piece of information.  */
92b52c5
 extern struct type *value_rtti_type (struct value *value,
92b52c5
-                                     int *full, int *top,
92b52c5
+                                     int *full, LONGEST *top,
92b52c5
 				     int *using_enc);
92b52c5
 
92b52c5
 /* Compute the offset of the baseclass which is the INDEXth baseclass
92b52c5
@@ -144,11 +144,11 @@ extern struct type *value_rtti_type (str
92b52c5
    contents of VAL.  The result is the offset of the baseclass value
92b52c5
    relative to (the address of)(ARG) + OFFSET.  */
92b52c5
 
92b52c5
-extern int baseclass_offset (struct type *type,
92b52c5
-			     int index, const gdb_byte *valaddr,
92b52c5
-			     int embedded_offset,
92b52c5
-			     CORE_ADDR address,
92b52c5
-			     const struct value *val);
92b52c5
+extern LONGEST baseclass_offset (struct type *type,
92b52c5
+				 int index, const gdb_byte *valaddr,
92b52c5
+				 LONGEST embedded_offset,
92b52c5
+				 CORE_ADDR address,
92b52c5
+				 const struct value *val);
92b52c5
 
92b52c5
 /* Describe the target of a pointer to method.  CONTENTS is the byte
92b52c5
    pattern representing the pointer to method.  TYPE is the pointer to
872aab0
@@ -227,12 +227,13 @@ struct cp_abi_ops
92b52c5
   struct value *(*virtual_fn_field) (struct value **arg1p,
92b52c5
 				     struct fn_field * f,
92b52c5
 				     int j, struct type * type,
92b52c5
-				     int offset);
92b52c5
+				     LONGEST offset);
92b52c5
   struct type *(*rtti_type) (struct value *v, int *full,
92b52c5
-			     int *top, int *using_enc);
92b52c5
-  int (*baseclass_offset) (struct type *type, int index,
92b52c5
-			   const bfd_byte *valaddr, int embedded_offset,
92b52c5
-			   CORE_ADDR address, const struct value *val);
92b52c5
+			     LONGEST *top, int *using_enc);
92b52c5
+  LONGEST (*baseclass_offset) (struct type *type, int index,
92b52c5
+			       const bfd_byte *valaddr,
92b52c5
+			       LONGEST embedded_offset, CORE_ADDR address,
92b52c5
+			       const struct value *val);
92b52c5
   void (*print_method_ptr) (const gdb_byte *contents,
92b52c5
 			    struct type *type,
92b52c5
 			    struct ui_file *stream);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/cp-valprint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/cp-valprint.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/cp-valprint.c	2014-06-24 16:07:27.251986882 +0200
92b52c5
@@ -82,7 +82,7 @@ static void cp_print_static_field (struc
92b52c5
 				   const struct value_print_options *);
92b52c5
 
92b52c5
 static void cp_print_value (struct type *, struct type *,
92b52c5
-			    const gdb_byte *, int,
92b52c5
+			    const gdb_byte *, LONGEST,
92b52c5
 			    CORE_ADDR, struct ui_file *,
92b52c5
 			    int, const struct value *,
92b52c5
 			    const struct value_print_options *,
92b52c5
@@ -156,7 +156,7 @@ cp_is_vtbl_member (struct type *type)
92b52c5
 
92b52c5
 void
92b52c5
 cp_print_value_fields (struct type *type, struct type *real_type,
92b52c5
-		       const gdb_byte *valaddr, int offset,
92b52c5
+		       const gdb_byte *valaddr, LONGEST offset,
92b52c5
 		       CORE_ADDR address, struct ui_file *stream,
92b52c5
 		       int recurse, const struct value *val,
92b52c5
 		       const struct value_print_options *options,
2c55a54
@@ -339,7 +339,7 @@ cp_print_value_fields (struct type *type
92b52c5
 		}
92b52c5
 	      else if (i == vptr_fieldno && type == vptr_basetype)
92b52c5
 		{
92b52c5
-		  int i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
92b52c5
+		  LONGEST i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
92b52c5
 		  struct type *i_type = TYPE_FIELD_TYPE (type, i);
92b52c5
 
92b52c5
 		  if (valprint_check_validity (stream, i_type, i_offset, val))
2c55a54
@@ -422,7 +422,7 @@ cp_print_value_fields (struct type *type
92b52c5
 
92b52c5
 void
92b52c5
 cp_print_value_fields_rtti (struct type *type,
92b52c5
-			    const gdb_byte *valaddr, int offset,
92b52c5
+			    const gdb_byte *valaddr, LONGEST offset,
92b52c5
 			    CORE_ADDR address,
92b52c5
 			    struct ui_file *stream, int recurse,
92b52c5
 			    const struct value *val,
2c55a54
@@ -438,7 +438,8 @@ cp_print_value_fields_rtti (struct type
92b52c5
 			TARGET_CHAR_BIT * TYPE_LENGTH (type)))
92b52c5
     {
92b52c5
       struct value *value;
92b52c5
-      int full, top, using_enc;
92b52c5
+      int full, using_enc;
92b52c5
+      LONGEST top;
92b52c5
 
92b52c5
       /* Ugh, we have to convert back to a value here.  */
92b52c5
       value = value_from_contents_and_address (type, valaddr + offset,
eb6cb2d
@@ -463,7 +464,7 @@ cp_print_value_fields_rtti (struct type
92b52c5
 
92b52c5
 static void
92b52c5
 cp_print_value (struct type *type, struct type *real_type,
92b52c5
-		const gdb_byte *valaddr, int offset,
92b52c5
+		const gdb_byte *valaddr, LONGEST offset,
92b52c5
 		CORE_ADDR address, struct ui_file *stream,
92b52c5
 		int recurse, const struct value *val,
92b52c5
 		const struct value_print_options *options,
eb6cb2d
@@ -473,7 +474,7 @@ cp_print_value (struct type *type, struc
92b52c5
     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
92b52c5
   struct obstack tmp_obstack = dont_print_vb_obstack;
92b52c5
   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
92b52c5
-  int thisoffset;
92b52c5
+  LONGEST thisoffset;
92b52c5
   struct type *thistype;
92b52c5
 
92b52c5
   if (dont_print_vb == 0)
eb6cb2d
@@ -487,7 +488,7 @@ cp_print_value (struct type *type, struc
92b52c5
 
92b52c5
   for (i = 0; i < n_baseclasses; i++)
92b52c5
     {
92b52c5
-      int boffset = 0;
92b52c5
+      LONGEST boffset = 0;
92b52c5
       int skip;
92b52c5
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
92b52c5
       const char *basename = TYPE_NAME (baseclass);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/d-lang.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/d-lang.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/d-lang.h	2014-06-24 16:07:27.251986882 +0200
eb6cb2d
@@ -69,7 +69,7 @@ extern const char *d_parse_symbol (struc
eb6cb2d
 /* Defined in d-valprint.c  */
92b52c5
 
92b52c5
 extern void d_val_print (struct type *type, const gdb_byte *valaddr,
92b52c5
-			 int embedded_offset, CORE_ADDR address,
92b52c5
+			 LONGEST embedded_offset, CORE_ADDR address,
92b52c5
 			 struct ui_file *stream, int recurse,
92b52c5
 			 const struct value *val,
92b52c5
 			 const struct value_print_options *options);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/d-valprint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/d-valprint.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/d-valprint.c	2014-06-24 16:07:27.251986882 +0200
92b52c5
@@ -29,7 +29,7 @@
92b52c5
 
92b52c5
 static int
92b52c5
 dynamic_array_type (struct type *type, const gdb_byte *valaddr,
92b52c5
-		    int embedded_offset, CORE_ADDR address,
92b52c5
+		    LONGEST embedded_offset, CORE_ADDR address,
92b52c5
 		    struct ui_file *stream, int recurse,
92b52c5
 		    const struct value *val,
92b52c5
 		    const struct value_print_options *options)
eb6cb2d
@@ -72,9 +72,9 @@ dynamic_array_type (struct type *type, c
92b52c5
 
92b52c5
 /* Implements the la_val_print routine for language D.  */
92b52c5
 void
92b52c5
-d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
92b52c5
-             CORE_ADDR address, struct ui_file *stream, int recurse,
92b52c5
-	     const struct value *val,
92b52c5
+d_val_print (struct type *type, const gdb_byte *valaddr,
92b52c5
+	     LONGEST embedded_offset, CORE_ADDR address,
92b52c5
+	     struct ui_file *stream, int recurse, const struct value *val,
92b52c5
              const struct value_print_options *options)
92b52c5
 {
92b52c5
   int ret;
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/doublest.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/doublest.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/doublest.c	2014-06-24 16:07:27.251986882 +0200
2c55a54
@@ -767,7 +767,7 @@ floatformat_from_doublest (const struct
92b52c5
    but not passed on by GDB.  This should be fixed.  */
92b52c5
 
92b52c5
 static const struct floatformat *
92b52c5
-floatformat_from_length (struct gdbarch *gdbarch, int len)
92b52c5
+floatformat_from_length (struct gdbarch *gdbarch, LONGEST len)
92b52c5
 {
92b52c5
   const struct floatformat *format;
92b52c5
 
2c55a54
@@ -795,8 +795,8 @@ floatformat_from_length (struct gdbarch
92b52c5
   else
92b52c5
     format = NULL;
92b52c5
   if (format == NULL)
92b52c5
-    error (_("Unrecognized %d-bit floating-point type."),
92b52c5
-	   len * TARGET_CHAR_BIT);
92b52c5
+    error (_("Unrecognized %s-bit floating-point type."),
92b52c5
+	   plongest (len * TARGET_CHAR_BIT));
92b52c5
   return format;
92b52c5
 }
92b52c5
 
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/dwarf2loc.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/dwarf2loc.c	2014-06-24 16:07:26.387985923 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/dwarf2loc.c	2014-06-24 16:07:27.252986883 +0200
eb6cb2d
@@ -1572,19 +1572,19 @@ insert_bits (unsigned int datum,
92b52c5
    BITS_BIG_ENDIAN is taken directly from gdbarch.  */
92b52c5
 
92b52c5
 static void
92b52c5
-copy_bitwise (gdb_byte *dest, unsigned int dest_offset_bits,
92b52c5
-	      const gdb_byte *source, unsigned int source_offset_bits,
92b52c5
-	      unsigned int bit_count,
92b52c5
+copy_bitwise (gdb_byte *dest, ULONGEST dest_offset_bits,
92b52c5
+	      const gdb_byte *source, ULONGEST source_offset,
92b52c5
+	      ULONGEST bit_count,
92b52c5
 	      int bits_big_endian)
92b52c5
 {
92b52c5
-  unsigned int dest_avail;
92b52c5
+  unsigned int dest_avail, source_offset_bits;
92b52c5
   int datum;
92b52c5
 
92b52c5
   /* Reduce everything to byte-size pieces.  */
92b52c5
   dest += dest_offset_bits / 8;
92b52c5
   dest_offset_bits %= 8;
92b52c5
-  source += source_offset_bits / 8;
92b52c5
-  source_offset_bits %= 8;
92b52c5
+  source += source_offset / 8;
92b52c5
+  source_offset_bits = source_offset % 8;
92b52c5
 
92b52c5
   dest_avail = 8 - dest_offset_bits % 8;
92b52c5
 
eb6cb2d
@@ -1622,13 +1622,13 @@ static void
92b52c5
 read_pieced_value (struct value *v)
92b52c5
 {
92b52c5
   int i;
92b52c5
-  long offset = 0;
92b52c5
+  LONGEST offset = 0;
92b52c5
   ULONGEST bits_to_skip;
92b52c5
   gdb_byte *contents;
92b52c5
   struct piece_closure *c
92b52c5
     = (struct piece_closure *) value_computed_closure (v);
92b52c5
   struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v));
92b52c5
-  size_t type_len;
92b52c5
+  ULONGEST type_len;
92b52c5
   size_t buffer_size = 0;
872aab0
   gdb_byte *buffer = NULL;
92b52c5
   struct cleanup *cleanup;
eb6cb2d
@@ -1655,8 +1655,8 @@ read_pieced_value (struct value *v)
92b52c5
   for (i = 0; i < c->n_pieces && offset < type_len; i++)
92b52c5
     {
92b52c5
       struct dwarf_expr_piece *p = &c->pieces[i];
92b52c5
-      size_t this_size, this_size_bits;
92b52c5
-      long dest_offset_bits, source_offset_bits, source_offset;
92b52c5
+      ULONGEST this_size, this_size_bits;
92b52c5
+      LONGEST dest_offset_bits, source_offset_bits, source_offset;
92b52c5
       const gdb_byte *intermediate_buffer;
92b52c5
 
92b52c5
       /* Compute size, source, and destination offsets for copying, in
eb6cb2d
@@ -1805,13 +1805,13 @@ static void
92b52c5
 write_pieced_value (struct value *to, struct value *from)
92b52c5
 {
92b52c5
   int i;
92b52c5
-  long offset = 0;
92b52c5
+  LONGEST offset = 0;
92b52c5
   ULONGEST bits_to_skip;
92b52c5
   const gdb_byte *contents;
92b52c5
   struct piece_closure *c
92b52c5
     = (struct piece_closure *) value_computed_closure (to);
92b52c5
   struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to));
92b52c5
-  size_t type_len;
92b52c5
+  ULONGEST type_len;
92b52c5
   size_t buffer_size = 0;
872aab0
   gdb_byte *buffer = NULL;
92b52c5
   struct cleanup *cleanup;
eb6cb2d
@@ -1839,8 +1839,8 @@ write_pieced_value (struct value *to, st
92b52c5
   for (i = 0; i < c->n_pieces && offset < type_len; i++)
92b52c5
     {
92b52c5
       struct dwarf_expr_piece *p = &c->pieces[i];
92b52c5
-      size_t this_size_bits, this_size;
92b52c5
-      long dest_offset_bits, source_offset_bits, dest_offset, source_offset;
92b52c5
+      ULONGEST this_size_bits, this_size;
92b52c5
+      LONGEST dest_offset_bits, source_offset_bits, dest_offset, source_offset;
92b52c5
       int need_bitwise;
92b52c5
       const gdb_byte *source_buffer;
92b52c5
 
eb6cb2d
@@ -1970,8 +1970,8 @@ write_pieced_value (struct value *to, st
92b52c5
    implicit pointer.  */
92b52c5
 
92b52c5
 static int
92b52c5
-check_pieced_value_bits (const struct value *value, int bit_offset,
92b52c5
-			 int bit_length,
92b52c5
+check_pieced_value_bits (const struct value *value, LONGEST bit_offset,
92b52c5
+			 LONGEST bit_length,
92b52c5
 			 enum dwarf_value_location check_for)
92b52c5
 {
92b52c5
   struct piece_closure *c
eb6cb2d
@@ -1987,7 +1987,7 @@ check_pieced_value_bits (const struct va
92b52c5
   for (i = 0; i < c->n_pieces && bit_length > 0; i++)
92b52c5
     {
92b52c5
       struct dwarf_expr_piece *p = &c->pieces[i];
92b52c5
-      size_t this_size_bits = p->size;
92b52c5
+      ULONGEST this_size_bits = p->size;
92b52c5
 
92b52c5
       if (bit_offset > 0)
92b52c5
 	{
eb6cb2d
@@ -2025,8 +2025,8 @@ check_pieced_value_bits (const struct va
92b52c5
 }
92b52c5
 
92b52c5
 static int
92b52c5
-check_pieced_value_validity (const struct value *value, int bit_offset,
92b52c5
-			     int bit_length)
92b52c5
+check_pieced_value_validity (const struct value *value, LONGEST bit_offset,
92b52c5
+			     LONGEST bit_length)
92b52c5
 {
92b52c5
   return check_pieced_value_bits (value, bit_offset, bit_length,
92b52c5
 				  DWARF_VALUE_MEMORY);
eb6cb2d
@@ -2044,8 +2044,8 @@ check_pieced_value_invalid (const struct
92b52c5
    a synthetic pointer.  */
92b52c5
 
92b52c5
 static int
92b52c5
-check_pieced_synthetic_pointer (const struct value *value, int bit_offset,
92b52c5
-				int bit_length)
92b52c5
+check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset,
92b52c5
+				LONGEST bit_length)
92b52c5
 {
92b52c5
   return check_pieced_value_bits (value, bit_offset, bit_length,
92b52c5
 				  DWARF_VALUE_IMPLICIT_POINTER);
eb6cb2d
@@ -2070,9 +2070,10 @@ indirect_pieced_value (struct value *val
92b52c5
   struct type *type;
92b52c5
   struct frame_info *frame;
92b52c5
   struct dwarf2_locexpr_baton baton;
92b52c5
-  int i, bit_offset, bit_length;
92b52c5
+  int i;
92b52c5
+  LONGEST bit_length;
92b52c5
   struct dwarf_expr_piece *piece = NULL;
92b52c5
-  LONGEST byte_offset;
92b52c5
+  LONGEST byte_offset, bit_offset;
92b52c5
 
92b52c5
   type = check_typedef (value_type (value));
92b52c5
   if (TYPE_CODE (type) != TYPE_CODE_PTR)
eb6cb2d
@@ -2086,7 +2087,7 @@ indirect_pieced_value (struct value *val
92b52c5
   for (i = 0; i < c->n_pieces && bit_length > 0; i++)
92b52c5
     {
92b52c5
       struct dwarf_expr_piece *p = &c->pieces[i];
92b52c5
-      size_t this_size_bits = p->size;
92b52c5
+      ULONGEST this_size_bits = p->size;
92b52c5
 
92b52c5
       if (bit_offset > 0)
92b52c5
 	{
eb6cb2d
@@ -2357,7 +2358,7 @@ dwarf2_evaluate_loc_desc_full (struct ty
92b52c5
 	    struct value *value = dwarf_expr_fetch (ctx, 0);
92b52c5
 	    gdb_byte *contents;
92b52c5
 	    const gdb_byte *val_bytes;
92b52c5
-	    size_t n = TYPE_LENGTH (value_type (value));
92b52c5
+	    ULONGEST n = TYPE_LENGTH (value_type (value));
92b52c5
 
92b52c5
 	    if (byte_offset + TYPE_LENGTH (type) > n)
92b52c5
 	      invalid_synthetic_pointer ();
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/dwarf2read.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/dwarf2read.c	2014-06-24 16:07:27.219986846 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/dwarf2read.c	2014-06-24 16:07:27.255986886 +0200
eb6cb2d
@@ -1889,12 +1889,12 @@ dwarf2_complex_location_expr_complaint (
92b52c5
 }
92b52c5
 
92b52c5
 static void
92b52c5
-dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
92b52c5
-					      int arg3)
92b52c5
+dwarf2_const_value_length_mismatch_complaint (const char *arg1, LONGEST arg2,
92b52c5
+					      LONGEST arg3)
92b52c5
 {
92b52c5
   complaint (&symfile_complaints,
92b52c5
-	     _("const value length mismatch for '%s', got %d, expected %d"),
92b52c5
-	     arg1, arg2, arg3);
92b52c5
+	     _("const value length mismatch for '%s', got %s, expected %s"),
92b52c5
+	     arg1, plongest (arg2), plongest (arg3));
92b52c5
 }
92b52c5
 
92b52c5
 static void
eb6cb2d
@@ -12326,8 +12326,8 @@ dwarf2_add_field (struct field_info *fip
92b52c5
 	         object, and then subtract off the number of bits of
92b52c5
 	         the field itself.  The result is the bit offset of
92b52c5
 	         the LSB of the field.  */
92b52c5
-	      int anonymous_size;
92b52c5
-	      int bit_offset = DW_UNSND (attr);
92b52c5
+	      LONGEST anonymous_size;
92b52c5
+	      LONGEST bit_offset = DW_UNSND (attr);
92b52c5
 
92b52c5
 	      attr = dwarf2_attr (die, DW_AT_byte_size, cu);
92b52c5
 	      if (attr)
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/eval.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/eval.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/eval.c	2014-06-24 16:07:27.256986887 +0200
eb6cb2d
@@ -297,7 +297,8 @@ evaluate_struct_tuple (struct value *str
556378e
   while (--nargs >= 0)
556378e
     {
92b52c5
       struct value *val = NULL;
92b52c5
-      int bitpos, bitsize;
92b52c5
+      LONGEST bitpos;
556378e
+      int bitsize;
92b52c5
       bfd_byte *addr;
92b52c5
 
556378e
       fieldno++;
eb6cb2d
@@ -359,7 +360,7 @@ init_array_element (struct value *array,
92b52c5
 		    enum noside noside, LONGEST low_bound, LONGEST high_bound)
92b52c5
 {
92b52c5
   LONGEST index;
92b52c5
-  int element_size = TYPE_LENGTH (value_type (element));
92b52c5
+  LONGEST element_size = TYPE_LENGTH (value_type (element));
92b52c5
 
92b52c5
   if (exp->elts[*pos].opcode == BINOP_COMMA)
92b52c5
     {
eb6cb2d
@@ -522,11 +523,11 @@ binop_promote (const struct language_def
92b52c5
     /* FIXME: Also mixed integral/booleans, with result an integer.  */
92b52c5
     {
92b52c5
       const struct builtin_type *builtin = builtin_type (gdbarch);
92b52c5
-      unsigned int promoted_len1 = TYPE_LENGTH (type1);
92b52c5
-      unsigned int promoted_len2 = TYPE_LENGTH (type2);
92b52c5
+      ULONGEST promoted_len1 = TYPE_LENGTH (type1);
92b52c5
+      ULONGEST promoted_len2 = TYPE_LENGTH (type2);
92b52c5
       int is_unsigned1 = TYPE_UNSIGNED (type1);
92b52c5
       int is_unsigned2 = TYPE_UNSIGNED (type2);
92b52c5
-      unsigned int result_len;
92b52c5
+      ULONGEST result_len;
92b52c5
       int unsigned_operation;
92b52c5
 
92b52c5
       /* Determine type length and signedness after promotion for
eb6cb2d
@@ -709,7 +710,7 @@ evaluate_subexp_standard (struct type *e
556378e
   struct value **argvec;
92b52c5
   int code;
92b52c5
   int ix;
92b52c5
-  long mem_offset;
92b52c5
+  LONGEST mem_offset;
92b52c5
   struct type **arg_types;
92b52c5
   int save_pos1;
92b52c5
   struct symbol *function = NULL;
eb6cb2d
@@ -888,7 +889,7 @@ evaluate_subexp_standard (struct type *e
92b52c5
 	  struct type *range_type = TYPE_INDEX_TYPE (type);
92b52c5
 	  struct type *element_type = TYPE_TARGET_TYPE (type);
92b52c5
 	  struct value *array = allocate_value (expect_type);
92b52c5
-	  int element_size = TYPE_LENGTH (check_typedef (element_type));
92b52c5
+	  LONGEST element_size = TYPE_LENGTH (check_typedef (element_type));
92b52c5
 	  LONGEST low_bound, high_bound, index;
92b52c5
 
92b52c5
 	  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
eb6cb2d
@@ -1903,7 +1904,8 @@ evaluate_subexp_standard (struct type *e
92b52c5
       {
92b52c5
         struct type *type = value_type (arg1);
92b52c5
         struct type *real_type;
92b52c5
-        int full, top, using_enc;
92b52c5
+        int full, using_enc;
92b52c5
+	LONGEST top;
92b52c5
 	struct value_print_options opts;
92b52c5
 
92b52c5
 	get_user_print_options (&opts);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/f-lang.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/f-lang.c	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/f-lang.c	2014-06-24 16:07:27.256986887 +0200
2c55a54
@@ -104,7 +104,7 @@ f_printchar (int c, struct type *type, s
92b52c5
 
92b52c5
 static void
92b52c5
 f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
92b52c5
-	    unsigned int length, const char *encoding, int force_ellipses,
92b52c5
+	    ULONGEST length, const char *encoding, int force_ellipses,
92b52c5
 	    const struct value_print_options *options)
92b52c5
 {
92b52c5
   const char *type_encoding = f_get_encoding (type);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/f-lang.h
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/f-lang.h	2014-06-13 03:59:36.000000000 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/f-lang.h	2014-06-24 16:07:27.256986887 +0200
eb6cb2d
@@ -30,7 +30,7 @@ extern void f_error (char *);	/* Defined
eb6cb2d
 extern void f_print_type (struct type *, const char *, struct ui_file *, int,
eb6cb2d
 			  int, const struct type_print_options *);
92b52c5
 
92b52c5
-extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
92b52c5
+extern void f_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
92b52c5
 			 struct ui_file *, int,
92b52c5
 			 const struct value *,
92b52c5
 			 const struct value_print_options *);
eb6cb2d
Index: gdb-7.7.90.20140613/gdb/f-valprint.c
92b52c5
===================================================================
2b55d27
--- gdb-7.7.90.20140613.orig/gdb/f-valprint.c	2014-06-24 16:07:26.371985905 +0200
2b55d27
+++ gdb-7.7.90.20140613/gdb/f-valprint.c	2014-06-24 16:07:27.256986887 +0200
eb6cb2d
@@ -41,7 +41,7 @@ extern void _initialize_f_valprint (void
eb6cb2d
 static void info_common_command (char *, int);
92b52c5
 static void f77_get_dynamic_length_of_aggregate (struct type *);
92b52c5
 
92b52c5
-int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
92b52c5
+LONGEST f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
92b52c5
 
92b52c5
 /* Array which holds offsets to be applied to get a row's elements
92b52c5
    for a given array.  Array also holds the size of each subarray.  */
eb6cb2d
@@ -76,8 +76,8 @@ f77_get_upperbound (struct type *type)
eb6cb2d
 static void
eb6cb2d
 f77_get_dynamic_length_of_aggregate (struct type *type)
92b52c5
 {
eb6cb2d
-  int upper_bound = -1;
eb6cb2d
-  int lower_bound = 1;
eb6cb2d
+  LONGEST upper_bound = -1;
eb6cb2d
+  LONGEST lower_bound = 1;
92b52c5
 
eb6cb2d
   /* Recursively go all the way down into a possibly multi-dimensional
eb6cb2d
      F77 array and get the bounds.  For simple arrays, this is pretty
eb6cb2d
@@ -109,7 +109,7 @@ f77_get_dynamic_length_of_aggregate (str
92b52c5
 static void
92b52c5
 f77_print_array_1 (int nss, int ndimensions, struct type *type,
92b52c5
 		   const gdb_byte *valaddr,
92b52c5
-		   int embedded_offset, CORE_ADDR address,
92b52c5
+		   LONGEST embedded_offset, CORE_ADDR address,
92b52c5
 		   struct ui_file *stream, int recurse,
92b52c5
 		   const struct value *val,
92b52c5
 		   const struct value_print_options *options,
eb6cb2d
@@ -118,7 +118,7 @@ f77_print_array_1 (int nss, int ndimensi
eb6cb2d
   struct type *range_type = TYPE_INDEX_TYPE (check_typedef (type));
eb6cb2d
   CORE_ADDR addr = address + embedded_offset;
eb6cb2d
   LONGEST lowerbound, upperbound;
92b52c5
-  int i;
92b52c5
+  LONGEST i;
92b52c5
 
eb6cb2d
   get_discrete_bounds (range_type, &lowerbound, &upperbound);
eb6cb2d
 
eb6cb2d
@@ -175,7 +175,7 @@ f77_print_array_1 (int nss, int ndi