Blame SOURCES/gdb-rhbz795424-bitpos-20of25.patch

861f93
http://sourceware.org/ml/gdb-patches/2012-09/msg00631.html
861f93
Subject: [PATCH 1/4] Expand bitpos and type.length to LONGEST and ULONGEST
861f93
861f93
861f93
--MP_/yp5f+W_ED2JtUlSyBi8xujr
861f93
Content-Type: text/plain; charset=US-ASCII
861f93
Content-Transfer-Encoding: 7bit
861f93
Content-Disposition: inline
861f93
861f93
Hi,
861f93
861f93
This is patch 1/4, which implements the bulk of the changes in type
861f93
length and bitpos/type offset. I have verified that there are no
861f93
regressions resulting from this patch by running the testsuite on
861f93
Fedora 16 x86_64.  Patch and changelog attached.
861f93
861f93
Regards,
861f93
Siddhesh
861f93
861f93
--MP_/yp5f+W_ED2JtUlSyBi8xujr
861f93
Content-Type: text/plain
861f93
Content-Transfer-Encoding: quoted-printable
861f93
Content-Disposition: attachment; filename=ChangeLog-main
861f93
861f93
gdb/ChangeLog
861f93
861f93
2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
861f93
861f93
	* ada-lang.c (fat_pntr_bounds_bitpos): Return LONGEST.
861f93
	(fat_pntr_data_bitpos): Likewise.
861f93
	(desc_bound_bitpos): Likewise.
861f93
	(constrained_packed_array_type): Expand ELT_BITS parameter to
861f93
	LONGEST.
861f93
	(move_bits): Expand parameters SRC_OFFSET and N to LONGEST.
861f93
	(cond_offset_host): Expand parameter OFFSET to LONGEST.
861f93
	(cond_offset_target): Likewise.
861f93
	(ada_type_of_array): Expand ARRAY_BITSIZE to LONGEST.
861f93
	(decode_constrained_packed_array_type): Expand BITS to LONGEST.
861f93
	(decode_constrained_packed_array): Expand BIT_POS to LONGEST.
861f93
	(ada_value_primitive_packed_val): Expand parameter OFFSET to
861f93
	LONGEST.  Expand TARG, NTARG and NEW_OFFSET to LONGEST.
861f93
	(ada_value_assign): Expand FROM_SIZE to LONGEST.
861f93
	(value_assign_to_component): Expand BITS to LONGEST.
861f93
	(ensure_lval): Expand LEN to LONGEST.
861f93
	(value_pointer): Expand LEN to ULONGEST.
861f93
	(value_tag_from_contents_and_address): Expand TAG_BYTE_OFFSET to
861f93
	LONGEST.
861f93
	(ada_value_primitive_field): Expand parameter OFFSET to LONGEST.
861f93
	Expand bit_pos to LONGEST.
861f93
	(find_struct_field): Expand parameters OFFSET and BYTE_OFFSET_P to
861f93
	LONGEST.  Expand BIT_POS and FLD_OFFSET to LONGEST.
861f93
	(ada_search_struct_field): Expand parameter OFFSET to LONGEST.
861f93
	Expand VAR_OFFSET to LONGEST.
861f93
	(ada_index_struct_field): Expand parameters INDEX and OFFSET to
861f93
	LONGEST.
861f93
	(ada_index_struct_field_1): Expand parameters INDEX_P and OFFSET
861f93
	to LONGEST.
861f93
	(ada_value_struct_elt): Expand BYTE_OFFSET to LONGEST.
861f93
	(align_value): Return ULONGEST.  Expand parameter OFF and
861f93
	ALIGNMENT to ULONGEST.
861f93
	(ada_template_to_fixed_record_type_1): Expand OFF, BIT_LEN and
861f93
	fld_bit_len to LONGEST.  Expand FIELD_OFFSET to LONGEST.  Use
861f93
	pulongest function to print TYPE_LENGTH.
861f93
	(to_fixed_array_type): Expand LEN to LONGEST.
861f93
	* ada-lang.h (ada_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	(ada_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	(ada_value_primitive_packed_val): Expand parameter OFFSET to
861f93
	LONGEST.
861f93
	* ada-typeprint.c (ada_print_type): Use pulongest to print
861f93
	TYPE_LENGTH.
861f93
	* ada-valprint.c (val_print_packed_array_elements): Expand ELTLEN
861f93
	to ULONGEST.
861f93
	(char_at): Expand parameter I to LONGEST.
861f93
	(printstr): Expand parameter LENGTH, I, REP1, REPS to ULONGEST.
861f93
	Use pulongest to format print REPS.
861f93
	(ada_printstr): Expand parameter LENGTH to LONGEST.
861f93
	(ada_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	(ada_val_print_array): Expand ELTLEN, LEN to ULONGEST and TEMP_LEN
861f93
	to LONGEST.
861f93
	(ada_val_print_1): Expand parameter OFFSET to LONGEST.
861f93
	(print_variant_part): Expand parameters OFFSET and OUTER_OFFSET to
861f93
	LONGEST.
861f93
	(print_field_values): Likewise.  Expand BIT_POS to LONGEST.
861f93
	* annotate.c (annotate_array_section_begin): Expand parameter
861f93
	IDX to LONGEST.  Use plongest to format-print IDX.
861f93
	(annotate_elt_rep): Expand parameter REPCOUNT to ULONGEST.  Use
861f93
	plongest to format-print REPCOUNT.
861f93
	* annotate.h: Likewise.
861f93
	* arm-linux-nat.c (arm_linux_region_ok_for_hw_watchpoint):
861f93
	Expand parameter parameter LEN to LONGEST.
861f93
	* ax-gdb.c (gen_left_shift): Expand parameter DISTANCE to LONGEST.
861f93
	(gen_offset): Expand parameter OFFSET to LONGEST.
861f93
	(gen_bitfield_ref): Expand parameters START, END to LONGEST.
861f93
	Expand BOUND_START, BOUND_END, OFFSET to LONGEST.
861f93
	(gen_primitive_field): Expand parameter OFFSET to LONGEST.
861f93
	(gen_struct_ref_recursive): Likewise.
861f93
	* ax-general.c (ax_trace_quick): Expand parameter N to LONGEST.
861f93
	* ax.h (ax_trace_quick): Likewise.
861f93
	* breakpoint.c (breakpoint_address_match_range): Expand parameter
861f93
	LEN1 to LONGEST.
861f93
	(can_use_hardware_watchpoint): Expand LEN to LONGEST.
861f93
	* breakpoint.h (struct bp_target_info): Expand member LENGTH to
861f93
	LONGEST.
861f93
	(struct bp_location): Likewise.
861f93
	* c-lang.c (c_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	(evaluate_subexp_c): Expand ELEMENT_SIZE, I to LONGEST.
861f93
	* c-lang.h (c_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	(c_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	(cp_print_value_fields): Expand parameter OFFSET to LONGEST.
861f93
	(cp_print_value_fields_rtti): Likewise.
861f93
	* c-typeprint.c (c_type_print_varspec_suffix): Remove cast down to
861f93
	int and use plongest to print LONGEST.
861f93
	* c-valprint.c (c_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.  Expand OFFSET to LONGEST, ELTLEN to ULONGEST.
861f93
	(c_value_print): Expand TOP to LONGEST.
861f93
	* cp-abi.c (baseclass_offset): Return LONGEST.  Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.  Expand RES to LONGEST.
861f93
	(value_virtual_fn_field): Expand parameter OFFSET to LONGEST.
861f93
	(value_rtti_type): Expand parameter TOP to point to LONGEST.
861f93
	* cp-abi.h (value_virtual_fn_field): Expand OFFSET to LONGEST.
861f93
	(value_rtti_type): Expand TOP to point to LONGEST.
861f93
	(baseclass_offset): Return LONGEST.  Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.
861f93
	(struct cp_abi_ops): Expand parameter OFFSET for VIRTUAL_FN_FIELD
861f93
	to LONGEST.  Expand parameter TOP to point to LONGEST in
861f93
	VALUE_RTTI_TYPE.  Return LONGEST from BASECLASS_OFFSET and expand
861f93
	parameter EMBEDDED_OFFSET to LONGEST.
861f93
	* cp-valprint.c (cp_print_value_fields): Expand parameter OFFSET
861f93
	to LONGEST.  Expand I_OFFSET to LONGEST.
861f93
	(cp_print_value_fields_rtti): Expand parameter OFFSET to
861f93
	LONGEST.  Expand TOP to LONGEST.
861f93
	(cp_print_value): Expand parameter OFFSET to LONGEST.  Expand
861f93
	THISOFFSET, BOFFSET to LONGEST.
861f93
	* d-lang.h (d_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	* d-valprint.c (dynamic_array_type): Likewise.
861f93
	(d_val_print): Likewise.
861f93
	* doublest.c (floatformat_from_length): Expand parameter LEN to
861f93
	LONGEST.  Use plongest to format string for LONGEST.
861f93
	* dwarf2loc.c (copy_bitwise): Expand parameters DEST_OFFSET_BITS,
861f93
	BIT_COUNT to ULONGEST.  Rename parameter SOURCE_OFFSET_BITS to
861f93
	SOURCE_OFFSET and expand to ULONGEST.  New variable
861f93
	SOURCE_OFFSET_BITS.
861f93
	(read_pieced_value): Expand OFFSET, DEST_OFFSET_BITS,
861f93
	SOURCE_OFFSET_BITS, SOURCE_OFFSET to LONGEST.  Expand TYPE_LEN,
861f93
	THIS_SIZE, THIS_SIZE_BITS to ULONGEST.
861f93
	(write_pieced_value): Likewise.
861f93
	(check_pieced_value_bits): Expand parameters BIT_OFFSET and
861f93
	BIT_LENGTH to LONGEST.  Expand THIS_SIZE_BITS to ULONGEST.
861f93
	(check_pieced_value_validity): Expand parameters BIT_OFFSET and
861f93
	BIT_LENGTH to LONGEST.
861f93
	(check_pieced_synthetic_pointer): Likewise.
861f93
	(indirect_pieced_value): Expand BIT_LENGTH, BYTE_OFFSET and
861f93
	BIT_OFFSET to LONGEST.
861f93
	(dwarf2_evaluate_loc_desc_full): Expand N to ULONGEST.
861f93
	* dwarf2read.c (dwarf2_const_value_length_mismatch_complaint):
861f93
	Expand parameters ARG2 and ARG3 to LONGEST.  Use plongest to
861f93
	print ARG2 and ARG3.
861f93
	(dwarf2_add_field): Expand ANONYMOUS_SIZE, BIT_OFFSET to
861f93
	LONGEST.
861f93
	* eval.c (evaluate_struct_tuple): Expand BITPOS to LONGEST.
861f93
	(init_array_element): Expand ELEMENT_SIZE to LONGEST.
861f93
	(binop_promote): Expand PROMOTED_LEN1, PROMOTED_LEN2, RESULT_LEN
861f93
	to ULONGEST.
861f93
	(evaluate_subexp_standard): Expand MEM_OFFSET, TOP, ELEMENT_SIZE
861f93
	to LONGEST.
861f93
	* f-lang.c (f_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	* f-lang.h (f_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	* f-valprint.c (f77_array_offset_tbl): Make LONGEST.
861f93
	(f77_create_arrayprint_offset_tbl): Expand ELTLEN to LONGEST.
861f93
	(f77_print_array_1): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.  Expand I to LONGEST.
861f93
	(f77_print_array): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	(f_val_print): Likewise.  Expand OFFSET to LONGEST.
861f93
	* findvar.c (default_value_from_register): Expand LEN to LONGEST.
861f93
	(read_frame_register_value): Expand OFFSET, REG_OFFSET, LEN,
861f93
	REG_LEN to LONGEST.
861f93
	* frame.c (get_frame_register_bytes): Expand parameter LEN to
861f93
	LONGEST.
861f93
	* frame.h (get_frame_register_bytes): Likewise.
861f93
	* gdbtypes.c (init_type): Expand parameter LENGTH to LONGEST.
861f93
	(is_unique_ancestor_worker): Expand parameters OFFSET,
861f93
	EMBEDDED_OFFSET to LONGEST.  Expand THIS_OFFSET to LONGEST.
861f93
	(is_unique_ancestor): Expand OFFSET to LONGEST.
861f93
	(recursive_dump_type): Use pulongest to format print TYPE_LENGTH.
861f93
	Use plongest to format print TYPE_FIELD_BITPOS.
861f93
	(arch_type): Expand parameter LENGTH to LONGEST.
861f93
	* gdbtypes.h (struct type.main_type.fld_bnds.fields): Expand
861f93
	member BITPOS to LONGEST.
861f93
	(struct type): Expand member LENGTH to ULONGEST.
861f93
	(init_type): Expand parameter LENGTH to LONGEST.
861f93
	(arch_type): Likewise.
861f93
	* gnu-v2-abi.c (gnuv2_virtual_fn_field): Expand parameter OFFSET
861f93
	to LONGEST.
861f93
	(gnuv2_value_rtti_type): Expand parameter TOP to point to LONGEST.
861f93
	(gnuv2_baseclass_offset): Return LONGEST.  Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.  Expand FIELD_OFFSET, BOFFSET,
861f93
	FIELD_LENGTH to LONGEST.
861f93
	* gnu-v3-abi.c (build_gdb_vtable_type): Expand OFFSET to LONGEST.
861f93
	(vtable_address_point_offset): Return LONGEST.
861f93
	(gnuv3_rtti_type): Expand parameter TOP_P to point to LONGEST.
861f93
	(gnuv3_virtual_fn_field): Expand parameter OFFSET to LONGEST.
861f93
	(gnuv3_baseclass_offset): Return LONGEST.  Expand parameter
861f93
	EMBEDDED_OFSET to LONGEST.  Expand CUR_BASE_OFFSET, BASE_OFFSET to
861f93
	LONGEST.
861f93
	(gnuv3_find_method_in): Expand POS to LONGEST.
861f93
	* go-lang.h (go_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	* go-valprint.c (print_go_string): Likewise.
861f93
	(go_val_print): Likewise.
861f93
	* i386-nat.c (i386_handle_nonaligned_watchpoint): Expand
861f93
	parameter LEN to LONGEST.
861f93
	(i386_region_ok_for_watchpoint): Likewise.
861f93
	* inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): Expand
861f93
	parameter LEN to LONGEST.
861f93
	* jv-lang.c (java_link_class_type): Expand BOFFSET to LONGEST.
861f93
	(java_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	* jv-lang.h (java_val_print): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	* jv-valprint.c (java_print_value_fields): Expand parameter OFFSET
861f93
	to LONGEST.
861f93
	(java_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	* language.c (unk_lang_printstr): Expand parameter LENGTH to
861f93
	ULONGEST.
861f93
	(unk_lang_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	* language.h (language_defn): Expand parameter LENGTH of
861f93
	LA_PRINTSTR to ULONGEST.  Expand parameter EMBEDDED_OFFSET of
861f93
	LA_VAL_PRINT to LONGEST.
861f93
	* m2-lang.c (m2_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	Expand I, REP1, REPS to ULONGEST.  Use pulongest to format print
861f93
	REPS.
861f93
	* m2-lang.h (m2_val_print): Expand parameter embedded_offset to
861f93
	LONGEST.
861f93
	* m2-typeprint.c (m2_array): New variable VAL.  Use pulongest to
861f93
	* format print VAL.
861f93
	(m2_enum): expand LASTVAL to LONGEST.
861f93
	* m2-valprint.c (m2_print_long_set): Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.
861f93
	(m2_print_unbounded_array): Likewise.
861f93
	(m2_print_array_contents): Likewise.
861f93
	(m2_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	Expand I, LEN, TEMP_LEN to ULONGEST.
861f93
	* memrange.c (mem_ranges_overlap): Expand parameters LEN1, LEN2 to
861f93
	LONGEST.
861f93
	* memrange.h (struct mem_range): Expand member LENGTH to LONGEST.
861f93
	(mem_ranges_overlap): Expand parameters LEN1, LEN2 to LONGEST.
861f93
	* mips-linux-nat.c (mips_linux_region_ok_for_hw_watchpoint):
861f93
	Expand parameter LEN to LONGEST.
861f93
	* objc-lang.c (objc_printstr): Expand parameter LENGTH to
861f93
	ULONGEST.  Expand I, REP1, REPS to ULONGEST.  use pulongest to
861f93
	format print REPS.
861f93
	* opencl-lang.c (lookup_opencl_vector_type): Expand parameter
861f93
	EL_LENGTH to ULONGEST.  Expand LENGTH to ULONGEST.
861f93
	(lval_func_read): Expand OFFSET, N, I, J and ELSIZE to LONGEST.
861f93
	(lval_func_write): Likewise.
861f93
	(lval_func_check_validity): Expand parameter LENGTH to LONGEST.
861f93
	Expand ELSIZE, START, END, I, STARTREST, ENDREST, COMP_OFFSET,
861f93
	COMP_LENGTH to LONGEST.
861f93
	(lval_func_check_any_valid): Expand ELSIZE to LONGEST.
861f93
	(lval_func_check_synthetic_pointer): Expand parameters OFFSET and
861f93
	LENGTH to LONGEST.  Expand ELSIZE, START, END, I, STARTREST,
861f93
	ENDREST, COMP_LENGTH, COMP_OFFSET to LONGEST.
861f93
	* p-lang.c (is_pascal_string_type): Expand parameters LENGTH_POS,
861f93
	STRING_POS, LENGTH_SIZE to point to LONGEST.
861f93
	(pascal_printstr): Expand parameter LENGTH to ULONGEST.  Expand
861f93
	I, REP1, REPS to ULONGEST.  Use pulongest to format print REPS.
861f93
	* p-lang.h (pascal_val_print): Expand parameter EMBEDDED_OFFSET
861f93
	to LONGEST.
861f93
	(is_pascal_string_type): Expand parameters LENGTH_POS, STRING_POS,
861f93
	LENGTH_SIZE to point to LONGEST.
861f93
	(pascal_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	(pascal_object_print_value_fields): Expand parameter OFFSET to
861f93
	LONGEST.
861f93
	* p-valprint.c (pascal_val_print): Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.  Expand ELTLEN to ULONGEST.  Expand
861f93
	LENGTH_SIZE, LENGTH_POS, STRING_POS to LONGEST.
861f93
	(pascal_object_print_value_fields): Expand parameter OFFSET to
861f93
	LONGEST.
861f93
	(pascal_object_print_value): Likewise.  Expand BOFFSET,
861f93
	THISOFFSET to LONGEST.
861f93
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint):
861f93
	Expand parameter LEN to point to LONGEST.
861f93
	* printcmd.c (print_formatted): Expand LEN to LONGEST.
861f93
	(print_scalar_formatted): Likewise.
861f93
	* procfs.c (procfs_region_ok_for_hw_watchpoint): Expand
861f93
	parameter LEN to LONGEST.
861f93
	* python/py-prettyprint.c (apply_val_pretty_printer): Expand
861f93
	parameter EMBEDDED_OFFSET to LONGEST.
861f93
	* python/python.h (apply_val_pretty_printer): Likewise.
861f93
	* regcache.c (regcache_xfer_part): Expand parameter OFFSET to
861f93
	LONGEST.
861f93
	(regcache_raw_read_part): Likewise.
861f93
	(regcache_raw_write_part): Likewise.
861f93
	(regcache_cooked_read_part): Likewise.
861f93
	(regcache_cooked_write_part): Likewise.
861f93
	* regcache.h (regcache_raw_read_part): Likewise.
861f93
	(regcache_raw_write_part): Likewise.
861f93
	(regcache_cooked_read_part): Likewise.
861f93
	(regcache_cooked_write_part): Likewise.
861f93
	* remote.c (remote_region_ok_for_hw_watchpoint): Expand
861f93
	parameter LEN to LONGEST.
861f93
	* s390-nat.c (s390_region_ok_for_hw_watchpoint): Expand
861f93
	parameter LEN to LONGEST.
861f93
	* spu-multiarch.c (spu_region_ok_for_hw_watchpoint): Expand
861f93
	parameter len to LONGEST.
861f93
	* stack.c (print_frame_nameless_args): Expand parameter START to
861f93
	LONGEST.
861f93
	(print_frame_args): Expand HIGHEST_OFFSET, CURRENT_OFFSET,
861f93
	ARG_SIZE, START to LONGEST.
861f93
	* symmisc.c (print_symbol): Expand I to ULONGEST.  Use pulongest
861f93
	to format print TYPE_LENGTH.
861f93
	* target.c (default_region_ok_for_hw_watchpoint): Expand parameter
861f93
	LEN to LONGEST.
861f93
	(debug_to_region_ok_for_hw_watchpoint): Likewise.
861f93
	* target.h (struct target_ops): Expand parameter LEN to LONGEST
861f93
	for TO_REGION_OK_FOR_HW_WATCHPOINT.
861f93
	* tracepoint.c (add_memrange): Expand parameter LEN to LONGEST.
861f93
	Use plongest to format print LEN.
861f93
	(collect_symbol): Expand LEN to ULONGEST.  Use pulongest to
861f93
	format print LEN.
861f93
	(scope_info): Expand J to LONGEST.  Use pulongest to format
861f93
	print TYPE_LENGTH.
861f93
	* typeprint.c (whatis_exp): Expand TOP to LONGEST.
861f93
	* valarith.c (value_subscripted_rvalue): Expand parameters INDEX
861f93
	and LOWERBOUND to LONGEST.  Expand ELT_SIZE, ELT_OFFS to ULONGEST.
861f93
	(value_concat): expand INVAL1LEN and INVAL2LEN to ssize_t.
861f93
	(value_logical_not): Expand LEN to LONGEST.
861f93
	(value_strcmp): Expand LEN1, LEN2, I, LEN to LONGEST.
861f93
	* valops.c (value_allocate_space_in_inferior): Expand parameter
861f93
	LEN to LONGEST.
861f93
	(value_cast_structs): Expand TOP to LONGEST.
861f93
	(value_cast): Expand ELEMENT_LENGTH to ULONGEST.  Expand
861f93
	VAL_LENGTH to LONGEST.
861f93
	(dynamic_cast_check_1): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.  Expand OFFSET to LONGEST.
861f93
	(dynamic_cast_check_2): Likewise.
861f93
	(value_dynamic_cast): Expand TOP to LONGEST.
861f93
	(read_value_memory): Expand EMBEDDED_OFFSET to LONGEST.
861f93
	(value_assign): Expand CHANGED_LEN, OFFSET to LONGEST.
861f93
	(value_array): Expand TYPELENGTH to ULONGEST.
861f93
	(update_search_result): Expand parameters LAST_BOFFSET, BOFFSET
861f93
	to LONGEST.
861f93
	(do_search_struct_field): Expand parameter OFFSET, LAST_BOFFSET
861f93
	to LONGEST.  Expand NEW_OFFSET, BOFFSET to LONGEST.
861f93
	(search_struct_field): Expand parameter OFFSET to LONGEST.
861f93
	Expand BOFFSET to LONGEST.
861f93
	(search_struct_method): Expand parameter OFFSET to LONGEST.
861f93
	Expand BASE_OFFSET, THIS_OFFSET to LONGEST.
861f93
	(find_method_list): Expand parameters OFFSET, BOFFSET to
861f93
	LONGEST.  Expand BASE_OFFSET to LONGEST.
861f93
	(value_find_oload_method_list): Expand parameter BOFFSET to point
861f93
	to LONGEST.
861f93
	(find_overload_match): Expand BOFFSET to LONGEST.
861f93
	(value_struct_elt_for_reference): Expand parameter OFFSET to
861f93
	LONGEST.  Remove unneeded cast.  Expand BASE_OFFSET to LONGEST.
861f93
	(value_rtti_indirect_type): Expand parameter TOP to point to
861f93
	LONGEST.
861f93
	(value_full_object): Expand parameter XTOP to LONGEST.  Expand
861f93
	TOP to LONGEST.
861f93
	* valprint.c (valprint_check_validity): Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.
861f93
	(generic_val_print): Likewise.
861f93
	(val_print): Likewise.
861f93
	(val_print_scalar_formatted): Likewise.
861f93
	(print_hex_chars): Expand parameter LEN to ULONGEST.
861f93
	(val_print_array_elements): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST, I to ULONGEST.  Expand LEN, ELTLEN, REP1, REPS to
861f93
	ULONGEST.  Use pulongest to format print REPS.
861f93
	(generic_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	* valprint.h (val_print_array_elements): Expand parameter
861f93
	EMBEDDED_OFFSET to LONGEST.
861f93
	(val_print_scalar_formatted): Likewise.
861f93
	(print_hex_chars): Expand parameter LEN to ULONGEST.
861f93
	(generic_val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	(generic_printstr): Expand parameter LENGTH to ULONGEST.
861f93
	* value.c (struct range): Expand members OFFSET, LENGTH to
861f93
	LONGEST.
861f93
	(ranges_overlap): Expand parameters OFFSET1, OFFSET2, LEN1 AND
861f93
	LEN2 to LONGEST.
861f93
	(range_contain): Expand parameter OFFSET, LENGTH to LONGEST.
861f93
	(struct value): Expand members OFFSET, EMBEDDED_OFFSET,
861f93
	POINTED_TO_OFFSET to LONGEST.
861f93
	(value_bytes_available): Expand parameters OFFSET, LENGTH to
861f93
	LONGEST.
861f93
	(mark_value_bytes_unavailable): Likewise.
861f93
	(find_first_range_overlap): Likewise.
861f93
	(value_available_contents_eq): Expand parameters OFFSET1, OFFSET2
861f93
	and LENGTH to LONGEST.
861f93
	(value_offset): Return LONGEST.
861f93
	(set_value_offset): Expand parameter OFFSET to LONGEST.
861f93
	(value_contents_copy_raw): Expand parameters SRC_OFFSET,
861f93
	DST_OFFSET, LENGTH to ssize_t.
861f93
	(value_contents_copy): Likewise.
861f93
	(value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST.
861f93
	(value_bits_synthetic_pointer): Likewise.
861f93
	(value_embedded_offset): Return LONGEST.
861f93
	(set_value_embedded_offset): Expand parameter VAL to LONGEST.
861f93
	(value_pointed_to_offset): Return LONGEST.
861f93
	(set_value_pointed_to_offset): Expand parameter VAL to LONGEST.
861f93
	(set_internalvar_component): Expand parameter OFFSET to LONGEST.
861f93
	(value_primitive_field): Likewise.  Expand BITPOS, BOFFSET,
861f93
	CONTAINER_BITSIZE to LONGEST.
861f93
	(value_fn_field): Expand parameter OFFSET to LONGEST.
861f93
	(unpack_value_bits_as_long_1): Expand parameters EMBEDDED_OFFSET,
861f93
	BITPOS to LONGEST.  Expand READ_OFFSET to LONGEST.
861f93
	(unpack_value_bits_as_long): Expand parameter EMBEDED_OFFSET to
861f93
	LONGEST.
861f93
	(unpack_value_field_as_long_1): Likewise.  Expand BITPOS to
861f93
	LONGEST.
861f93
	(unpack_value_field_as_long): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	(value_field_bitfield): Likewise.
861f93
	(modify_field): Expand parameter BITPOS to LONGEST.  Expand
861f93
	BYTESIZE to LONGEST.
861f93
	* value.h (value_offset): Return LONGEST.
861f93
	(set_value_offset): Expand parameter OFFSET to LONGEST.
861f93
	(value_pointed_to_offset): Return LONGEST.
861f93
	(set_value_pointed_to_offset): Expand parameter VAL to LONGEST.
861f93
	(value_embedded_offset): Return LONGEST.
861f93
	(set_value_embedded_offset): Expand parameter VAL to LONGEST.
861f93
	(struct lval_funcs): Expand parameters OFFSET and LENGTH to
861f93
	LONGEST for CHECK_VALIDITY.  Likewise for CHECK_SYNTHETIC_POINTER.
861f93
	(valprint_check_validity): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	(value_bits_valid): Expand parameters OFFSET, LENGTH to LONGEST.
861f93
	(value_bits_synthetic_pointer): Likewise.
861f93
	(value_bytes_available): Likewise.
861f93
	(mark_value_bytes_unavailable): Likewise.
861f93
	(value_available_contents_eq): Fix comment.  Expand parameters
861f93
	OFFSET1, OFFSET2, LENGTH to LONGEST.
861f93
	(read_value_memory): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	(unpack_value_bits_as_long): Expand parameter EMBEDDED_OFFSET to
861f93
	LONGEST.
861f93
	(unpack_value_field_as_long): Likewise.
861f93
	(value_field_bitfield): Likewise.
861f93
	(value_contents_copy_raw): Expand parameters SRC_OFFSET,
861f93
	DST_OFFSET, LENGTH to LONGEST.
861f93
	(value_contents_copy): Likewise.
861f93
	(value_primitive_field): Expand parameter OFFSET to LONGEST.
861f93
	(value_rtti_indirect_type): Expand parameter TOP to point to
861f93
	LONGEST.
861f93
	(value_full_object): Expand parameter XTOP to LONGEST.
861f93
	(set_internalvar_component): Expand parameter OFFSET to LONGEST.
861f93
	(value_fn_field): Expand parameter OFFSET to LONGEST.
861f93
	(modify_field): Expand parameter BITPOS to LONGEST.
861f93
	(val_print): Expand parameter EMBEDDED_OFFSET to LONGEST.
861f93
	(value_allocate_space_in_inferior): Expand parameter LEN to
861f93
	LONGEST.
861f93
861f93
gdb/testsuite/ChangeLog:
861f93
861f93
2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
861f93
861f93
	* gdb.base/longest-types.exp: Add test case to get offset of
861f93
	BUF2.
861f93
861f93
--MP_/yp5f+W_ED2JtUlSyBi8xujr
861f93
Content-Type: text/x-patch
861f93
Content-Transfer-Encoding: 7bit
861f93
Content-Disposition: attachment; filename=bitpos-main.patch
861f93
861f93
Index: gdb-7.6.1/gdb/ada-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ada-lang.c	2013-08-30 21:54:18.725367534 +0200
861f93
+++ gdb-7.6.1/gdb/ada-lang.c	2013-08-30 21:54:20.446368186 +0200
861f93
@@ -80,7 +80,7 @@ static struct type *desc_bounds_type (st
861f93
 
861f93
 static struct value *desc_bounds (struct value *);
861f93
 
861f93
-static int fat_pntr_bounds_bitpos (struct type *);
861f93
+static LONGEST fat_pntr_bounds_bitpos (struct type *);
861f93
 
861f93
 static int fat_pntr_bounds_bitsize (struct type *);
861f93
 
861f93
@@ -88,13 +88,13 @@ static struct type *desc_data_target_typ
861f93
 
861f93
 static struct value *desc_data (struct value *);
861f93
 
861f93
-static int fat_pntr_data_bitpos (struct type *);
861f93
+static LONGEST fat_pntr_data_bitpos (struct type *);
861f93
 
861f93
 static int fat_pntr_data_bitsize (struct type *);
861f93
 
861f93
 static struct value *desc_one_bound (struct value *, int, int);
861f93
 
861f93
-static int desc_bound_bitpos (struct type *, int, int);
861f93
+static LONGEST desc_bound_bitpos (struct type *, int, int);
861f93
 
861f93
 static int desc_bound_bitsize (struct type *, int, int);
861f93
 
861f93
@@ -174,7 +174,7 @@ static struct type *static_unwrap_type (
861f93
 
861f93
 static struct value *unwrap_value (struct value *);
861f93
 
861f93
-static struct type *constrained_packed_array_type (struct type *, long *);
861f93
+static struct type *constrained_packed_array_type (struct type *, LONGEST *);
861f93
 
861f93
 static struct type *decode_constrained_packed_array_type (struct type *);
861f93
 
861f93
@@ -189,7 +189,8 @@ static int ada_is_unconstrained_packed_a
861f93
 static struct value *value_subscript_packed (struct value *, int,
861f93
                                              struct value **);
861f93
 
861f93
-static void move_bits (gdb_byte *, int, const gdb_byte *, int, int, int);
861f93
+static void move_bits (gdb_byte *, int, const gdb_byte *, LONGEST, LONGEST,
861f93
+		       int);
861f93
 
861f93
 static struct value *coerce_unspec_val_to_type (struct value *,
861f93
                                                 struct type *);
861f93
@@ -217,14 +218,14 @@ static struct value *value_val_atr (stru
861f93
 static struct symbol *standard_lookup (const char *, const struct block *,
861f93
                                        domain_enum);
861f93
 
861f93
-static struct value *ada_search_struct_field (char *, struct value *, int,
861f93
+static struct value *ada_search_struct_field (char *, struct value *, LONGEST,
861f93
                                               struct type *);
861f93
 
861f93
-static struct value *ada_value_primitive_field (struct value *, int, int,
861f93
+static struct value *ada_value_primitive_field (struct value *, LONGEST, int,
861f93
                                                 struct type *);
861f93
 
861f93
-static int find_struct_field (const char *, struct type *, int,
861f93
-                              struct type **, int *, int *, int *, int *);
861f93
+static int find_struct_field (const char *, struct type *, LONGEST,
861f93
+			      struct type **, LONGEST *, int *, int *, int *);
861f93
 
861f93
 static struct value *ada_to_fixed_value_create (struct type *, CORE_ADDR,
861f93
                                                 struct value *);
861f93
@@ -240,7 +241,7 @@ static void ada_language_arch_info (stru
861f93
 
861f93
 static void check_size (const struct type *);
861f93
 
861f93
-static struct value *ada_index_struct_field (int, struct value *, int,
861f93
+static struct value *ada_index_struct_field (LONGEST, struct value *, LONGEST,
861f93
 					     struct type *);
861f93
 
861f93
 static struct value *assign_aggregate (struct value *, struct value *, 
861f93
@@ -587,7 +588,7 @@ coerce_unspec_val_to_type (struct value
861f93
 }
861f93
 
861f93
 static const gdb_byte *
861f93
-cond_offset_host (const gdb_byte *valaddr, long offset)
861f93
+cond_offset_host (const gdb_byte *valaddr, LONGEST offset)
861f93
 {
861f93
   if (valaddr == NULL)
861f93
     return NULL;
861f93
@@ -596,7 +597,7 @@ cond_offset_host (const gdb_byte *valadd
861f93
 }
861f93
 
861f93
 static CORE_ADDR
861f93
-cond_offset_target (CORE_ADDR address, long offset)
861f93
+cond_offset_target (CORE_ADDR address, LONGEST offset)
861f93
 {
861f93
   if (address == 0)
861f93
     return 0;
861f93
@@ -1602,7 +1603,7 @@ desc_bounds (struct value *arr)
861f93
 /* If TYPE is the type of an array-descriptor (fat pointer),  the bit
861f93
    position of the field containing the address of the bounds data.  */
861f93
 
861f93
-static int
861f93
+static LONGEST
861f93
 fat_pntr_bounds_bitpos (struct type *type)
861f93
 {
861f93
   return TYPE_FIELD_BITPOS (desc_base_type (type), 1);
861f93
@@ -1668,7 +1669,7 @@ desc_data (struct value *arr)
861f93
 /* If TYPE is the type of an array-descriptor (fat pointer), the bit
861f93
    position of the field containing the address of the data.  */
861f93
 
861f93
-static int
861f93
+static LONGEST
861f93
 fat_pntr_data_bitpos (struct type *type)
861f93
 {
861f93
   return TYPE_FIELD_BITPOS (desc_base_type (type), 0);
861f93
@@ -1703,7 +1704,7 @@ desc_one_bound (struct value *bounds, in
861f93
    of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
861f93
    bound, if WHICH is 1.  The first bound is I=1.  */
861f93
 
861f93
-static int
861f93
+static LONGEST
861f93
 desc_bound_bitpos (struct type *type, int i, int which)
861f93
 {
861f93
   return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2);
861f93
@@ -1893,7 +1894,7 @@ ada_type_of_array (struct value *arr, in
861f93
 	         zero, and does not need to be recomputed.  */
861f93
 	      if (lo < hi)
861f93
 		{
861f93
-		  int array_bitsize =
861f93
+		  LONGEST array_bitsize =
861f93
 		        (hi - lo + 1) * TYPE_FIELD_BITSIZE (elt_type, 0);
861f93
 
861f93
 		  TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8;
861f93
@@ -2045,7 +2046,7 @@ decode_packed_array_bitsize (struct type
861f93
    in bits.  */
861f93
 
861f93
 static struct type *
861f93
-constrained_packed_array_type (struct type *type, long *elt_bits)
861f93
+constrained_packed_array_type (struct type *type, LONGEST *elt_bits)
861f93
 {
861f93
   struct type *new_elt_type;
861f93
   struct type *new_type;
861f93
@@ -2097,7 +2098,7 @@ decode_constrained_packed_array_type (st
861f93
   char *name;
861f93
   const char *tail;
861f93
   struct type *shadow_type;
861f93
-  long bits;
861f93
+  LONGEST bits;
861f93
 
861f93
   if (!raw_name)
861f93
     raw_name = ada_type_name (desc_base_type (type));
861f93
@@ -2168,7 +2169,8 @@ decode_constrained_packed_array (struct
861f93
  	 array with no wrapper.  In order to interpret the value through
861f93
  	 the (left-justified) packed array type we just built, we must
861f93
  	 first left-justify it.  */
861f93
-      int bit_size, bit_pos;
861f93
+      int bit_size;
861f93
+      LONGEST bit_pos;
861f93
       ULONGEST mod;
861f93
 
861f93
       mod = ada_modulus (value_type (arr)) - 1;
861f93
@@ -2269,15 +2271,16 @@ has_negatives (struct type *type)
861f93
 
861f93
 struct value *
861f93
 ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr,
861f93
-				long offset, int bit_offset, int bit_size,
861f93
+				LONGEST offset, int bit_offset, int bit_size,
861f93
                                 struct type *type)
861f93
 {
861f93
   struct value *v;
861f93
-  int src,                      /* Index into the source area */
861f93
-    targ,                       /* Index into the target area */
861f93
-    srcBitsLeft,                /* Number of source bits left to move */
861f93
-    nsrc, ntarg,                /* Number of source and target bytes */
861f93
-    unusedLS,                   /* Number of bits in next significant
861f93
+  int src;                      /* Index into the source area */
861f93
+  LONGEST targ;                 /* Index into the target area */
861f93
+  int srcBitsLeft,              /* Number of source bits left to move */
861f93
+    nsrc;                       /* Number of source bytes */
861f93
+  LONGEST ntarg;                /* Number of target bytes */
861f93
+  int unusedLS,                 /* Number of bits in next significant
861f93
                                    byte of source that are unused */
861f93
     accumSize;                  /* Number of meaningful bits in accum */
861f93
   unsigned char *bytes;         /* First byte containing data to unpack */
861f93
@@ -2310,7 +2313,7 @@ ada_value_primitive_packed_val (struct v
861f93
 
861f93
   if (obj != NULL)
861f93
     {
861f93
-      long new_offset = offset;
861f93
+      LONGEST new_offset = offset;
861f93
 
861f93
       set_value_component_location (v, obj);
861f93
       set_value_bitpos (v, bit_offset + value_bitpos (obj));
861f93
@@ -2427,7 +2430,7 @@ ada_value_primitive_packed_val (struct v
861f93
    not overlap.  */
861f93
 static void
861f93
 move_bits (gdb_byte *target, int targ_offset, const gdb_byte *source,
861f93
-	   int src_offset, int n, int bits_big_endian_p)
861f93
+	   LONGEST src_offset, LONGEST n, int bits_big_endian_p)
861f93
 {
861f93
   unsigned int accum, mask;
861f93
   int accum_bits, chunk_size;
861f93
@@ -2517,7 +2520,7 @@ ada_value_assign (struct value *toval, s
861f93
     {
861f93
       int len = (value_bitpos (toval)
861f93
 		 + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
861f93
-      int from_size;
861f93
+      LONGEST from_size;
861f93
       char *buffer = (char *) alloca (len);
861f93
       struct value *val;
861f93
       CORE_ADDR to_addr = value_address (toval);
861f93
@@ -2562,7 +2565,7 @@ value_assign_to_component (struct value
861f93
     (LONGEST)  (value_address (component) - value_address (container));
861f93
   int bit_offset_in_container = 
861f93
     value_bitpos (component) - value_bitpos (container);
861f93
-  int bits;
861f93
+  LONGEST bits;
861f93
   
861f93
   val = value_cast (value_type (component), val);
861f93
 
861f93
@@ -4083,7 +4086,7 @@ ensure_lval (struct value *val)
861f93
   if (VALUE_LVAL (val) == not_lval
861f93
       || VALUE_LVAL (val) == lval_internalvar)
861f93
     {
861f93
-      int len = TYPE_LENGTH (ada_check_typedef (value_type (val)));
861f93
+      LONGEST len = TYPE_LENGTH (ada_check_typedef (value_type (val)));
861f93
       const CORE_ADDR addr =
861f93
         value_as_long (value_allocate_space_in_inferior (len));
861f93
 
861f93
@@ -4157,7 +4160,7 @@ static CORE_ADDR
861f93
 value_pointer (struct value *value, struct type *type)
861f93
 {
861f93
   struct gdbarch *gdbarch = get_type_arch (type);
861f93
-  unsigned len = TYPE_LENGTH (type);
861f93
+  ULONGEST len = TYPE_LENGTH (type);
861f93
   gdb_byte *buf = alloca (len);
861f93
   CORE_ADDR addr;
861f93
 
861f93
@@ -6077,7 +6080,7 @@ value_tag_from_contents_and_address (str
861f93
 				     const gdb_byte *valaddr,
861f93
                                      CORE_ADDR address)
861f93
 {
861f93
-  int tag_byte_offset;
861f93
+  LONGEST tag_byte_offset;
861f93
   struct type *tag_type;
861f93
 
861f93
   if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
861f93
@@ -6542,7 +6545,7 @@ ada_in_variant (LONGEST val, struct type
861f93
    only in that it can handle packed values of arbitrary type.  */
861f93
 
861f93
 static struct value *
861f93
-ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
861f93
+ada_value_primitive_field (struct value *arg1, LONGEST offset, int fieldno,
861f93
                            struct type *arg_type)
861f93
 {
861f93
   struct type *type;
861f93
@@ -6554,7 +6557,7 @@ ada_value_primitive_field (struct value
861f93
 
861f93
   if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0)
861f93
     {
861f93
-      int bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
861f93
+      LONGEST bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
861f93
       int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno);
861f93
 
861f93
       return ada_value_primitive_packed_val (arg1, value_contents (arg1),
861f93
@@ -6581,9 +6584,9 @@ ada_value_primitive_field (struct value
861f93
    Returns 1 if found, 0 otherwise.  */
861f93
 
861f93
 static int
861f93
-find_struct_field (const char *name, struct type *type, int offset,
861f93
+find_struct_field (const char *name, struct type *type, LONGEST offset,
861f93
                    struct type **field_type_p,
861f93
-                   int *byte_offset_p, int *bit_offset_p, int *bit_size_p,
861f93
+		   LONGEST *byte_offset_p, int *bit_offset_p, int *bit_size_p,
861f93
 		   int *index_p)
861f93
 {
861f93
   int i;
861f93
@@ -6601,8 +6604,8 @@ find_struct_field (const char *name, str
861f93
 
861f93
   for (i = 0; i < TYPE_NFIELDS (type); i += 1)
861f93
     {
861f93
-      int bit_pos = TYPE_FIELD_BITPOS (type, i);
861f93
-      int fld_offset = offset + bit_pos / 8;
861f93
+      LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i);
861f93
+      LONGEST fld_offset = offset + bit_pos / 8;
861f93
       const char *t_field_name = TYPE_FIELD_NAME (type, i);
861f93
 
861f93
       if (t_field_name == NULL)
861f93
@@ -6672,7 +6675,7 @@ num_visible_fields (struct type *type)
861f93
    Searches recursively through wrapper fields (e.g., '_parent').  */
861f93
 
861f93
 static struct value *
861f93
-ada_search_struct_field (char *name, struct value *arg, int offset,
861f93
+ada_search_struct_field (char *name, struct value *arg, LONGEST offset,
861f93
                          struct type *type)
861f93
 {
861f93
   int i;
861f93
@@ -6705,7 +6708,7 @@ ada_search_struct_field (char *name, str
861f93
           int j;
861f93
           struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type,
861f93
 									i));
861f93
-          int var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
861f93
+	  LONGEST var_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
861f93
 
861f93
           for (j = 0; j < TYPE_NFIELDS (field_type); j += 1)
861f93
             {
861f93
@@ -6723,8 +6726,8 @@ ada_search_struct_field (char *name, str
861f93
   return NULL;
861f93
 }
861f93
 
861f93
-static struct value *ada_index_struct_field_1 (int *, struct value *,
861f93
-					       int, struct type *);
861f93
+static struct value *ada_index_struct_field_1 (LONGEST *, struct value *,
861f93
+					       LONGEST, struct type *);
861f93
 
861f93
 
861f93
 /* Return field #INDEX in ARG, where the index is that returned by
861f93
@@ -6733,7 +6736,7 @@ static struct value *ada_index_struct_fi
861f93
  * If found, return value, else return NULL.  */
861f93
 
861f93
 static struct value *
861f93
-ada_index_struct_field (int index, struct value *arg, int offset,
861f93
+ada_index_struct_field (LONGEST index, struct value *arg, LONGEST offset,
861f93
 			struct type *type)
861f93
 {
861f93
   return ada_index_struct_field_1 (&index, arg, offset, type);
861f93
@@ -6745,7 +6748,7 @@ ada_index_struct_field (int index, struc
861f93
  * *INDEX_P.  */
861f93
 
861f93
 static struct value *
861f93
-ada_index_struct_field_1 (int *index_p, struct value *arg, int offset,
861f93
+ada_index_struct_field_1 (LONGEST *index_p, struct value *arg, LONGEST offset,
861f93
 			  struct type *type)
861f93
 {
861f93
   int i;
861f93
@@ -6835,7 +6838,8 @@ ada_value_struct_elt (struct value *arg,
861f93
     v = ada_search_struct_field (name, arg, 0, t);
861f93
   else
861f93
     {
861f93
-      int bit_offset, bit_size, byte_offset;
861f93
+      int bit_offset, bit_size;
861f93
+      LONGEST byte_offset;
861f93
       struct type *field_type;
861f93
       CORE_ADDR address;
861f93
 
861f93
@@ -7148,8 +7152,8 @@ ada_coerce_ref (struct value *val0)
861f93
 /* Return OFF rounded upward if necessary to a multiple of
861f93
    ALIGNMENT (a power of 2).  */
861f93
 
861f93
-static unsigned int
861f93
-align_value (unsigned int off, unsigned int alignment)
861f93
+static ULONGEST
861f93
+align_value (ULONGEST off, ULONGEST alignment)
861f93
 {
861f93
   return (off + alignment - 1) & ~(alignment - 1);
861f93
 }
861f93
@@ -7528,10 +7532,9 @@ ada_template_to_fixed_record_type_1 (str
861f93
   struct value *mark = value_mark ();
861f93
   struct value *dval;
861f93
   struct type *rtype;
861f93
-  int nfields, bit_len;
861f93
+  int nfields;
861f93
   int variant_field;
861f93
-  long off;
861f93
-  int fld_bit_len;
861f93
+  LONGEST off, bit_len, fld_bit_len;
861f93
   int f;
861f93
 
861f93
   /* Compute the number of fields in this record type that are going
861f93
@@ -7602,7 +7605,7 @@ ada_template_to_fixed_record_type_1 (str
861f93
 	     that follow this one.  */
861f93
 	  if (ada_is_aligner_type (field_type))
861f93
 	    {
861f93
-	      long field_offset = TYPE_FIELD_BITPOS (field_type, f);
861f93
+	      LONGEST field_offset = TYPE_FIELD_BITPOS (field_type, f);
861f93
 
861f93
 	      field_valaddr = cond_offset_host (field_valaddr, field_offset);
861f93
 	      field_address = cond_offset_target (field_address, field_offset);
861f93
@@ -7731,11 +7734,11 @@ ada_template_to_fixed_record_type_1 (str
861f93
   if (TYPE_LENGTH (type) <= 0)
861f93
     {
861f93
       if (TYPE_NAME (rtype))
861f93
-	warning (_("Invalid type size for `%s' detected: %d."),
861f93
-		 TYPE_NAME (rtype), TYPE_LENGTH (type));
861f93
+	warning (_("Invalid type size for `%s' detected: %s."),
861f93
+		 TYPE_NAME (rtype), pulongest (TYPE_LENGTH (type)));
861f93
       else
861f93
-	warning (_("Invalid type size for <unnamed> detected: %d."),
861f93
-		 TYPE_LENGTH (type));
861f93
+	warning (_("Invalid type size for <unnamed> detected: %s."),
861f93
+		 pulongest (TYPE_LENGTH (type)));
861f93
     }
861f93
   else
861f93
     {
861f93
@@ -8072,7 +8075,8 @@ to_fixed_array_type (struct type *type0,
861f93
 	 type was a regular (non-packed) array type.  As a result, the
861f93
 	 bitsize of the array elements needs to be set again, and the array
861f93
 	 length needs to be recomputed based on that bitsize.  */
861f93
-      int len = TYPE_LENGTH (result) / TYPE_LENGTH (TYPE_TARGET_TYPE (result));
861f93
+      LONGEST len = (TYPE_LENGTH (result)
861f93
+		     / TYPE_LENGTH (TYPE_TARGET_TYPE (result)));
861f93
       int elt_bitsize = TYPE_FIELD_BITSIZE (type0, 0);
861f93
 
861f93
       TYPE_FIELD_BITSIZE (result, 0) = TYPE_FIELD_BITSIZE (type0, 0);
861f93
Index: gdb-7.6.1/gdb/ada-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ada-lang.h	2013-08-30 21:54:18.727367534 +0200
861f93
+++ gdb-7.6.1/gdb/ada-lang.h	2013-08-30 21:54:20.446368186 +0200
861f93
@@ -169,7 +169,7 @@ extern void ada_print_type (struct type
861f93
 extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
861f93
 			       struct ui_file *stream);
861f93
 
861f93
-extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
861f93
+extern void ada_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
861f93
 			   struct ui_file *, int,
861f93
 			   const struct value *,
861f93
 			   const struct value_print_options *);
861f93
@@ -184,7 +184,7 @@ extern void ada_emit_char (int, struct t
861f93
 extern void ada_printchar (int, struct type *, struct ui_file *);
861f93
 
861f93
 extern void ada_printstr (struct ui_file *, struct type *, const gdb_byte *,
861f93
-			  unsigned int, const char *, int,
861f93
+			  ULONGEST, const char *, int,
861f93
 			  const struct value_print_options *);
861f93
 
861f93
 struct value *ada_convert_actual (struct value *actual,
861f93
@@ -257,7 +257,7 @@ extern int ada_is_constrained_packed_arr
861f93
 
861f93
 extern struct value *ada_value_primitive_packed_val (struct value *,
861f93
 						     const gdb_byte *,
861f93
-                                                     long, int, int,
861f93
+						     LONGEST, int, int,
861f93
                                                      struct type *);
861f93
 
861f93
 extern struct type *ada_coerce_to_simple_array_type (struct type *);
861f93
Index: gdb-7.6.1/gdb/ada-typeprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ada-typeprint.c	2013-08-30 21:54:18.727367534 +0200
861f93
+++ gdb-7.6.1/gdb/ada-typeprint.c	2013-08-30 21:54:20.447368187 +0200
861f93
@@ -829,8 +829,8 @@ ada_print_type (struct type *type0, cons
861f93
 	    const char *name = ada_type_name (type);
861f93
 
861f93
 	    if (!ada_is_range_type_name (name))
861f93
-	      fprintf_filtered (stream, _("<%d-byte integer>"),
861f93
-				TYPE_LENGTH (type));
861f93
+	      fprintf_filtered (stream, _("<%s-byte integer>"),
861f93
+				pulongest (TYPE_LENGTH (type)));
861f93
 	    else
861f93
 	      {
861f93
 		fprintf_filtered (stream, "range ");
861f93
@@ -851,7 +851,8 @@ ada_print_type (struct type *type0, cons
861f93
 	  }
861f93
 	break;
861f93
       case TYPE_CODE_FLT:
861f93
-	fprintf_filtered (stream, _("<%d-byte float>"), TYPE_LENGTH (type));
861f93
+	fprintf_filtered (stream, _("<%s-byte float>"),
861f93
+			  pulongest (TYPE_LENGTH (type)));
861f93
 	break;
861f93
       case TYPE_CODE_ENUM:
861f93
 	if (show < 0)
861f93
Index: gdb-7.6.1/gdb/ada-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ada-valprint.c	2013-08-30 21:54:18.728367535 +0200
861f93
+++ gdb-7.6.1/gdb/ada-valprint.c	2013-08-30 21:54:20.447368187 +0200
861f93
@@ -41,16 +41,16 @@ static void print_record (struct type *,
861f93
 			  const struct value_print_options *);
861f93
 
861f93
 static int print_field_values (struct type *, const gdb_byte *,
861f93
-			       int,
861f93
+			       LONGEST,
861f93
 			       struct ui_file *, int,
861f93
 			       const struct value *,
861f93
 			       const struct value_print_options *,
861f93
-			       int, struct type *, int);
861f93
+			       int, struct type *, LONGEST);
861f93
 
861f93
 static void adjust_type_signedness (struct type *);
861f93
 
861f93
-static void ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR,
861f93
-			     struct ui_file *, int,
861f93
+static void ada_val_print_1 (struct type *, const gdb_byte *, LONGEST,
861f93
+			     CORE_ADDR, struct ui_file *, int,
861f93
 			     const struct value *,
861f93
 			     const struct value_print_options *);
861f93
 
861f93
@@ -143,7 +143,7 @@ val_print_packed_array_elements (struct
861f93
   unsigned int things_printed = 0;
861f93
   unsigned len;
861f93
   struct type *elttype, *index_type;
861f93
-  unsigned eltlen;
861f93
+  ULONGEST eltlen;
861f93
   unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
861f93
   struct value *mark = value_mark ();
861f93
   LONGEST low = 0;
861f93
@@ -292,7 +292,7 @@ ada_emit_char (int c, struct type *type,
861f93
    of a character.  */
861f93
 
861f93
 static int
861f93
-char_at (const gdb_byte *string, int i, int type_len,
861f93
+char_at (const gdb_byte *string, LONGEST i, int type_len,
861f93
 	 enum bfd_endian byte_order)
861f93
 {
861f93
   if (type_len == 1)
861f93
@@ -462,11 +462,11 @@ ada_print_scalar (struct type *type, LON
861f93
 
861f93
 static void
861f93
 printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
861f93
-	  unsigned int length, int force_ellipses, int type_len,
861f93
+	  ULONGEST length, int force_ellipses, int type_len,
861f93
 	  const struct value_print_options *options)
861f93
 {
861f93
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (elttype));
861f93
-  unsigned int i;
861f93
+  ULONGEST i;
861f93
   unsigned int things_printed = 0;
861f93
   int in_quotes = 0;
861f93
   int need_comma = 0;
861f93
@@ -481,9 +481,9 @@ printstr (struct ui_file *stream, struct
861f93
     {
861f93
       /* Position of the character we are examining
861f93
          to see whether it is repeated.  */
861f93
-      unsigned int rep1;
861f93
+      ULONGEST rep1;
861f93
       /* Number of repetitions we have detected so far.  */
861f93
-      unsigned int reps;
861f93
+      ULONGEST reps;
861f93
 
861f93
       QUIT;
861f93
 
861f93
@@ -514,7 +514,8 @@ printstr (struct ui_file *stream, struct
861f93
 	  ada_emit_char (char_at (string, i, type_len, byte_order),
861f93
 			 elttype, stream, '\'', type_len);
861f93
 	  fputs_filtered ("'", stream);
861f93
-	  fprintf_filtered (stream, _(" <repeats %u times>"), reps);
861f93
+	  fprintf_filtered (stream, _(" <repeats %s times>"),
861f93
+			    pulongest (reps));
861f93
 	  i = rep1 - 1;
861f93
 	  things_printed += options->repeat_count_threshold;
861f93
 	  need_comma = 1;
861f93
@@ -542,7 +543,7 @@ printstr (struct ui_file *stream, struct
861f93
 
861f93
 void
861f93
 ada_printstr (struct ui_file *stream, struct type *type,
861f93
-	      const gdb_byte *string, unsigned int length,
861f93
+	      const gdb_byte *string, ULONGEST length,
861f93
 	      const char *encoding, int force_ellipses,
861f93
 	      const struct value_print_options *options)
861f93
 {
861f93
@@ -556,7 +557,7 @@ ada_printstr (struct ui_file *stream, st
861f93
 
861f93
 void
861f93
 ada_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-	       int embedded_offset, CORE_ADDR address,
861f93
+	       LONGEST embedded_offset, CORE_ADDR address,
861f93
 	       struct ui_file *stream, int recurse,
861f93
 	       const struct value *val,
861f93
 	       const struct value_print_options *options)
861f93
@@ -588,8 +589,8 @@ ada_val_print_array (struct type *type,
861f93
     {
861f93
       enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
861f93
       struct type *elttype = TYPE_TARGET_TYPE (type);
861f93
-      unsigned int eltlen;
861f93
-      unsigned int len;
861f93
+      ULONGEST eltlen;
861f93
+      ULONGEST len;
861f93
 
861f93
       /* We know that ELTTYPE cannot possibly be null, because we found
861f93
 	 that TYPE is a string-like type.  Similarly, the size of ELTTYPE
861f93
@@ -607,7 +608,7 @@ ada_val_print_array (struct type *type,
861f93
          elements up to it.  */
861f93
       if (options->stop_print_at_null)
861f93
         {
861f93
-          int temp_len;
861f93
+          LONGEST temp_len;
861f93
 
861f93
           /* Look for a NULL char.  */
861f93
           for (temp_len = 0;
861f93
@@ -640,7 +641,7 @@ ada_val_print_array (struct type *type,
861f93
 
861f93
 static void
861f93
 ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
861f93
-		 int offset, CORE_ADDR address,
861f93
+		 LONGEST offset, CORE_ADDR address,
861f93
 		 struct ui_file *stream, int recurse,
861f93
 		 const struct value *original_value,
861f93
 		 const struct value_print_options *options)
861f93
@@ -915,12 +916,12 @@ ada_val_print_1 (struct type *type, cons
861f93
 
861f93
 static int
861f93
 print_variant_part (struct type *type, int field_num,
861f93
-		    const gdb_byte *valaddr, int offset,
861f93
+		    const gdb_byte *valaddr, LONGEST offset,
861f93
 		    struct ui_file *stream, int recurse,
861f93
 		    const struct value *val,
861f93
 		    const struct value_print_options *options,
861f93
 		    int comma_needed,
861f93
-		    struct type *outer_type, int outer_offset)
861f93
+		    struct type *outer_type, LONGEST outer_offset)
861f93
 {
861f93
   struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
861f93
   int which = ada_which_variant_applies (var_type, outer_type,
861f93
@@ -1027,11 +1028,11 @@ print_record (struct type *type, const g
861f93
 
861f93
 static int
861f93
 print_field_values (struct type *type, const gdb_byte *valaddr,
861f93
-		    int offset, struct ui_file *stream, int recurse,
861f93
+		    LONGEST offset, struct ui_file *stream, int recurse,
861f93
 		    const struct value *val,
861f93
 		    const struct value_print_options *options,
861f93
 		    int comma_needed,
861f93
-		    struct type *outer_type, int outer_offset)
861f93
+		    struct type *outer_type, LONGEST outer_offset)
861f93
 {
861f93
   int i, len;
861f93
 
861f93
@@ -1097,7 +1098,7 @@ print_field_values (struct type *type, c
861f93
 	    }
861f93
 	  else
861f93
 	    {
861f93
-	      int bit_pos = TYPE_FIELD_BITPOS (type, i);
861f93
+	      LONGEST bit_pos = TYPE_FIELD_BITPOS (type, i);
861f93
 	      int bit_size = TYPE_FIELD_BITSIZE (type, i);
861f93
 	      struct value_print_options opts;
861f93
 
861f93
Index: gdb-7.6.1/gdb/annotate.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/annotate.c	2013-08-30 21:54:18.728367535 +0200
861f93
+++ gdb-7.6.1/gdb/annotate.c	2013-08-30 21:54:20.447368187 +0200
861f93
@@ -523,21 +523,21 @@ annotate_frame_end (void)
861f93
 }
861f93
 
861f93
 void
861f93
-annotate_array_section_begin (int idx, struct type *elttype)
861f93
+annotate_array_section_begin (LONGEST idx, struct type *elttype)
861f93
 {
861f93
   if (annotation_level == 2)
861f93
     {
861f93
-      printf_filtered (("\n\032\032array-section-begin %d "), idx);
861f93
+      printf_filtered (("\n\032\032array-section-begin %s "), plongest (idx));
861f93
       print_value_flags (elttype);
861f93
       printf_filtered (("\n"));
861f93
     }
861f93
 }
861f93
 
861f93
 void
861f93
-annotate_elt_rep (unsigned int repcount)
861f93
+annotate_elt_rep (ULONGEST repcount)
861f93
 {
861f93
   if (annotation_level == 2)
861f93
-    printf_filtered (("\n\032\032elt-rep %u\n"), repcount);
861f93
+    printf_filtered (("\n\032\032elt-rep %s\n"), pulongest (repcount));
861f93
 }
861f93
 
861f93
 void
861f93
Index: gdb-7.6.1/gdb/annotate.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/annotate.h	2013-08-30 21:54:18.728367535 +0200
861f93
+++ gdb-7.6.1/gdb/annotate.h	2013-08-30 21:54:20.448368187 +0200
861f93
@@ -92,8 +92,8 @@ extern void annotate_frame_source_end (v
861f93
 extern void annotate_frame_where (void);
861f93
 extern void annotate_frame_end (void);
861f93
 
861f93
-extern void annotate_array_section_begin (int, struct type *);
861f93
-extern void annotate_elt_rep (unsigned int);
861f93
+extern void annotate_array_section_begin (LONGEST, struct type *);
861f93
+extern void annotate_elt_rep (ULONGEST);
861f93
 extern void annotate_elt_rep_end (void);
861f93
 extern void annotate_elt (void);
861f93
 extern void annotate_array_section_end (void);
861f93
Index: gdb-7.6.1/gdb/arm-linux-nat.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/arm-linux-nat.c	2013-08-30 21:54:18.729367535 +0200
861f93
+++ gdb-7.6.1/gdb/arm-linux-nat.c	2013-08-30 21:54:20.448368187 +0200
861f93
@@ -1073,7 +1073,7 @@ arm_linux_remove_hw_breakpoint (struct g
861f93
 /* Are we able to use a hardware watchpoint for the LEN bytes starting at 
861f93
    ADDR?  */
861f93
 static int
861f93
-arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   const struct arm_linux_hwbp_cap *cap = arm_linux_get_hwbp_cap ();
861f93
   CORE_ADDR max_wp_length, aligned_addr;
861f93
Index: gdb-7.6.1/gdb/ax-gdb.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ax-gdb.c	2013-08-30 21:54:18.730367536 +0200
861f93
+++ gdb-7.6.1/gdb/ax-gdb.c	2013-08-30 21:54:20.449368188 +0200
861f93
@@ -83,12 +83,12 @@ static void gen_traced_pop (struct gdbar
861f93
 static void gen_sign_extend (struct agent_expr *, struct type *);
861f93
 static void gen_extend (struct agent_expr *, struct type *);
861f93
 static void gen_fetch (struct agent_expr *, struct type *);
861f93
-static void gen_left_shift (struct agent_expr *, int);
861f93
+static void gen_left_shift (struct agent_expr *, LONGEST);
861f93
 
861f93
 
861f93
 static void gen_frame_args_address (struct gdbarch *, struct agent_expr *);
861f93
 static void gen_frame_locals_address (struct gdbarch *, struct agent_expr *);
861f93
-static void gen_offset (struct agent_expr *ax, int offset);
861f93
+static void gen_offset (struct agent_expr *ax, LONGEST offset);
861f93
 static void gen_sym_offset (struct agent_expr *, struct symbol *);
861f93
 static void gen_var_ref (struct gdbarch *, struct agent_expr *ax,
861f93
 			 struct axs_value *value, struct symbol *var);
861f93
@@ -136,15 +136,16 @@ static void gen_deref (struct agent_expr
861f93
 static void gen_address_of (struct agent_expr *, struct axs_value *);
861f93
 static void gen_bitfield_ref (struct expression *exp, struct agent_expr *ax,
861f93
 			      struct axs_value *value,
861f93
-			      struct type *type, int start, int end);
861f93
+			      struct type *type, LONGEST start, LONGEST end);
861f93
 static void gen_primitive_field (struct expression *exp,
861f93
 				 struct agent_expr *ax,
861f93
 				 struct axs_value *value,
861f93
-				 int offset, int fieldno, struct type *type);
861f93
+				 LONGEST offset, int fieldno,
861f93
+				 struct type *type);
861f93
 static int gen_struct_ref_recursive (struct expression *exp,
861f93
 				     struct agent_expr *ax,
861f93
 				     struct axs_value *value,
861f93
-				     char *field, int offset,
861f93
+				     char *field, LONGEST offset,
861f93
 				     struct type *type);
861f93
 static void gen_struct_ref (struct expression *exp, struct agent_expr *ax,
861f93
 			    struct axs_value *value,
861f93
@@ -569,7 +570,7 @@ gen_fetch (struct agent_expr *ax, struct
861f93
    right shift it by -DISTANCE bits if DISTANCE < 0.  This generates
861f93
    unsigned (logical) right shifts.  */
861f93
 static void
861f93
-gen_left_shift (struct agent_expr *ax, int distance)
861f93
+gen_left_shift (struct agent_expr *ax, LONGEST distance)
861f93
 {
861f93
   if (distance > 0)
861f93
     {
861f93
@@ -623,7 +624,7 @@ gen_frame_locals_address (struct gdbarch
861f93
    programming in ML, it would be clearer why these are the same
861f93
    thing.  */
861f93
 static void
861f93
-gen_offset (struct agent_expr *ax, int offset)
861f93
+gen_offset (struct agent_expr *ax, LONGEST offset)
861f93
 {
861f93
   /* It would suffice to simply push the offset and add it, but this
861f93
      makes it easier to read positive and negative offsets in the
861f93
@@ -1279,7 +1280,7 @@ gen_address_of (struct agent_expr *ax, s
861f93
 static void
861f93
 gen_bitfield_ref (struct expression *exp, struct agent_expr *ax,
861f93
 		  struct axs_value *value, struct type *type,
861f93
-		  int start, int end)
861f93
+		  LONGEST start, LONGEST end)
861f93
 {
861f93
   /* Note that ops[i] fetches 8 << i bits.  */
861f93
   static enum agent_op ops[]
861f93
@@ -1314,13 +1315,13 @@ gen_bitfield_ref (struct expression *exp
861f93
 
861f93
   /* The first and one-after-last bits in the field, but rounded down
861f93
      and up to byte boundaries.  */
861f93
-  int bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT;
861f93
-  int bound_end = (((end + TARGET_CHAR_BIT - 1)
861f93
-		    / TARGET_CHAR_BIT)
861f93
-		   * TARGET_CHAR_BIT);
861f93
+  LONGEST bound_start = (start / TARGET_CHAR_BIT) * TARGET_CHAR_BIT;
861f93
+  LONGEST bound_end = (((end + TARGET_CHAR_BIT - 1)
861f93
+			/ TARGET_CHAR_BIT)
861f93
+		       * TARGET_CHAR_BIT);
861f93
 
861f93
   /* current bit offset within the structure */
861f93
-  int offset;
861f93
+  LONGEST offset;
861f93
 
861f93
   /* The index in ops of the opcode we're considering.  */
861f93
   int op;
861f93
@@ -1439,7 +1440,7 @@ gen_bitfield_ref (struct expression *exp
861f93
 static void
861f93
 gen_primitive_field (struct expression *exp,
861f93
 		     struct agent_expr *ax, struct axs_value *value,
861f93
-		     int offset, int fieldno, struct type *type)
861f93
+		     LONGEST offset, int fieldno, struct type *type)
861f93
 {
861f93
   /* Is this a bitfield?  */
861f93
   if (TYPE_FIELD_PACKED (type, fieldno))
861f93
@@ -1464,7 +1465,7 @@ gen_primitive_field (struct expression *
861f93
 static int
861f93
 gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
861f93
 			  struct axs_value *value,
861f93
-			  char *field, int offset, struct type *type)
861f93
+			  char *field, LONGEST offset, struct type *type)
861f93
 {
861f93
   int i, rslt;
861f93
   int nbases = TYPE_N_BASECLASSES (type);
861f93
Index: gdb-7.6.1/gdb/ax-general.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ax-general.c	2013-08-30 21:54:18.730367536 +0200
861f93
+++ gdb-7.6.1/gdb/ax-general.c	2013-08-30 21:54:20.449368188 +0200
861f93
@@ -192,7 +192,7 @@ ax_zero_ext (struct agent_expr *x, int n
861f93
 
861f93
 /* Append a trace_quick instruction to EXPR, to record N bytes.  */
861f93
 void
861f93
-ax_trace_quick (struct agent_expr *x, int n)
861f93
+ax_trace_quick (struct agent_expr *x, LONGEST n)
861f93
 {
861f93
   /* N must fit in a byte.  */
861f93
   if (n < 0 || n > 255)
861f93
Index: gdb-7.6.1/gdb/ax.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ax.h	2013-08-30 21:54:18.730367536 +0200
861f93
+++ gdb-7.6.1/gdb/ax.h	2013-08-30 21:54:20.449368188 +0200
861f93
@@ -190,7 +190,7 @@ extern void ax_ext (struct agent_expr *E
861f93
 extern void ax_zero_ext (struct agent_expr *EXPR, int N);
861f93
 
861f93
 /* Append a trace_quick instruction to EXPR, to record N bytes.  */
861f93
-extern void ax_trace_quick (struct agent_expr *EXPR, int N);
861f93
+extern void ax_trace_quick (struct agent_expr *EXPR, LONGEST N);
861f93
 
861f93
 /* Append a goto op to EXPR.  OP is the actual op (must be aop_goto or
861f93
    aop_if_goto).  We assume we don't know the target offset yet,
861f93
Index: gdb-7.6.1/gdb/breakpoint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/breakpoint.c	2013-08-30 21:54:18.733367537 +0200
861f93
+++ gdb-7.6.1/gdb/breakpoint.c	2013-08-30 21:54:20.453368189 +0200
861f93
@@ -6677,7 +6677,7 @@ breakpoint_address_match (struct address
861f93
 
861f93
 static int
861f93
 breakpoint_address_match_range (struct address_space *aspace1, CORE_ADDR addr1,
861f93
-				int len1, struct address_space *aspace2,
861f93
+				LONGEST len1, struct address_space *aspace2,
861f93
 				CORE_ADDR addr2)
861f93
 {
861f93
   return ((gdbarch_has_global_breakpoints (target_gdbarch ())
861f93
@@ -11216,7 +11216,7 @@ can_use_hardware_watchpoint (struct valu
861f93
 		      && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
861f93
 		{
861f93
 		  CORE_ADDR vaddr = value_address (v);
861f93
-		  int len;
861f93
+		  LONGEST len;
861f93
 		  int num_regs;
861f93
 
861f93
 		  len = (target_exact_watchpoints
861f93
Index: gdb-7.6.1/gdb/breakpoint.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/breakpoint.h	2013-08-30 21:54:18.734367537 +0200
861f93
+++ gdb-7.6.1/gdb/breakpoint.h	2013-08-30 21:54:20.454368190 +0200
861f93
@@ -250,7 +250,7 @@ struct bp_target_info
861f93
 
861f93
   /* If this is a ranged breakpoint, then this field contains the
861f93
      length of the range that will be watched for execution.  */
861f93
-  int length;
861f93
+  LONGEST length;
861f93
 
861f93
   /* If the breakpoint lives in memory and reading that memory would
861f93
      give back the breakpoint, instead of the original contents, then
861f93
@@ -419,7 +419,7 @@ struct bp_location
861f93
   /* For hardware watchpoints, the size of the memory region being
861f93
      watched.  For hardware ranged breakpoints, the size of the
861f93
      breakpoint range.  */
861f93
-  int length;
861f93
+  LONGEST length;
861f93
 
861f93
   /* Type of hardware watchpoint.  */
861f93
   enum target_hw_bp_type watchpoint_type;
861f93
Index: gdb-7.6.1/gdb/c-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/c-lang.c	2013-08-30 21:54:18.734367537 +0200
861f93
+++ gdb-7.6.1/gdb/c-lang.c	2013-08-30 21:54:20.454368190 +0200
861f93
@@ -188,7 +188,7 @@ c_printchar (int c, struct type *type, s
861f93
 
861f93
 void
861f93
 c_printstr (struct ui_file *stream, struct type *type, 
861f93
-	    const gdb_byte *string, unsigned int length, 
861f93
+	    const gdb_byte *string, ULONGEST length,
861f93
 	    const char *user_encoding, int force_ellipses,
861f93
 	    const struct value_print_options *options)
861f93
 {
861f93
@@ -663,7 +663,7 @@ evaluate_subexp_c (struct type *expect_t
861f93
 	  }
861f93
 	else
861f93
 	  {
861f93
-	    int i;
861f93
+	    LONGEST i;
861f93
 
861f93
 	    /* Write the terminating character.  */
861f93
 	    for (i = 0; i < TYPE_LENGTH (type); ++i)
861f93
@@ -672,7 +672,7 @@ evaluate_subexp_c (struct type *expect_t
861f93
 	    if (satisfy_expected)
861f93
 	      {
861f93
 		LONGEST low_bound, high_bound;
861f93
-		int element_size = TYPE_LENGTH (type);
861f93
+		LONGEST element_size = TYPE_LENGTH (type);
861f93
 
861f93
 		if (get_discrete_bounds (TYPE_INDEX_TYPE (expect_type),
861f93
 					 &low_bound, &high_bound) < 0)
861f93
Index: gdb-7.6.1/gdb/c-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/c-lang.h	2013-08-30 21:54:18.734367537 +0200
861f93
+++ gdb-7.6.1/gdb/c-lang.h	2013-08-30 21:54:20.454368190 +0200
861f93
@@ -73,7 +73,7 @@ extern void c_print_typedef (struct type
861f93
 			     struct ui_file *);
861f93
 
861f93
 extern void c_val_print (struct type *, const gdb_byte *,
861f93
-			 int, CORE_ADDR,
861f93
+			 LONGEST, CORE_ADDR,
861f93
 			 struct ui_file *, int,
861f93
 			 const struct value *,
861f93
 			 const struct value_print_options *);
861f93
@@ -93,7 +93,7 @@ extern void c_printchar (int, struct typ
861f93
 extern void c_printstr (struct ui_file * stream,
861f93
 			struct type *elttype,
861f93
 			const gdb_byte *string,
861f93
-			unsigned int length,
861f93
+			ULONGEST length,
861f93
 			const char *user_encoding,
861f93
 			int force_ellipses,
861f93
 			const struct value_print_options *options);
861f93
@@ -119,14 +119,14 @@ extern void cp_print_class_member (const
861f93
 				   struct ui_file *, char *);
861f93
 
861f93
 extern void cp_print_value_fields (struct type *, struct type *,
861f93
-				   const gdb_byte *, int, CORE_ADDR,
861f93
+				   const gdb_byte *, LONGEST, CORE_ADDR,
861f93
 				   struct ui_file *, int,
861f93
 				   const struct value *,
861f93
 				   const struct value_print_options *,
861f93
 				   struct type **, int);
861f93
 
861f93
 extern void cp_print_value_fields_rtti (struct type *,
861f93
-					const gdb_byte *, int, CORE_ADDR,
861f93
+					const gdb_byte *, LONGEST, CORE_ADDR,
861f93
 					struct ui_file *, int,
861f93
 					const struct value *,
861f93
 					const struct value_print_options *,
861f93
Index: gdb-7.6.1/gdb/c-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/c-valprint.c	2013-08-30 21:54:18.735367537 +0200
861f93
+++ gdb-7.6.1/gdb/c-valprint.c	2013-08-30 21:54:20.455368190 +0200
861f93
@@ -132,7 +132,7 @@ static const struct generic_val_print_de
861f93
 
861f93
 void
861f93
 c_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-	     int embedded_offset, CORE_ADDR address,
861f93
+	     LONGEST embedded_offset, CORE_ADDR address,
861f93
 	     struct ui_file *stream, int recurse,
861f93
 	     const struct value *original_value,
861f93
 	     const struct value_print_options *options)
861f93
@@ -143,7 +143,7 @@ c_val_print (struct type *type, const gd
861f93
   unsigned len;
861f93
   struct type *elttype, *unresolved_elttype;
861f93
   struct type *unresolved_type = type;
861f93
-  unsigned eltlen;
861f93
+  ULONGEST eltlen;
861f93
   CORE_ADDR addr;
861f93
 
861f93
   CHECK_TYPEDEF (type);
861f93
@@ -379,9 +379,9 @@ c_val_print (struct type *type, const gd
861f93
 	  /* Print vtable entry - we only get here if NOT using
861f93
 	     -fvtable_thunks.  (Otherwise, look under
861f93
 	     TYPE_CODE_PTR.)  */
861f93
-	  int offset = (embedded_offset
861f93
-			+ TYPE_FIELD_BITPOS (type,
861f93
-					     VTBL_FNADDR_OFFSET) / 8);
861f93
+	  LONGEST offset = (embedded_offset
861f93
+			    + TYPE_FIELD_BITPOS (type,
861f93
+						 VTBL_FNADDR_OFFSET) / 8);
861f93
 	  struct type *field_type = TYPE_FIELD_TYPE (type,
861f93
 						     VTBL_FNADDR_OFFSET);
861f93
 	  CORE_ADDR addr
861f93
@@ -460,7 +460,8 @@ c_value_print (struct value *val, struct
861f93
 	       const struct value_print_options *options)
861f93
 {
861f93
   struct type *type, *real_type, *val_type;
861f93
-  int full, top, using_enc;
861f93
+  int full, using_enc;
861f93
+  LONGEST top;
861f93
   struct value_print_options opts = *options;
861f93
 
861f93
   opts.deref_ref = 1;
861f93
Index: gdb-7.6.1/gdb/cp-abi.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/cp-abi.c	2013-08-30 21:54:18.735367537 +0200
861f93
+++ gdb-7.6.1/gdb/cp-abi.c	2013-08-30 21:54:20.455368190 +0200
861f93
@@ -68,13 +68,13 @@ is_operator_name (const char *name)
861f93
   return (*current_cp_abi.is_operator_name) (name);
861f93
 }
861f93
 
861f93
-int
861f93
+LONGEST
861f93
 baseclass_offset (struct type *type, int index, const gdb_byte *valaddr,
861f93
-		  int embedded_offset, CORE_ADDR address,
861f93
+		  LONGEST embedded_offset, CORE_ADDR address,
861f93
 		  const struct value *val)
861f93
 {
861f93
   volatile struct gdb_exception ex;
861f93
-  int res = 0;
861f93
+  LONGEST res = 0;
861f93
 
861f93
   gdb_assert (current_cp_abi.baseclass_offset != NULL);
861f93
 
861f93
@@ -98,7 +98,7 @@ baseclass_offset (struct type *type, int
861f93
 struct value *
861f93
 value_virtual_fn_field (struct value **arg1p,
861f93
 			struct fn_field *f, int j,
861f93
-			struct type *type, int offset)
861f93
+			struct type *type, LONGEST offset)
861f93
 {
861f93
   if ((current_cp_abi.virtual_fn_field) == NULL)
861f93
     return NULL;
861f93
@@ -108,7 +108,7 @@ value_virtual_fn_field (struct value **a
861f93
 
861f93
 struct type *
861f93
 value_rtti_type (struct value *v, int *full,
861f93
-		 int *top, int *using_enc)
861f93
+		 LONGEST *top, int *using_enc)
861f93
 {
861f93
   struct type *ret = NULL;
861f93
   volatile struct gdb_exception e;
861f93
Index: gdb-7.6.1/gdb/cp-abi.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/cp-abi.h	2013-08-30 21:54:18.735367537 +0200
861f93
+++ gdb-7.6.1/gdb/cp-abi.h	2013-08-30 21:54:20.455368190 +0200
861f93
@@ -108,7 +108,7 @@ extern struct value *value_virtual_fn_fi
861f93
 					     struct fn_field *f,
861f93
 					     int j,
861f93
 					     struct type *type,
861f93
-					     int offset);
861f93
+					     LONGEST offset);
861f93
 
861f93
 
861f93
 /* Try to find the run-time type of VALUE, using C++ run-time type
861f93
@@ -135,7 +135,7 @@ extern struct value *value_virtual_fn_fi
861f93
    FULL, TOP, and USING_ENC can each be zero, in which case we don't
861f93
    provide the corresponding piece of information.  */
861f93
 extern struct type *value_rtti_type (struct value *value,
861f93
-                                     int *full, int *top,
861f93
+                                     int *full, LONGEST *top,
861f93
 				     int *using_enc);
861f93
 
861f93
 /* Compute the offset of the baseclass which is the INDEXth baseclass
861f93
@@ -144,11 +144,11 @@ extern struct type *value_rtti_type (str
861f93
    contents of VAL.  The result is the offset of the baseclass value
861f93
    relative to (the address of)(ARG) + OFFSET.  */
861f93
 
861f93
-extern int baseclass_offset (struct type *type,
861f93
-			     int index, const gdb_byte *valaddr,
861f93
-			     int embedded_offset,
861f93
-			     CORE_ADDR address,
861f93
-			     const struct value *val);
861f93
+extern LONGEST baseclass_offset (struct type *type,
861f93
+				 int index, const gdb_byte *valaddr,
861f93
+				 LONGEST embedded_offset,
861f93
+				 CORE_ADDR address,
861f93
+				 const struct value *val);
861f93
 
861f93
 /* Describe the target of a pointer to method.  CONTENTS is the byte
861f93
    pattern representing the pointer to method.  TYPE is the pointer to
861f93
@@ -204,12 +204,13 @@ struct cp_abi_ops
861f93
   struct value *(*virtual_fn_field) (struct value **arg1p,
861f93
 				     struct fn_field * f,
861f93
 				     int j, struct type * type,
861f93
-				     int offset);
861f93
+				     LONGEST offset);
861f93
   struct type *(*rtti_type) (struct value *v, int *full,
861f93
-			     int *top, int *using_enc);
861f93
-  int (*baseclass_offset) (struct type *type, int index,
861f93
-			   const bfd_byte *valaddr, int embedded_offset,
861f93
-			   CORE_ADDR address, const struct value *val);
861f93
+			     LONGEST *top, int *using_enc);
861f93
+  LONGEST (*baseclass_offset) (struct type *type, int index,
861f93
+			       const bfd_byte *valaddr,
861f93
+			       LONGEST embedded_offset, CORE_ADDR address,
861f93
+			       const struct value *val);
861f93
   void (*print_method_ptr) (const gdb_byte *contents,
861f93
 			    struct type *type,
861f93
 			    struct ui_file *stream);
861f93
Index: gdb-7.6.1/gdb/cp-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/cp-valprint.c	2013-08-30 21:54:18.736367538 +0200
861f93
+++ gdb-7.6.1/gdb/cp-valprint.c	2013-08-30 21:54:20.456368190 +0200
861f93
@@ -82,7 +82,7 @@ static void cp_print_static_field (struc
861f93
 				   const struct value_print_options *);
861f93
 
861f93
 static void cp_print_value (struct type *, struct type *,
861f93
-			    const gdb_byte *, int,
861f93
+			    const gdb_byte *, LONGEST,
861f93
 			    CORE_ADDR, struct ui_file *,
861f93
 			    int, const struct value *,
861f93
 			    const struct value_print_options *,
861f93
@@ -156,7 +156,7 @@ cp_is_vtbl_member (struct type *type)
861f93
 
861f93
 void
861f93
 cp_print_value_fields (struct type *type, struct type *real_type,
861f93
-		       const gdb_byte *valaddr, int offset,
861f93
+		       const gdb_byte *valaddr, LONGEST offset,
861f93
 		       CORE_ADDR address, struct ui_file *stream,
861f93
 		       int recurse, const struct value *val,
861f93
 		       const struct value_print_options *options,
861f93
@@ -342,7 +342,7 @@ cp_print_value_fields (struct type *type
861f93
 		}
861f93
 	      else if (i == vptr_fieldno && type == vptr_basetype)
861f93
 		{
861f93
-		  int i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
861f93
+		  LONGEST i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8;
861f93
 		  struct type *i_type = TYPE_FIELD_TYPE (type, i);
861f93
 
861f93
 		  if (valprint_check_validity (stream, i_type, i_offset, val))
861f93
@@ -425,7 +425,7 @@ cp_print_value_fields (struct type *type
861f93
 
861f93
 void
861f93
 cp_print_value_fields_rtti (struct type *type,
861f93
-			    const gdb_byte *valaddr, int offset,
861f93
+			    const gdb_byte *valaddr, LONGEST offset,
861f93
 			    CORE_ADDR address,
861f93
 			    struct ui_file *stream, int recurse,
861f93
 			    const struct value *val,
861f93
@@ -441,7 +441,8 @@ cp_print_value_fields_rtti (struct type
861f93
 			TARGET_CHAR_BIT * TYPE_LENGTH (type)))
861f93
     {
861f93
       struct value *value;
861f93
-      int full, top, using_enc;
861f93
+      int full, using_enc;
861f93
+      LONGEST top;
861f93
 
861f93
       /* Ugh, we have to convert back to a value here.  */
861f93
       value = value_from_contents_and_address (type, valaddr + offset,
861f93
@@ -465,7 +466,7 @@ cp_print_value_fields_rtti (struct type
861f93
 
861f93
 static void
861f93
 cp_print_value (struct type *type, struct type *real_type,
861f93
-		const gdb_byte *valaddr, int offset,
861f93
+		const gdb_byte *valaddr, LONGEST offset,
861f93
 		CORE_ADDR address, struct ui_file *stream,
861f93
 		int recurse, const struct value *val,
861f93
 		const struct value_print_options *options,
861f93
@@ -475,7 +476,7 @@ cp_print_value (struct type *type, struc
861f93
     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
861f93
   struct obstack tmp_obstack = dont_print_vb_obstack;
861f93
   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
861f93
-  int thisoffset;
861f93
+  LONGEST thisoffset;
861f93
   struct type *thistype;
861f93
 
861f93
   if (dont_print_vb == 0)
861f93
@@ -489,7 +490,7 @@ cp_print_value (struct type *type, struc
861f93
 
861f93
   for (i = 0; i < n_baseclasses; i++)
861f93
     {
861f93
-      int boffset = 0;
861f93
+      LONGEST boffset = 0;
861f93
       int skip;
861f93
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
861f93
       const char *basename = TYPE_NAME (baseclass);
861f93
Index: gdb-7.6.1/gdb/d-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/d-lang.h	2013-08-30 21:54:18.736367538 +0200
861f93
+++ gdb-7.6.1/gdb/d-lang.h	2013-08-30 21:54:20.456368190 +0200
861f93
@@ -25,7 +25,7 @@
861f93
 extern char *d_demangle (const char *mangled, int options);
861f93
 
861f93
 extern void d_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-			 int embedded_offset, CORE_ADDR address,
861f93
+			 LONGEST embedded_offset, CORE_ADDR address,
861f93
 			 struct ui_file *stream, int recurse,
861f93
 			 const struct value *val,
861f93
 			 const struct value_print_options *options);
861f93
Index: gdb-7.6.1/gdb/d-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/d-valprint.c	2013-08-30 21:54:18.736367538 +0200
861f93
+++ gdb-7.6.1/gdb/d-valprint.c	2013-08-30 21:54:20.456368190 +0200
861f93
@@ -29,7 +29,7 @@
861f93
 
861f93
 static int
861f93
 dynamic_array_type (struct type *type, const gdb_byte *valaddr,
861f93
-		    int embedded_offset, CORE_ADDR address,
861f93
+		    LONGEST embedded_offset, CORE_ADDR address,
861f93
 		    struct ui_file *stream, int recurse,
861f93
 		    const struct value *val,
861f93
 		    const struct value_print_options *options)
861f93
@@ -71,9 +71,9 @@ dynamic_array_type (struct type *type, c
861f93
 
861f93
 /* Implements the la_val_print routine for language D.  */
861f93
 void
861f93
-d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
861f93
-             CORE_ADDR address, struct ui_file *stream, int recurse,
861f93
-	     const struct value *val,
861f93
+d_val_print (struct type *type, const gdb_byte *valaddr,
861f93
+	     LONGEST embedded_offset, CORE_ADDR address,
861f93
+	     struct ui_file *stream, int recurse, const struct value *val,
861f93
              const struct value_print_options *options)
861f93
 {
861f93
   int ret;
861f93
Index: gdb-7.6.1/gdb/doublest.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/doublest.c	2013-08-30 21:54:18.736367538 +0200
861f93
+++ gdb-7.6.1/gdb/doublest.c	2013-08-30 21:54:20.456368190 +0200
861f93
@@ -791,7 +791,7 @@ floatformat_from_doublest (const struct
861f93
    but not passed on by GDB.  This should be fixed.  */
861f93
 
861f93
 static const struct floatformat *
861f93
-floatformat_from_length (struct gdbarch *gdbarch, int len)
861f93
+floatformat_from_length (struct gdbarch *gdbarch, LONGEST len)
861f93
 {
861f93
   const struct floatformat *format;
861f93
 
861f93
@@ -819,8 +819,8 @@ floatformat_from_length (struct gdbarch
861f93
   else
861f93
     format = NULL;
861f93
   if (format == NULL)
861f93
-    error (_("Unrecognized %d-bit floating-point type."),
861f93
-	   len * TARGET_CHAR_BIT);
861f93
+    error (_("Unrecognized %s-bit floating-point type."),
861f93
+	   plongest (len * TARGET_CHAR_BIT));
861f93
   return format;
861f93
 }
861f93
 
861f93
Index: gdb-7.6.1/gdb/dwarf2loc.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/dwarf2loc.c	2013-08-30 21:54:18.738367539 +0200
861f93
+++ gdb-7.6.1/gdb/dwarf2loc.c	2013-08-30 21:54:20.458368191 +0200
861f93
@@ -1680,19 +1680,19 @@ insert_bits (unsigned int datum,
861f93
    BITS_BIG_ENDIAN is taken directly from gdbarch.  */
861f93
 
861f93
 static void
861f93
-copy_bitwise (gdb_byte *dest, unsigned int dest_offset_bits,
861f93
-	      const gdb_byte *source, unsigned int source_offset_bits,
861f93
-	      unsigned int bit_count,
861f93
+copy_bitwise (gdb_byte *dest, ULONGEST dest_offset_bits,
861f93
+	      const gdb_byte *source, ULONGEST source_offset,
861f93
+	      ULONGEST bit_count,
861f93
 	      int bits_big_endian)
861f93
 {
861f93
-  unsigned int dest_avail;
861f93
+  unsigned int dest_avail, source_offset_bits;
861f93
   int datum;
861f93
 
861f93
   /* Reduce everything to byte-size pieces.  */
861f93
   dest += dest_offset_bits / 8;
861f93
   dest_offset_bits %= 8;
861f93
-  source += source_offset_bits / 8;
861f93
-  source_offset_bits %= 8;
861f93
+  source += source_offset / 8;
861f93
+  source_offset_bits = source_offset % 8;
861f93
 
861f93
   dest_avail = 8 - dest_offset_bits % 8;
861f93
 
861f93
@@ -1730,13 +1730,13 @@ static void
861f93
 read_pieced_value (struct value *v)
861f93
 {
861f93
   int i;
861f93
-  long offset = 0;
861f93
+  LONGEST offset = 0;
861f93
   ULONGEST bits_to_skip;
861f93
   gdb_byte *contents;
861f93
   struct piece_closure *c
861f93
     = (struct piece_closure *) value_computed_closure (v);
861f93
   struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v));
861f93
-  size_t type_len;
861f93
+  ULONGEST type_len;
861f93
   size_t buffer_size = 0;
861f93
   char *buffer = NULL;
861f93
   struct cleanup *cleanup;
861f93
@@ -1763,8 +1763,8 @@ read_pieced_value (struct value *v)
861f93
   for (i = 0; i < c->n_pieces && offset < type_len; i++)
861f93
     {
861f93
       struct dwarf_expr_piece *p = &c->pieces[i];
861f93
-      size_t this_size, this_size_bits;
861f93
-      long dest_offset_bits, source_offset_bits, source_offset;
861f93
+      ULONGEST this_size, this_size_bits;
861f93
+      LONGEST dest_offset_bits, source_offset_bits, source_offset;
861f93
       const gdb_byte *intermediate_buffer;
861f93
 
861f93
       /* Compute size, source, and destination offsets for copying, in
861f93
@@ -1913,13 +1913,13 @@ static void
861f93
 write_pieced_value (struct value *to, struct value *from)
861f93
 {
861f93
   int i;
861f93
-  long offset = 0;
861f93
+  LONGEST offset = 0;
861f93
   ULONGEST bits_to_skip;
861f93
   const gdb_byte *contents;
861f93
   struct piece_closure *c
861f93
     = (struct piece_closure *) value_computed_closure (to);
861f93
   struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to));
861f93
-  size_t type_len;
861f93
+  ULONGEST type_len;
861f93
   size_t buffer_size = 0;
861f93
   char *buffer = NULL;
861f93
   struct cleanup *cleanup;
861f93
@@ -1947,8 +1947,8 @@ write_pieced_value (struct value *to, st
861f93
   for (i = 0; i < c->n_pieces && offset < type_len; i++)
861f93
     {
861f93
       struct dwarf_expr_piece *p = &c->pieces[i];
861f93
-      size_t this_size_bits, this_size;
861f93
-      long dest_offset_bits, source_offset_bits, dest_offset, source_offset;
861f93
+      ULONGEST this_size_bits, this_size;
861f93
+      LONGEST dest_offset_bits, source_offset_bits, dest_offset, source_offset;
861f93
       int need_bitwise;
861f93
       const gdb_byte *source_buffer;
861f93
 
861f93
@@ -2077,8 +2077,8 @@ write_pieced_value (struct value *to, st
861f93
    implicit pointer.  */
861f93
 
861f93
 static int
861f93
-check_pieced_value_bits (const struct value *value, int bit_offset,
861f93
-			 int bit_length,
861f93
+check_pieced_value_bits (const struct value *value, LONGEST bit_offset,
861f93
+			 LONGEST bit_length,
861f93
 			 enum dwarf_value_location check_for)
861f93
 {
861f93
   struct piece_closure *c
861f93
@@ -2094,7 +2094,7 @@ check_pieced_value_bits (const struct va
861f93
   for (i = 0; i < c->n_pieces && bit_length > 0; i++)
861f93
     {
861f93
       struct dwarf_expr_piece *p = &c->pieces[i];
861f93
-      size_t this_size_bits = p->size;
861f93
+      ULONGEST this_size_bits = p->size;
861f93
 
861f93
       if (bit_offset > 0)
861f93
 	{
861f93
@@ -2132,8 +2132,8 @@ check_pieced_value_bits (const struct va
861f93
 }
861f93
 
861f93
 static int
861f93
-check_pieced_value_validity (const struct value *value, int bit_offset,
861f93
-			     int bit_length)
861f93
+check_pieced_value_validity (const struct value *value, LONGEST bit_offset,
861f93
+			     LONGEST bit_length)
861f93
 {
861f93
   return check_pieced_value_bits (value, bit_offset, bit_length,
861f93
 				  DWARF_VALUE_MEMORY);
861f93
@@ -2151,8 +2151,8 @@ check_pieced_value_invalid (const struct
861f93
    a synthetic pointer.  */
861f93
 
861f93
 static int
861f93
-check_pieced_synthetic_pointer (const struct value *value, int bit_offset,
861f93
-				int bit_length)
861f93
+check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset,
861f93
+				LONGEST bit_length)
861f93
 {
861f93
   return check_pieced_value_bits (value, bit_offset, bit_length,
861f93
 				  DWARF_VALUE_IMPLICIT_POINTER);
861f93
@@ -2177,9 +2177,10 @@ indirect_pieced_value (struct value *val
861f93
   struct type *type;
861f93
   struct frame_info *frame;
861f93
   struct dwarf2_locexpr_baton baton;
861f93
-  int i, bit_offset, bit_length;
861f93
+  int i;
861f93
+  LONGEST bit_length;
861f93
   struct dwarf_expr_piece *piece = NULL;
861f93
-  LONGEST byte_offset;
861f93
+  LONGEST byte_offset, bit_offset;
861f93
 
861f93
   type = check_typedef (value_type (value));
861f93
   if (TYPE_CODE (type) != TYPE_CODE_PTR)
861f93
@@ -2193,7 +2194,7 @@ indirect_pieced_value (struct value *val
861f93
   for (i = 0; i < c->n_pieces && bit_length > 0; i++)
861f93
     {
861f93
       struct dwarf_expr_piece *p = &c->pieces[i];
861f93
-      size_t this_size_bits = p->size;
861f93
+      ULONGEST this_size_bits = p->size;
861f93
 
861f93
       if (bit_offset > 0)
861f93
 	{
861f93
@@ -2409,7 +2410,7 @@ dwarf2_evaluate_loc_desc_full (struct ty
861f93
 	    struct value *value = dwarf_expr_fetch (ctx, 0);
861f93
 	    gdb_byte *contents;
861f93
 	    const gdb_byte *val_bytes;
861f93
-	    size_t n = TYPE_LENGTH (value_type (value));
861f93
+	    ULONGEST n = TYPE_LENGTH (value_type (value));
861f93
 
861f93
 	    if (byte_offset + TYPE_LENGTH (type) > n)
861f93
 	      invalid_synthetic_pointer ();
861f93
Index: gdb-7.6.1/gdb/dwarf2read.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/dwarf2read.c	2013-08-30 21:54:18.741367540 +0200
861f93
+++ gdb-7.6.1/gdb/dwarf2read.c	2013-08-30 21:54:20.460368192 +0200
861f93
@@ -1227,12 +1227,12 @@ dwarf2_complex_location_expr_complaint (
861f93
 }
861f93
 
861f93
 static void
861f93
-dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
861f93
-					      int arg3)
861f93
+dwarf2_const_value_length_mismatch_complaint (const char *arg1, LONGEST arg2,
861f93
+					      LONGEST arg3)
861f93
 {
861f93
   complaint (&symfile_complaints,
861f93
-	     _("const value length mismatch for '%s', got %d, expected %d"),
861f93
-	     arg1, arg2, arg3);
861f93
+	     _("const value length mismatch for '%s', got %s, expected %s"),
861f93
+	     arg1, plongest (arg2), plongest (arg3));
861f93
 }
861f93
 
861f93
 static void
861f93
@@ -10647,8 +10647,8 @@ dwarf2_add_field (struct field_info *fip
861f93
 	         object, and then subtract off the number of bits of
861f93
 	         the field itself.  The result is the bit offset of
861f93
 	         the LSB of the field.  */
861f93
-	      int anonymous_size;
861f93
-	      int bit_offset = DW_UNSND (attr);
861f93
+	      LONGEST anonymous_size;
861f93
+	      LONGEST bit_offset = DW_UNSND (attr);
861f93
 
861f93
 	      attr = dwarf2_attr (die, DW_AT_byte_size, cu);
861f93
 	      if (attr)
861f93
Index: gdb-7.6.1/gdb/eval.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/eval.c	2013-08-30 21:54:18.743367540 +0200
861f93
+++ gdb-7.6.1/gdb/eval.c	2013-08-30 21:54:20.461368192 +0200
861f93
@@ -294,7 +294,8 @@ evaluate_struct_tuple (struct value *str
861f93
   while (--nargs >= 0)
861f93
     {
861f93
       struct value *val = NULL;
861f93
-      int bitpos, bitsize;
861f93
+      LONGEST bitpos;
861f93
+      int bitsize;
861f93
       bfd_byte *addr;
861f93
 
861f93
       fieldno++;
861f93
@@ -356,7 +357,7 @@ init_array_element (struct value *array,
861f93
 		    enum noside noside, LONGEST low_bound, LONGEST high_bound)
861f93
 {
861f93
   LONGEST index;
861f93
-  int element_size = TYPE_LENGTH (value_type (element));
861f93
+  LONGEST element_size = TYPE_LENGTH (value_type (element));
861f93
 
861f93
   if (exp->elts[*pos].opcode == BINOP_COMMA)
861f93
     {
861f93
@@ -709,11 +710,11 @@ binop_promote (const struct language_def
861f93
     /* FIXME: Also mixed integral/booleans, with result an integer.  */
861f93
     {
861f93
       const struct builtin_type *builtin = builtin_type (gdbarch);
861f93
-      unsigned int promoted_len1 = TYPE_LENGTH (type1);
861f93
-      unsigned int promoted_len2 = TYPE_LENGTH (type2);
861f93
+      ULONGEST promoted_len1 = TYPE_LENGTH (type1);
861f93
+      ULONGEST promoted_len2 = TYPE_LENGTH (type2);
861f93
       int is_unsigned1 = TYPE_UNSIGNED (type1);
861f93
       int is_unsigned2 = TYPE_UNSIGNED (type2);
861f93
-      unsigned int result_len;
861f93
+      ULONGEST result_len;
861f93
       int unsigned_operation;
861f93
 
861f93
       /* Determine type length and signedness after promotion for
861f93
@@ -896,7 +897,7 @@ evaluate_subexp_standard (struct type *e
861f93
   struct value **argvec;
861f93
   int code;
861f93
   int ix;
861f93
-  long mem_offset;
861f93
+  LONGEST mem_offset;
861f93
   struct type **arg_types;
861f93
   int save_pos1;
861f93
   struct symbol *function = NULL;
861f93
@@ -1076,7 +1077,7 @@ evaluate_subexp_standard (struct type *e
861f93
 	  struct type *range_type = TYPE_INDEX_TYPE (type);
861f93
 	  struct type *element_type = TYPE_TARGET_TYPE (type);
861f93
 	  struct value *array = allocate_value (expect_type);
861f93
-	  int element_size = TYPE_LENGTH (check_typedef (element_type));
861f93
+	  LONGEST element_size = TYPE_LENGTH (check_typedef (element_type));
861f93
 	  LONGEST low_bound, high_bound, index;
861f93
 
861f93
 	  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
861f93
@@ -2078,7 +2079,8 @@ evaluate_subexp_standard (struct type *e
861f93
       {
861f93
         struct type *type = value_type (arg1);
861f93
         struct type *real_type;
861f93
-        int full, top, using_enc;
861f93
+        int full, using_enc;
861f93
+	LONGEST top;
861f93
 	struct value_print_options opts;
861f93
 
861f93
 	get_user_print_options (&opts);
861f93
Index: gdb-7.6.1/gdb/f-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/f-lang.c	2013-08-30 21:54:18.743367540 +0200
861f93
+++ gdb-7.6.1/gdb/f-lang.c	2013-08-30 21:54:20.461368192 +0200
861f93
@@ -103,7 +103,7 @@ f_printchar (int c, struct type *type, s
861f93
 
861f93
 static void
861f93
 f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
861f93
-	    unsigned int length, const char *encoding, int force_ellipses,
861f93
+	    ULONGEST length, const char *encoding, int force_ellipses,
861f93
 	    const struct value_print_options *options)
861f93
 {
861f93
   const char *type_encoding = f_get_encoding (type);
861f93
Index: gdb-7.6.1/gdb/f-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/f-lang.h	2013-08-30 21:54:18.743367540 +0200
861f93
+++ gdb-7.6.1/gdb/f-lang.h	2013-08-30 21:54:20.461368192 +0200
861f93
@@ -33,7 +33,7 @@ extern const char *f_object_address_data
861f93
   (struct type *type, struct ui_file *stream);
861f93
 extern void f_object_address_data_valid_or_error (struct type *type);
861f93
 
861f93
-extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
861f93
+extern void f_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
861f93
 			 struct ui_file *, int,
861f93
 			 const struct value *,
861f93
 			 const struct value_print_options *);
861f93
Index: gdb-7.6.1/gdb/f-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/f-valprint.c	2013-08-30 21:54:18.744367541 +0200
861f93
+++ gdb-7.6.1/gdb/f-valprint.c	2013-08-30 21:54:20.461368192 +0200
861f93
@@ -43,7 +43,7 @@ static void f77_create_arrayprint_offset
861f93
 					      struct ui_file *);
861f93
 static void f77_get_dynamic_length_of_aggregate (struct type *);
861f93
 
861f93
-int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
861f93
+LONGEST f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
861f93
 
861f93
 /* Array which holds offsets to be applied to get a row's elements
861f93
    for a given array.  Array also holds the size of each subarray.  */
861f93
@@ -126,7 +126,7 @@ static void
861f93
 f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
861f93
 {
861f93
   struct type *tmp_type;
861f93
-  int eltlen;
861f93
+  LONGEST eltlen;
861f93
   int ndimen = 1;
861f93
   int upper, lower;
861f93
 
861f93
@@ -171,13 +171,13 @@ f77_create_arrayprint_offset_tbl (struct
861f93
 static void
861f93
 f77_print_array_1 (int nss, int ndimensions, struct type *type,
861f93
 		   const gdb_byte *valaddr,
861f93
-		   int embedded_offset, CORE_ADDR address,
861f93
+		   LONGEST embedded_offset, CORE_ADDR address,
861f93
 		   struct ui_file *stream, int recurse,
861f93
 		   const struct value *val,
861f93
 		   const struct value_print_options *options,
861f93
 		   int *elts)
861f93
 {
861f93
-  int i;
861f93
+  LONGEST i;
861f93
 
861f93
   if (nss != ndimensions)
861f93
     {
861f93
@@ -220,7 +220,7 @@ f77_print_array_1 (int nss, int ndimensi
861f93
 
861f93
 static void
861f93
 f77_print_array (struct type *type, const gdb_byte *valaddr,
861f93
-		 int embedded_offset,
861f93
+		 LONGEST embedded_offset,
861f93
 		 CORE_ADDR address, struct ui_file *stream,
861f93
 		 int recurse,
861f93
 		 const struct value *val,
861f93
@@ -263,8 +263,9 @@ static const struct generic_val_print_de
861f93
    function; they are identical.  */
861f93
 
861f93
 void
861f93
-f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
861f93
-	     CORE_ADDR address, struct ui_file *stream, int recurse,
861f93
+f_val_print (struct type *type, const gdb_byte *valaddr,
861f93
+	     LONGEST embedded_offset, CORE_ADDR address,
861f93
+	     struct ui_file *stream, int recurse,
861f93
 	     const struct value *original_value,
861f93
 	     const struct value_print_options *options)
861f93
 {
861f93
@@ -389,7 +390,7 @@ f_val_print (struct type *type, const gd
861f93
       fprintf_filtered (stream, "( ");
861f93
       for (index = 0; index < TYPE_NFIELDS (type); index++)
861f93
         {
861f93
-          int offset = TYPE_FIELD_BITPOS (type, index) / 8;
861f93
+	  LONGEST offset = TYPE_FIELD_BITPOS (type, index) / 8;
861f93
 
861f93
           val_print (TYPE_FIELD_TYPE (type, index), valaddr,
861f93
 		     embedded_offset + offset,
861f93
Index: gdb-7.6.1/gdb/findvar.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/findvar.c	2013-08-30 21:54:18.744367541 +0200
861f93
+++ gdb-7.6.1/gdb/findvar.c	2013-08-30 21:54:20.462368193 +0200
861f93
@@ -644,7 +644,7 @@ default_value_from_register (struct type
861f93
 			     struct frame_info *frame)
861f93
 {
861f93
   struct gdbarch *gdbarch = get_frame_arch (frame);
861f93
-  int len = TYPE_LENGTH (type);
861f93
+  LONGEST len = TYPE_LENGTH (type);
861f93
   struct value *value = allocate_value (type);
861f93
 
861f93
   VALUE_LVAL (value) = lval_register;
861f93
@@ -677,10 +677,10 @@ void
861f93
 read_frame_register_value (struct value *value, struct frame_info *frame)
861f93
 {
861f93
   struct gdbarch *gdbarch = get_frame_arch (frame);
861f93
-  int offset = 0;
861f93
-  int reg_offset = value_offset (value);
861f93
+  LONGEST offset = 0;
861f93
+  LONGEST reg_offset = value_offset (value);
861f93
   int regnum = VALUE_REGNUM (value);
861f93
-  int len = TYPE_LENGTH (check_typedef (value_type (value)));
861f93
+  LONGEST len = TYPE_LENGTH (check_typedef (value_type (value)));
861f93
 
861f93
   gdb_assert (VALUE_LVAL (value) == lval_register);
861f93
 
861f93
@@ -695,7 +695,7 @@ read_frame_register_value (struct value
861f93
   while (len > 0)
861f93
     {
861f93
       struct value *regval = get_frame_register_value (frame, regnum);
861f93
-      int reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset;
861f93
+      LONGEST reg_len = TYPE_LENGTH (value_type (regval)) - reg_offset;
861f93
 
861f93
       if (value_optimized_out (regval))
861f93
 	{
861f93
Index: gdb-7.6.1/gdb/frame.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/frame.c	2013-08-30 21:54:18.744367541 +0200
861f93
+++ gdb-7.6.1/gdb/frame.c	2013-08-30 21:54:20.462368193 +0200
861f93
@@ -1113,7 +1113,7 @@ deprecated_frame_register_read (struct f
861f93
 
861f93
 int
861f93
 get_frame_register_bytes (struct frame_info *frame, int regnum,
861f93
-			  CORE_ADDR offset, int len, gdb_byte *myaddr,
861f93
+			  CORE_ADDR offset, LONGEST len, gdb_byte *myaddr,
861f93
 			  int *optimizedp, int *unavailablep)
861f93
 {
861f93
   struct gdbarch *gdbarch = get_frame_arch (frame);
861f93
@@ -1142,7 +1142,7 @@ get_frame_register_bytes (struct frame_i
861f93
     }
861f93
   if (len > maxsize)
861f93
     error (_("Bad debug information detected: "
861f93
-	     "Attempt to read %d bytes from registers."), len);
861f93
+	     "Attempt to read %s bytes from registers."), plongest (len));
861f93
 
861f93
   /* Copy the data.  */
861f93
   while (len > 0)
861f93
Index: gdb-7.6.1/gdb/frame.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/frame.h	2013-08-30 21:54:18.745367541 +0200
861f93
+++ gdb-7.6.1/gdb/frame.h	2013-08-30 21:54:20.462368193 +0200
861f93
@@ -532,7 +532,7 @@ extern void put_frame_register (struct f
861f93
    contents are optimized out or unavailable, set *OPTIMIZEDP,
861f93
    *UNAVAILABLEP accordingly.  */
861f93
 extern int get_frame_register_bytes (struct frame_info *frame, int regnum,
861f93
-				     CORE_ADDR offset, int len,
861f93
+				     CORE_ADDR offset, LONGEST len,
861f93
 				     gdb_byte *myaddr,
861f93
 				     int *optimizedp, int *unavailablep);
861f93
 
861f93
Index: gdb-7.6.1/gdb/gdbtypes.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/gdbtypes.c	2013-08-30 21:54:18.746367542 +0200
861f93
+++ gdb-7.6.1/gdb/gdbtypes.c	2013-08-30 21:54:20.463368193 +0200
861f93
@@ -2090,7 +2090,7 @@ allocate_gnat_aux_type (struct type *typ
861f93
    least as long as OBJFILE.  */
861f93
 
861f93
 struct type *
861f93
-init_type (enum type_code code, int length, int flags,
861f93
+init_type (enum type_code code, LONGEST length, int flags,
861f93
 	   const char *name, struct objfile *objfile)
861f93
 {
861f93
   struct type *type;
861f93
@@ -2321,8 +2321,8 @@ is_public_ancestor (struct type *base, s
861f93
 
861f93
 static int
861f93
 is_unique_ancestor_worker (struct type *base, struct type *dclass,
861f93
-			   int *offset,
861f93
-			   const gdb_byte *valaddr, int embedded_offset,
861f93
+			   LONGEST *offset,
861f93
+			   const gdb_byte *valaddr, LONGEST embedded_offset,
861f93
 			   CORE_ADDR address, struct value *val)
861f93
 {
861f93
   int i, count = 0;
861f93
@@ -2333,7 +2333,7 @@ is_unique_ancestor_worker (struct type *
861f93
   for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i)
861f93
     {
861f93
       struct type *iter;
861f93
-      int this_offset;
861f93
+      LONGEST this_offset;
861f93
 
861f93
       iter = check_typedef (TYPE_BASECLASS (dclass, i));
861f93
 
861f93
@@ -2374,7 +2374,7 @@ is_unique_ancestor_worker (struct type *
861f93
 int
861f93
 is_unique_ancestor (struct type *base, struct value *val)
861f93
 {
861f93
-  int offset = -1;
861f93
+  LONGEST offset = -1;
861f93
 
861f93
   return is_unique_ancestor_worker (base, value_type (val), &offset,
861f93
 				    value_contents_for_printing (val),
861f93
@@ -3283,7 +3283,7 @@ recursive_dump_type (struct type *type,
861f93
       break;
861f93
     }
861f93
   puts_filtered ("\n");
861f93
-  printfi_filtered (spaces, "length %d\n", TYPE_LENGTH (type));
861f93
+  printfi_filtered (spaces, "length %s\n", pulongest (TYPE_LENGTH (type)));
861f93
   if (TYPE_OBJFILE_OWNED (type))
861f93
     {
861f93
       printfi_filtered (spaces, "objfile ");
861f93
@@ -3407,8 +3407,8 @@ recursive_dump_type (struct type *type,
861f93
 			  idx, plongest (TYPE_FIELD_ENUMVAL (type, idx)));
861f93
       else
861f93
 	printfi_filtered (spaces + 2,
861f93
-			  "[%d] bitpos %d bitsize %d type ",
861f93
-			  idx, TYPE_FIELD_BITPOS (type, idx),
861f93
+			  "[%d] bitpos %s bitsize %d type ",
861f93
+			  idx, plongest (TYPE_FIELD_BITPOS (type, idx)),
861f93
 			  TYPE_FIELD_BITSIZE (type, idx));
861f93
       gdb_print_host_address (TYPE_FIELD_TYPE (type, idx), gdb_stdout);
861f93
       printf_filtered (" name '%s' (",
861f93
@@ -3922,7 +3922,7 @@ copy_type (const struct type *type)
861f93
 
861f93
 struct type *
861f93
 arch_type (struct gdbarch *gdbarch,
861f93
-	   enum type_code code, int length, char *name)
861f93
+	   enum type_code code, LONGEST length, char *name)
861f93
 {
861f93
   struct type *type;
861f93
 
861f93
Index: gdb-7.6.1/gdb/gdbtypes.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/gdbtypes.h	2013-08-30 21:54:18.747367542 +0200
861f93
+++ gdb-7.6.1/gdb/gdbtypes.h	2013-08-30 21:54:20.463368193 +0200
861f93
@@ -606,7 +606,7 @@ struct main_type
861f93
 	   gdbarch_bits_big_endian=0 targets, it is the bit offset to
861f93
 	   the LSB.  */
861f93
 
861f93
-	int bitpos;
861f93
+	LONGEST bitpos;
861f93
 
861f93
 	/* Enum value.  */
861f93
 	LONGEST enumval;
861f93
@@ -798,7 +798,7 @@ struct type
861f93
      HOST_CHAR_BIT.  However, this would still fail to address
861f93
      machines based on a ternary or decimal representation.  */
861f93
   
861f93
-  unsigned length;
861f93
+  ULONGEST length;
861f93
 
861f93
   /* Core type, shared by a group of qualified types.  */
861f93
   struct main_type *main_type;
861f93
@@ -1542,11 +1542,12 @@ extern struct type *alloc_type_copy (con
861f93
 extern struct gdbarch *get_type_arch (const struct type *);
861f93
 
861f93
 /* Helper function to construct objfile-owned types.  */
861f93
-extern struct type *init_type (enum type_code, int, int, const char *,
861f93
+extern struct type *init_type (enum type_code, LONGEST, int, const char *,
861f93
 			       struct objfile *);
861f93
 
861f93
 /* Helper functions to construct architecture-owned types.  */
861f93
-extern struct type *arch_type (struct gdbarch *, enum type_code, int, char *);
861f93
+extern struct type *arch_type (struct gdbarch *, enum type_code, LONGEST,
861f93
+			       char *);
861f93
 extern struct type *arch_integer_type (struct gdbarch *, int, int, char *);
861f93
 extern struct type *arch_character_type (struct gdbarch *, int, int, char *);
861f93
 extern struct type *arch_boolean_type (struct gdbarch *, int, int, char *);
861f93
Index: gdb-7.6.1/gdb/gnu-v2-abi.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/gnu-v2-abi.c	2013-08-30 21:54:18.747367542 +0200
861f93
+++ gdb-7.6.1/gdb/gnu-v2-abi.c	2013-08-30 21:54:20.464368193 +0200
861f93
@@ -85,7 +85,7 @@ gnuv2_is_operator_name (const char *name
861f93
    TYPE is the type in which F is located.  */
861f93
 static struct value *
861f93
 gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
861f93
-			struct type * type, int offset)
861f93
+			struct type *type, LONGEST offset)
861f93
 {
861f93
   struct value *arg1 = *arg1p;
861f93
   struct type *type1 = check_typedef (value_type (arg1));
861f93
@@ -186,7 +186,8 @@ gnuv2_virtual_fn_field (struct value **a
861f93
 
861f93
 
861f93
 static struct type *
861f93
-gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
861f93
+gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top,
861f93
+		       int *using_enc)
861f93
 {
861f93
   struct type *known_type;
861f93
   struct type *rtti_type;
861f93
@@ -341,9 +342,9 @@ vb_match (struct type *type, int index,
861f93
    target).  The result is the offset of the baseclass value relative
861f93
    to (the address of)(ARG) + OFFSET.  */
861f93
 
861f93
-static int
861f93
+static LONGEST
861f93
 gnuv2_baseclass_offset (struct type *type, int index,
861f93
-			const bfd_byte *valaddr, int embedded_offset,
861f93
+			const bfd_byte *valaddr, LONGEST embedded_offset,
861f93
 			CORE_ADDR address, const struct value *val)
861f93
 {
861f93
   struct type *basetype = TYPE_BASECLASS (type, index);
861f93
@@ -361,8 +362,8 @@ gnuv2_baseclass_offset (struct type *typ
861f93
 	  if (vb_match (type, i, basetype))
861f93
 	    {
861f93
 	      struct type *field_type;
861f93
-	      int field_offset;
861f93
-	      int field_length;
861f93
+	      LONGEST field_offset;
861f93
+	      LONGEST field_length;
861f93
 	      CORE_ADDR addr;
861f93
 
861f93
 	      field_type = check_typedef (TYPE_FIELD_TYPE (type, i));
861f93
@@ -386,7 +387,7 @@ gnuv2_baseclass_offset (struct type *typ
861f93
 	  /* Don't go through baseclass_offset, as that wraps
861f93
 	     exceptions, thus, inner exceptions would be wrapped more
861f93
 	     than once.  */
861f93
-	  int boffset =
861f93
+	  LONGEST boffset =
861f93
 	    gnuv2_baseclass_offset (type, i, valaddr,
861f93
 				    embedded_offset, address, val);
861f93
 
861f93
Index: gdb-7.6.1/gdb/gnu-v3-abi.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/gnu-v3-abi.c	2013-08-30 21:54:18.747367542 +0200
861f93
+++ gdb-7.6.1/gdb/gnu-v3-abi.c	2013-08-30 21:54:20.464368193 +0200
861f93
@@ -106,7 +106,7 @@ build_gdb_vtable_type (struct gdbarch *a
861f93
 {
861f93
   struct type *t;
861f93
   struct field *field_list, *field;
861f93
-  int offset;
861f93
+  LONGEST offset;
861f93
 
861f93
   struct type *void_ptr_type
861f93
     = builtin_type (arch)->builtin_data_ptr;
861f93
@@ -182,7 +182,7 @@ vtable_ptrdiff_type (struct gdbarch *gdb
861f93
 /* Return the offset from the start of the imaginary `struct
861f93
    gdb_gnu_v3_abi_vtable' object to the vtable's "address point"
861f93
    (i.e., where objects' virtual table pointers point).  */
861f93
-static int
861f93
+static LONGEST
861f93
 vtable_address_point_offset (struct gdbarch *gdbarch)
861f93
 {
861f93
   struct type *vtable_type = gdbarch_data (gdbarch, vtable_type_gdbarch_data);
861f93
@@ -273,7 +273,7 @@ gnuv3_get_vtable (struct gdbarch *gdbarc
861f93
 
861f93
 static struct type *
861f93
 gnuv3_rtti_type (struct value *value,
861f93
-                 int *full_p, int *top_p, int *using_enc_p)
861f93
+                 int *full_p, LONGEST *top_p, int *using_enc_p)
861f93
 {
861f93
   struct gdbarch *gdbarch;
861f93
   struct type *values_type = check_typedef (value_type (value));
861f93
@@ -385,7 +385,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gd
861f93
 static struct value *
861f93
 gnuv3_virtual_fn_field (struct value **value_p,
861f93
                         struct fn_field *f, int j,
861f93
-			struct type *vfn_base, int offset)
861f93
+			struct type *vfn_base, LONGEST offset)
861f93
 {
861f93
   struct type *values_type = check_typedef (value_type (*value_p));
861f93
   struct gdbarch *gdbarch;
861f93
@@ -415,16 +415,16 @@ gnuv3_virtual_fn_field (struct value **v
861f93
 
861f93
    -1 is returned on error.  */
861f93
 
861f93
-static int
861f93
+static LONGEST
861f93
 gnuv3_baseclass_offset (struct type *type, int index,
861f93
-			const bfd_byte *valaddr, int embedded_offset,
861f93
+			const bfd_byte *valaddr, LONGEST embedded_offset,
861f93
 			CORE_ADDR address, const struct value *val)
861f93
 {
861f93
   struct gdbarch *gdbarch;
861f93
   struct type *ptr_type;
861f93
   struct value *vtable;
861f93
   struct value *vbase_array;
861f93
-  long int cur_base_offset, base_offset;
861f93
+  LONGEST cur_base_offset, base_offset;
861f93
 
861f93
   /* Determine architecture.  */
861f93
   gdbarch = get_type_arch (type);
861f93
@@ -448,7 +448,7 @@ gnuv3_baseclass_offset (struct type *typ
861f93
   cur_base_offset = cur_base_offset + vtable_address_point_offset (gdbarch);
861f93
   if ((- cur_base_offset) % TYPE_LENGTH (ptr_type) != 0)
861f93
     error (_("Misaligned vbase offset."));
861f93
-  cur_base_offset = cur_base_offset / ((int) TYPE_LENGTH (ptr_type));
861f93
+  cur_base_offset = cur_base_offset / ((LONGEST) TYPE_LENGTH (ptr_type));
861f93
 
861f93
   vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset);
861f93
   gdb_assert (vtable != NULL);
861f93
@@ -492,7 +492,7 @@ gnuv3_find_method_in (struct type *domai
861f93
      we're out of luck.  */
861f93
   for (i = 0; i < TYPE_N_BASECLASSES (domain); i++)
861f93
     {
861f93
-      int pos;
861f93
+      LONGEST pos;
861f93
       struct type *basetype;
861f93
 
861f93
       if (BASETYPE_VIA_VIRTUAL (domain, i))
861f93
Index: gdb-7.6.1/gdb/go-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/go-lang.h	2013-08-30 21:54:18.748367542 +0200
861f93
+++ gdb-7.6.1/gdb/go-lang.h	2013-08-30 21:54:20.464368193 +0200
861f93
@@ -83,7 +83,7 @@ extern void go_print_type (struct type *
861f93
 /* Defined in go-valprint.c.  */
861f93
 
861f93
 extern void go_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-			  int embedded_offset, CORE_ADDR address,
861f93
+			  LONGEST embedded_offset, CORE_ADDR address,
861f93
 			  struct ui_file *stream, int recurse,
861f93
 			  const struct value *val,
861f93
 			  const struct value_print_options *options);
861f93
Index: gdb-7.6.1/gdb/go-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/go-valprint.c	2013-08-30 21:54:18.748367542 +0200
861f93
+++ gdb-7.6.1/gdb/go-valprint.c	2013-08-30 21:54:20.464368193 +0200
861f93
@@ -37,7 +37,7 @@
861f93
 
861f93
 static void
861f93
 print_go_string (struct type *type, const gdb_byte *valaddr,
861f93
-		 int embedded_offset, CORE_ADDR address,
861f93
+		 LONGEST embedded_offset, CORE_ADDR address,
861f93
 		 struct ui_file *stream, int recurse,
861f93
 		 const struct value *val,
861f93
 		 const struct value_print_options *options)
861f93
@@ -86,9 +86,9 @@ print_go_string (struct type *type, cons
861f93
 /* Implements the la_val_print routine for language Go.  */
861f93
 
861f93
 void
861f93
-go_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
861f93
-	      CORE_ADDR address, struct ui_file *stream, int recurse,
861f93
-	      const struct value *val,
861f93
+go_val_print (struct type *type, const gdb_byte *valaddr,
861f93
+	      LONGEST embedded_offset, CORE_ADDR address,
861f93
+	      struct ui_file *stream, int recurse, const struct value *val,
861f93
 	      const struct value_print_options *options)
861f93
 {
861f93
   CHECK_TYPEDEF (type);
861f93
Index: gdb-7.6.1/gdb/i386-nat.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/i386-nat.c	2013-08-30 21:54:18.748367542 +0200
861f93
+++ gdb-7.6.1/gdb/i386-nat.c	2013-08-30 21:54:20.465368194 +0200
861f93
@@ -290,7 +290,7 @@ static int i386_remove_aligned_watchpoin
861f93
    valid value, bombs through internal_error.  */
861f93
 static int i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state,
861f93
 					      i386_wp_op_t what,
861f93
-					      CORE_ADDR addr, int len,
861f93
+					      CORE_ADDR addr, LONGEST len,
861f93
 					      enum target_hw_bp_type type);
861f93
 
861f93
 /* Implementation.  */
861f93
@@ -501,8 +501,8 @@ i386_remove_aligned_watchpoint (struct i
861f93
 
861f93
 static int
861f93
 i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state,
861f93
-				   i386_wp_op_t what, CORE_ADDR addr, int len,
861f93
-				   enum target_hw_bp_type type)
861f93
+				   i386_wp_op_t what, CORE_ADDR addr,
861f93
+				   LONGEST len, enum target_hw_bp_type type)
861f93
 {
861f93
   int retval = 0;
861f93
   int max_wp_len = TARGET_HAS_DR_LEN_8 ? 8 : 4;
861f93
@@ -662,7 +662,7 @@ i386_remove_watchpoint (CORE_ADDR addr,
861f93
    address ADDR and whose length is LEN bytes.  */
861f93
 
861f93
 static int
861f93
-i386_region_ok_for_watchpoint (CORE_ADDR addr, int len)
861f93
+i386_region_ok_for_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   struct i386_debug_reg_state *state
861f93
     = i386_debug_reg_state (ptid_get_pid (inferior_ptid));
861f93
Index: gdb-7.6.1/gdb/inf-ttrace.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/inf-ttrace.c	2013-08-30 21:54:18.748367542 +0200
861f93
+++ gdb-7.6.1/gdb/inf-ttrace.c	2013-08-30 21:54:20.465368194 +0200
861f93
@@ -364,7 +364,7 @@ inf_ttrace_can_use_hw_breakpoint (int ty
861f93
 }
861f93
 
861f93
 static int
861f93
-inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   return 1;
861f93
 }
861f93
Index: gdb-7.6.1/gdb/jv-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/jv-lang.c	2013-08-30 21:54:18.749367543 +0200
861f93
+++ gdb-7.6.1/gdb/jv-lang.c	2013-08-30 21:54:20.465368194 +0200
861f93
@@ -437,7 +437,7 @@ java_link_class_type (struct gdbarch *gd
861f93
   for (i = TYPE_N_BASECLASSES (type); i < nfields; i++)
861f93
     {
861f93
       int accflags;
861f93
-      int boffset;
861f93
+      LONGEST boffset;
861f93
 
861f93
       if (fields == NULL)
861f93
 	{
861f93
@@ -887,7 +887,7 @@ java_printchar (int c, struct type *type
861f93
 static void
861f93
 java_printstr (struct ui_file *stream, struct type *type,
861f93
 	       const gdb_byte *string,
861f93
-	       unsigned int length, const char *encoding, int force_ellipses,
861f93
+	       ULONGEST length, const char *encoding, int force_ellipses,
861f93
 	       const struct value_print_options *options)
861f93
 {
861f93
   const char *type_encoding = java_get_encoding (type);
861f93
Index: gdb-7.6.1/gdb/jv-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/jv-lang.h	2013-08-30 21:54:18.749367543 +0200
861f93
+++ gdb-7.6.1/gdb/jv-lang.h	2013-08-30 21:54:20.465368194 +0200
861f93
@@ -42,8 +42,8 @@ struct builtin_java_type
861f93
 
861f93
 extern const struct builtin_java_type *builtin_java_type (struct gdbarch *);
861f93
 
861f93
-extern void java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
861f93
-			    struct ui_file *, int,
861f93
+extern void java_val_print (struct type *, const gdb_byte *, LONGEST,
861f93
+			    CORE_ADDR, struct ui_file *, int,
861f93
 			    const struct value *,
861f93
 			    const struct value_print_options *);
861f93
 
861f93
Index: gdb-7.6.1/gdb/jv-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/jv-valprint.c	2013-08-30 21:54:18.749367543 +0200
861f93
+++ gdb-7.6.1/gdb/jv-valprint.c	2013-08-30 21:54:20.466368194 +0200
861f93
@@ -266,7 +266,7 @@ java_value_print (struct value *val, str
861f93
 
861f93
 static void
861f93
 java_print_value_fields (struct type *type, const gdb_byte *valaddr,
861f93
-			 int offset,
861f93
+			 LONGEST offset,
861f93
 			 CORE_ADDR address, struct ui_file *stream,
861f93
 			 int recurse,
861f93
 			 const struct value *val,
861f93
@@ -465,7 +465,7 @@ java_print_value_fields (struct type *ty
861f93
 
861f93
 void
861f93
 java_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-		int embedded_offset, CORE_ADDR address,
861f93
+		LONGEST embedded_offset, CORE_ADDR address,
861f93
 		struct ui_file *stream, int recurse,
861f93
 		const struct value *val,
861f93
 		const struct value_print_options *options)
861f93
Index: gdb-7.6.1/gdb/language.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/language.c	2013-08-30 21:54:18.749367543 +0200
861f93
+++ gdb-7.6.1/gdb/language.c	2013-08-30 21:54:20.466368194 +0200
861f93
@@ -720,7 +720,7 @@ unk_lang_printchar (int c, struct type *
861f93
 
861f93
 static void
861f93
 unk_lang_printstr (struct ui_file *stream, struct type *type,
861f93
-		   const gdb_byte *string, unsigned int length,
861f93
+		   const gdb_byte *string, ULONGEST length,
861f93
 		   const char *encoding, int force_ellipses,
861f93
 		   const struct value_print_options *options)
861f93
 {
861f93
@@ -739,7 +739,7 @@ unk_lang_print_type (struct type *type,
861f93
 
861f93
 static void
861f93
 unk_lang_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-		    int embedded_offset, CORE_ADDR address,
861f93
+		    LONGEST embedded_offset, CORE_ADDR address,
861f93
 		    struct ui_file *stream, int recurse,
861f93
 		    const struct value *val,
861f93
 		    const struct value_print_options *options)
861f93
Index: gdb-7.6.1/gdb/language.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/language.h	2013-08-30 21:54:18.750367543 +0200
861f93
+++ gdb-7.6.1/gdb/language.h	2013-08-30 21:54:20.466368194 +0200
861f93
@@ -175,7 +175,7 @@ struct language_defn
861f93
 			  struct ui_file * stream);
861f93
 
861f93
     void (*la_printstr) (struct ui_file * stream, struct type *elttype,
861f93
-			 const gdb_byte *string, unsigned int length,
861f93
+			 const gdb_byte *string, ULONGEST length,
861f93
 			 const char *encoding, int force_ellipses,
861f93
 			 const struct value_print_options *);
861f93
 
861f93
@@ -217,7 +217,7 @@ struct language_defn
861f93
 
861f93
     void (*la_val_print) (struct type *type,
861f93
 			  const gdb_byte *contents,
861f93
-			  int embedded_offset, CORE_ADDR address,
861f93
+			  LONGEST embedded_offset, CORE_ADDR address,
861f93
 			  struct ui_file *stream, int recurse,
861f93
 			  const struct value *val,
861f93
 			  const struct value_print_options *options);
861f93
Index: gdb-7.6.1/gdb/m2-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/m2-lang.c	2013-08-30 21:54:18.750367543 +0200
861f93
+++ gdb-7.6.1/gdb/m2-lang.c	2013-08-30 21:54:20.466368194 +0200
861f93
@@ -103,10 +103,10 @@ m2_printchar (int c, struct type *type,
861f93
 
861f93
 static void
861f93
 m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
861f93
-	     unsigned int length, const char *encoding, int force_ellipses,
861f93
+	     ULONGEST length, const char *encoding, int force_ellipses,
861f93
 	     const struct value_print_options *options)
861f93
 {
861f93
-  unsigned int i;
861f93
+  ULONGEST i;
861f93
   unsigned int things_printed = 0;
861f93
   int in_quotes = 0;
861f93
   int need_comma = 0;
861f93
@@ -121,9 +121,9 @@ m2_printstr (struct ui_file *stream, str
861f93
     {
861f93
       /* Position of the character we are examining
861f93
          to see whether it is repeated.  */
861f93
-      unsigned int rep1;
861f93
+      ULONGEST rep1;
861f93
       /* Number of repetitions we have detected so far.  */
861f93
-      unsigned int reps;
861f93
+      ULONGEST reps;
861f93
 
861f93
       QUIT;
861f93
 
861f93
@@ -149,7 +149,7 @@ m2_printstr (struct ui_file *stream, str
861f93
 	      in_quotes = 0;
861f93
 	    }
861f93
 	  m2_printchar (string[i], type, stream);
861f93
-	  fprintf_filtered (stream, " <repeats %u times>", reps);
861f93
+	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
861f93
 	  i = rep1 - 1;
861f93
 	  things_printed += options->repeat_count_threshold;
861f93
 	  need_comma = 1;
861f93
Index: gdb-7.6.1/gdb/m2-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/m2-lang.h	2013-08-30 21:54:18.750367543 +0200
861f93
+++ gdb-7.6.1/gdb/m2-lang.h	2013-08-30 21:54:20.466368194 +0200
861f93
@@ -33,7 +33,7 @@ extern void m2_print_typedef (struct typ
861f93
 extern int m2_is_long_set (struct type *type);
861f93
 extern int m2_is_unbounded_array (struct type *type);
861f93
 
861f93
-extern void m2_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
861f93
+extern void m2_val_print (struct type *, const gdb_byte *, LONGEST, CORE_ADDR,
861f93
 			  struct ui_file *, int,
861f93
 			  const struct value *,
861f93
 			  const struct value_print_options *);
861f93
Index: gdb-7.6.1/gdb/m2-typeprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/m2-typeprint.c	2013-08-30 21:54:18.750367543 +0200
861f93
+++ gdb-7.6.1/gdb/m2-typeprint.c	2013-08-30 21:54:20.466368194 +0200
861f93
@@ -233,9 +233,12 @@ static void m2_array (struct type *type,
861f93
 	  m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1);
861f93
 	}
861f93
       else
861f93
-	fprintf_filtered (stream, "%d",
861f93
-			  (TYPE_LENGTH (type)
861f93
-			   / TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
861f93
+        {
861f93
+	  ULONGEST val = (TYPE_LENGTH (type)
861f93
+			  / TYPE_LENGTH (TYPE_TARGET_TYPE (type)));
861f93
+
861f93
+	  fprintf_filtered (stream, "%s", pulongest (val));
861f93
+	}
861f93
     }
861f93
   fprintf_filtered (stream, "] OF ");
861f93
   m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags);
861f93
Index: gdb-7.6.1/gdb/m2-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/m2-valprint.c	2013-08-30 21:54:18.751367544 +0200
861f93
+++ gdb-7.6.1/gdb/m2-valprint.c	2013-08-30 21:54:20.467368194 +0200
861f93
@@ -35,7 +35,7 @@ static int print_unpacked_pointer (struc
861f93
 				   struct ui_file *stream);
861f93
 static void
861f93
 m2_print_array_contents (struct type *type, const gdb_byte *valaddr,
861f93
-			 int embedded_offset, CORE_ADDR address,
861f93
+			 LONGEST embedded_offset, CORE_ADDR address,
861f93
 			 struct ui_file *stream, int recurse,
861f93
 			 const struct value *val,
861f93
 			 const struct value_print_options *options,
861f93
@@ -67,7 +67,7 @@ get_long_set_bounds (struct type *type,
861f93
 
861f93
 static void
861f93
 m2_print_long_set (struct type *type, const gdb_byte *valaddr,
861f93
-		   int embedded_offset, CORE_ADDR address,
861f93
+		   LONGEST embedded_offset, CORE_ADDR address,
861f93
 		   struct ui_file *stream)
861f93
 {
861f93
   int empty_set        = 1;
861f93
@@ -158,7 +158,7 @@ m2_print_long_set (struct type *type, co
861f93
 
861f93
 static void
861f93
 m2_print_unbounded_array (struct type *type, const gdb_byte *valaddr,
861f93
-			  int embedded_offset, CORE_ADDR address,
861f93
+			  LONGEST embedded_offset, CORE_ADDR address,
861f93
 			  struct ui_file *stream, int recurse,
861f93
 			  const struct value_print_options *options)
861f93
 {
861f93
@@ -262,7 +262,7 @@ print_variable_at_address (struct type *
861f93
 
861f93
 static void
861f93
 m2_print_array_contents (struct type *type, const gdb_byte *valaddr,
861f93
-			 int embedded_offset, CORE_ADDR address,
861f93
+			 LONGEST embedded_offset, CORE_ADDR address,
861f93
 			 struct ui_file *stream, int recurse,
861f93
 			 const struct value *val,
861f93
 			 const struct value_print_options *options,
861f93
@@ -308,14 +308,15 @@ static const struct generic_val_print_de
861f93
    function; they are identical.  */
861f93
 
861f93
 void
861f93
-m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
861f93
-	      CORE_ADDR address, struct ui_file *stream, int recurse,
861f93
+m2_val_print (struct type *type, const gdb_byte *valaddr,
861f93
+	      LONGEST embedded_offset, CORE_ADDR address,
861f93
+	      struct ui_file *stream, int recurse,
861f93
 	      const struct value *original_value,
861f93
 	      const struct value_print_options *options)
861f93
 {
861f93
   struct gdbarch *gdbarch = get_type_arch (type);
861f93
-  unsigned int i = 0;	/* Number of characters printed.  */
861f93
-  unsigned len;
861f93
+  ULONGEST i = 0;	/* Number of characters printed.  */
861f93
+  ULONGEST len;
861f93
   struct type *elttype;
861f93
   CORE_ADDR addr;
861f93
 
861f93
@@ -340,7 +341,7 @@ m2_val_print (struct type *type, const g
861f93
 	         elements up to it.  */
861f93
 	      if (options->stop_print_at_null)
861f93
 		{
861f93
-		  unsigned int temp_len;
861f93
+		  ULONGEST temp_len;
861f93
 
861f93
 		  /* Look for a NULL char.  */
861f93
 		  for (temp_len = 0;
861f93
Index: gdb-7.6.1/gdb/memrange.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/memrange.c	2013-08-30 21:54:18.751367544 +0200
861f93
+++ gdb-7.6.1/gdb/memrange.c	2013-08-30 21:54:20.467368194 +0200
861f93
@@ -21,8 +21,8 @@
861f93
 #include "memrange.h"
861f93
 
861f93
 int
861f93
-mem_ranges_overlap (CORE_ADDR start1, int len1,
861f93
-		    CORE_ADDR start2, int len2)
861f93
+mem_ranges_overlap (CORE_ADDR start1, LONGEST len1,
861f93
+		    CORE_ADDR start2, LONGEST len2)
861f93
 {
861f93
   ULONGEST h, l;
861f93
 
861f93
Index: gdb-7.6.1/gdb/memrange.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/memrange.h	2013-08-30 21:54:18.751367544 +0200
861f93
+++ gdb-7.6.1/gdb/memrange.h	2013-08-30 21:54:20.467368194 +0200
861f93
@@ -30,7 +30,7 @@ struct mem_range
861f93
   CORE_ADDR start;
861f93
 
861f93
   /* Length of the range.  */
861f93
-  int length;
861f93
+  LONGEST length;
861f93
 };
861f93
 
861f93
 typedef struct mem_range mem_range_s;
861f93
@@ -40,8 +40,8 @@ DEF_VEC_O(mem_range_s);
861f93
 /* Returns true if the ranges defined by [start1, start1+len1) and
861f93
    [start2, start2+len2) overlap.  */
861f93
 
861f93
-extern int mem_ranges_overlap (CORE_ADDR start1, int len1,
861f93
-			       CORE_ADDR start2, int len2);
861f93
+extern int mem_ranges_overlap (CORE_ADDR start1, LONGEST len1,
861f93
+			       CORE_ADDR start2, LONGEST len2);
861f93
 
861f93
 /* Sort ranges by start address, then coalesce contiguous or
861f93
    overlapping ranges.  */
861f93
Index: gdb-7.6.1/gdb/mips-linux-nat.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/mips-linux-nat.c	2013-08-30 21:54:18.751367544 +0200
861f93
+++ gdb-7.6.1/gdb/mips-linux-nat.c	2013-08-30 21:54:20.467368194 +0200
861f93
@@ -938,7 +938,7 @@ try_one_watch (struct pt_watch_regs *reg
861f93
    the specified region can be covered by the watch registers.  */
861f93
 
861f93
 static int
861f93
-mips_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+mips_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   struct pt_watch_regs dummy_regs;
861f93
   int i;
861f93
Index: gdb-7.6.1/gdb/opencl-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/opencl-lang.c	2013-08-30 21:54:18.752367544 +0200
861f93
+++ gdb-7.6.1/gdb/opencl-lang.c	2013-08-30 21:54:20.468368195 +0200
861f93
@@ -80,11 +80,11 @@ builtin_opencl_type (struct gdbarch *gdb
861f93
 
861f93
 static struct type *
861f93
 lookup_opencl_vector_type (struct gdbarch *gdbarch, enum type_code code,
861f93
-			   unsigned int el_length, unsigned int flag_unsigned,
861f93
+			   ULONGEST el_length, unsigned int flag_unsigned,
861f93
 			   int n)
861f93
 {
861f93
   int i;
861f93
-  unsigned int length;
861f93
+  ULONGEST length;
861f93
   struct type *type = NULL;
861f93
   struct type **types = builtin_opencl_type (gdbarch);
861f93
 
861f93
@@ -174,9 +174,9 @@ lval_func_read (struct value *v)
861f93
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
861f93
   struct type *type = check_typedef (value_type (v));
861f93
   struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val)));
861f93
-  int offset = value_offset (v);
861f93
-  int elsize = TYPE_LENGTH (eltype);
861f93
-  int n, i, j = 0;
861f93
+  LONGEST offset = value_offset (v);
861f93
+  LONGEST elsize = TYPE_LENGTH (eltype);
861f93
+  LONGEST n, i, j = 0;
861f93
   LONGEST lowb = 0;
861f93
   LONGEST highb = 0;
861f93
 
861f93
@@ -203,9 +203,9 @@ lval_func_write (struct value *v, struct
861f93
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
861f93
   struct type *type = check_typedef (value_type (v));
861f93
   struct type *eltype = TYPE_TARGET_TYPE (check_typedef (value_type (c->val)));
861f93
-  int offset = value_offset (v);
861f93
-  int elsize = TYPE_LENGTH (eltype);
861f93
-  int n, i, j = 0;
861f93
+  LONGEST offset = value_offset (v);
861f93
+  LONGEST elsize = TYPE_LENGTH (eltype);
861f93
+  LONGEST n, i, j = 0;
861f93
   LONGEST lowb = 0;
861f93
   LONGEST highb = 0;
861f93
 
861f93
@@ -243,17 +243,18 @@ lval_func_write (struct value *v, struct
861f93
 /* Return nonzero if all bits in V within OFFSET and LENGTH are valid.  */
861f93
 
861f93
 static int
861f93
-lval_func_check_validity (const struct value *v, int offset, int length)
861f93
+lval_func_check_validity (const struct value *v, LONGEST offset,
861f93
+			  LONGEST length)
861f93
 {
861f93
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
861f93
+  struct type *t = check_typedef (value_type (c->val));
861f93
   /* Size of the target type in bits.  */
861f93
-  int elsize =
861f93
-      TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
861f93
-  int startrest = offset % elsize;
861f93
-  int start = offset / elsize;
861f93
-  int endrest = (offset + length) % elsize;
861f93
-  int end = (offset + length) / elsize;
861f93
-  int i;
861f93
+  LONGEST elsize = TYPE_LENGTH (TYPE_TARGET_TYPE (t)) * 8;
861f93
+  LONGEST startrest = offset % elsize;
861f93
+  LONGEST start = offset / elsize;
861f93
+  LONGEST endrest = (offset + length) % elsize;
861f93
+  LONGEST end = (offset + length) / elsize;
861f93
+  LONGEST i;
861f93
 
861f93
   if (endrest)
861f93
     end++;
861f93
@@ -263,8 +264,8 @@ lval_func_check_validity (const struct v
861f93
 
861f93
   for (i = start; i < end; i++)
861f93
     {
861f93
-      int comp_offset = (i == start) ? startrest : 0;
861f93
-      int comp_length = (i == end) ? endrest : elsize;
861f93
+      LONGEST comp_offset = (i == start) ? startrest : 0;
861f93
+      LONGEST comp_length = (i == end) ? endrest : elsize;
861f93
 
861f93
       if (!value_bits_valid (c->val, c->indices[i] * elsize + comp_offset,
861f93
 			     comp_length))
861f93
@@ -281,8 +282,8 @@ lval_func_check_any_valid (const struct
861f93
 {
861f93
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
861f93
   /* Size of the target type in bits.  */
861f93
-  int elsize =
861f93
-      TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
861f93
+  LONGEST elsize =
861f93
+	   TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
861f93
   int i;
861f93
 
861f93
   for (i = 0; i < c->n; i++)
861f93
@@ -297,17 +298,17 @@ lval_func_check_any_valid (const struct
861f93
 
861f93
 static int
861f93
 lval_func_check_synthetic_pointer (const struct value *v,
861f93
-				   int offset, int length)
861f93
+				   LONGEST offset, LONGEST length)
861f93
 {
861f93
   struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
861f93
   /* Size of the target type in bits.  */
861f93
-  int elsize =
861f93
-      TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
861f93
-  int startrest = offset % elsize;
861f93
-  int start = offset / elsize;
861f93
-  int endrest = (offset + length) % elsize;
861f93
-  int end = (offset + length) / elsize;
861f93
-  int i;
861f93
+  LONGEST elsize =
861f93
+	   TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8;
861f93
+  LONGEST startrest = offset % elsize;
861f93
+  LONGEST start = offset / elsize;
861f93
+  LONGEST endrest = (offset + length) % elsize;
861f93
+  LONGEST end = (offset + length) / elsize;
861f93
+  LONGEST i;
861f93
 
861f93
   if (endrest)
861f93
     end++;
861f93
@@ -317,8 +318,8 @@ lval_func_check_synthetic_pointer (const
861f93
 
861f93
   for (i = start; i < end; i++)
861f93
     {
861f93
-      int comp_offset = (i == start) ? startrest : 0;
861f93
-      int comp_length = (i == end) ? endrest : elsize;
861f93
+      LONGEST comp_offset = (i == start) ? startrest : 0;
861f93
+      LONGEST comp_length = (i == end) ? endrest : elsize;
861f93
 
861f93
       if (!value_bits_synthetic_pointer (c->val,
861f93
 					 c->indices[i] * elsize + comp_offset,
861f93
Index: gdb-7.6.1/gdb/p-lang.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/p-lang.c	2013-08-30 21:54:18.752367544 +0200
861f93
+++ gdb-7.6.1/gdb/p-lang.c	2013-08-30 21:54:20.468368195 +0200
861f93
@@ -95,8 +95,8 @@ pascal_main_name (void)
861f93
    are not multiple of TARGET_CHAR_BIT then the results are wrong
861f93
    but this does not happen for Free Pascal nor for GPC.  */
861f93
 int
861f93
-is_pascal_string_type (struct type *type,int *length_pos,
861f93
-                       int *length_size, int *string_pos,
861f93
+is_pascal_string_type (struct type *type, LONGEST *length_pos,
861f93
+		       LONGEST *length_size, LONGEST *string_pos,
861f93
 		       struct type **char_type,
861f93
 		       const char **arrayname)
861f93
 {
861f93
@@ -216,12 +216,12 @@ pascal_printchar (int c, struct type *ty
861f93
 
861f93
 void
861f93
 pascal_printstr (struct ui_file *stream, struct type *type,
861f93
-		 const gdb_byte *string, unsigned int length,
861f93
+		 const gdb_byte *string, ULONGEST length,
861f93
 		 const char *encoding, int force_ellipses,
861f93
 		 const struct value_print_options *options)
861f93
 {
861f93
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
861f93
-  unsigned int i;
861f93
+  ULONGEST i;
861f93
   unsigned int things_printed = 0;
861f93
   int in_quotes = 0;
861f93
   int need_comma = 0;
861f93
@@ -249,9 +249,9 @@ pascal_printstr (struct ui_file *stream,
861f93
     {
861f93
       /* Position of the character we are examining
861f93
          to see whether it is repeated.  */
861f93
-      unsigned int rep1;
861f93
+      ULONGEST rep1;
861f93
       /* Number of repetitions we have detected so far.  */
861f93
-      unsigned int reps;
861f93
+      ULONGEST reps;
861f93
       unsigned long int current_char;
861f93
 
861f93
       QUIT;
861f93
@@ -283,7 +283,7 @@ pascal_printstr (struct ui_file *stream,
861f93
 	      in_quotes = 0;
861f93
 	    }
861f93
 	  pascal_printchar (current_char, type, stream);
861f93
-	  fprintf_filtered (stream, " <repeats %u times>", reps);
861f93
+	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
861f93
 	  i = rep1 - 1;
861f93
 	  things_printed += options->repeat_count_threshold;
861f93
 	  need_comma = 1;
861f93
Index: gdb-7.6.1/gdb/p-lang.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/p-lang.h	2013-08-30 21:54:18.752367544 +0200
861f93
+++ gdb-7.6.1/gdb/p-lang.h	2013-08-30 21:54:20.468368195 +0200
861f93
@@ -35,7 +35,7 @@ extern void pascal_print_type (struct ty
861f93
 extern void pascal_print_typedef (struct type *, struct symbol *,
861f93
 				  struct ui_file *);
861f93
 
861f93
-extern void pascal_val_print (struct type *, const gdb_byte *, int,
861f93
+extern void pascal_val_print (struct type *, const gdb_byte *, LONGEST,
861f93
 			      CORE_ADDR, struct ui_file *, int,
861f93
 			      const struct value *,
861f93
 			      const struct value_print_options *);
861f93
@@ -49,13 +49,13 @@ extern void pascal_type_print_method_arg
861f93
 /* These are in p-lang.c: */
861f93
 
861f93
 extern int
861f93
-  is_pascal_string_type (struct type *, int *, int *, int *,
861f93
+  is_pascal_string_type (struct type *, LONGEST *, LONGEST *, LONGEST *,
861f93
 			 struct type **, const char **);
861f93
 
861f93
 extern void pascal_printchar (int, struct type *, struct ui_file *);
861f93
 
861f93
 extern void pascal_printstr (struct ui_file *, struct type *, const gdb_byte *,
861f93
-			     unsigned int, const char *, int,
861f93
+			     ULONGEST, const char *, int,
861f93
 			     const struct value_print_options *);
861f93
 
861f93
 extern struct type **const (pascal_builtin_types[]);
861f93
@@ -71,7 +71,7 @@ extern void
861f93
 				    const struct type_print_options *);
861f93
 
861f93
 extern void pascal_object_print_value_fields (struct type *, const gdb_byte *,
861f93
-					      int,
861f93
+					      LONGEST,
861f93
 					      CORE_ADDR, struct ui_file *,
861f93
 					      int,
861f93
 					      const struct value *,
861f93
Index: gdb-7.6.1/gdb/p-valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/p-valprint.c	2013-08-30 21:54:18.753367544 +0200
861f93
+++ gdb-7.6.1/gdb/p-valprint.c	2013-08-30 21:54:20.468368195 +0200
861f93
@@ -58,7 +58,7 @@ static const struct generic_val_print_de
861f93
 
861f93
 void
861f93
 pascal_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-		  int embedded_offset, CORE_ADDR address,
861f93
+		  LONGEST embedded_offset, CORE_ADDR address,
861f93
 		  struct ui_file *stream, int recurse,
861f93
 		  const struct value *original_value,
861f93
 		  const struct value_print_options *options)
861f93
@@ -69,8 +69,8 @@ pascal_val_print (struct type *type, con
861f93
   unsigned len;
861f93
   LONGEST low_bound, high_bound;
861f93
   struct type *elttype;
861f93
-  unsigned eltlen;
861f93
-  int length_pos, length_size, string_pos;
861f93
+  ULONGEST eltlen;
861f93
+  LONGEST length_pos, length_size, string_pos;
861f93
   struct type *char_type;
861f93
   CORE_ADDR addr;
861f93
   int want_space = 0;
861f93
@@ -493,7 +493,7 @@ static void pascal_object_print_static_f
861f93
 					      const struct value_print_options *);
861f93
 
861f93
 static void pascal_object_print_value (struct type *, const gdb_byte *,
861f93
-				       int,
861f93
+				       LONGEST,
861f93
 				       CORE_ADDR, struct ui_file *, int,
861f93
 				       const struct value *,
861f93
 				       const struct value_print_options *,
861f93
@@ -552,7 +552,7 @@ pascal_object_is_vtbl_member (struct typ
861f93
 
861f93
 void
861f93
 pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
861f93
-				  int offset,
861f93
+				  LONGEST offset,
861f93
 				  CORE_ADDR address, struct ui_file *stream,
861f93
 				  int recurse,
861f93
 				  const struct value *val,
861f93
@@ -728,7 +728,7 @@ pascal_object_print_value_fields (struct
861f93
 
861f93
 static void
861f93
 pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
861f93
-			   int offset,
861f93
+			   LONGEST offset,
861f93
 			   CORE_ADDR address, struct ui_file *stream,
861f93
 			   int recurse,
861f93
 			   const struct value *val,
861f93
@@ -751,11 +751,11 @@ pascal_object_print_value (struct type *
861f93
 
861f93
   for (i = 0; i < n_baseclasses; i++)
861f93
     {
861f93
-      int boffset = 0;
861f93
+      LONGEST boffset = 0;
861f93
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
861f93
       const char *basename = type_name_no_tag (baseclass);
861f93
       const gdb_byte *base_valaddr = NULL;
861f93
-      int thisoffset;
861f93
+      LONGEST thisoffset;
861f93
       volatile struct gdb_exception ex;
861f93
       int skip = 0;
861f93
 
861f93
Index: gdb-7.6.1/gdb/ppc-linux-nat.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/ppc-linux-nat.c	2013-08-30 21:54:18.753367544 +0200
861f93
+++ gdb-7.6.1/gdb/ppc-linux-nat.c	2013-08-30 21:54:20.469368195 +0200
861f93
@@ -1492,7 +1492,7 @@ ppc_linux_can_use_hw_breakpoint (int typ
861f93
 }
861f93
 
861f93
 static int
861f93
-ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   /* Handle sub-8-byte quantities.  */
861f93
   if (len <= 0)
861f93
Index: gdb-7.6.1/gdb/printcmd.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/printcmd.c	2013-08-30 21:54:18.754367545 +0200
861f93
+++ gdb-7.6.1/gdb/printcmd.c	2013-08-30 21:54:20.469368195 +0200
861f93
@@ -290,7 +290,7 @@ print_formatted (struct value *val, int
861f93
 		 struct ui_file *stream)
861f93
 {
861f93
   struct type *type = check_typedef (value_type (val));
861f93
-  int len = TYPE_LENGTH (type);
861f93
+  LONGEST len = TYPE_LENGTH (type);
861f93
 
861f93
   if (VALUE_LVAL (val) == lval_memory)
861f93
     next_address = value_address (val) + len;
861f93
@@ -368,7 +368,7 @@ print_scalar_formatted (const void *vala
861f93
 {
861f93
   struct gdbarch *gdbarch = get_type_arch (type);
861f93
   LONGEST val_long = 0;
861f93
-  unsigned int len = TYPE_LENGTH (type);
861f93
+  ULONGEST len = TYPE_LENGTH (type);
861f93
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
861f93
 
861f93
   /* String printing should go through val_print_scalar_formatted.  */
861f93
Index: gdb-7.6.1/gdb/procfs.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/procfs.c	2013-08-30 21:54:18.755367545 +0200
861f93
+++ gdb-7.6.1/gdb/procfs.c	2013-08-30 21:54:20.470368196 +0200
861f93
@@ -4926,7 +4926,7 @@ procfs_remove_watchpoint (CORE_ADDR addr
861f93
 }
861f93
 
861f93
 static int
861f93
-procfs_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+procfs_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   /* The man page for proc(4) on Solaris 2.6 and up says that the
861f93
      system can support "thousands" of hardware watchpoints, but gives
861f93
Index: gdb-7.6.1/gdb/python/py-prettyprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/python/py-prettyprint.c	2013-08-30 21:54:18.755367545 +0200
861f93
+++ gdb-7.6.1/gdb/python/py-prettyprint.c	2013-08-30 21:54:20.470368196 +0200
861f93
@@ -689,7 +689,7 @@ print_children (PyObject *printer, const
861f93
 
861f93
 int
861f93
 apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
861f93
-			  int embedded_offset, CORE_ADDR address,
861f93
+			  LONGEST embedded_offset, CORE_ADDR address,
861f93
 			  struct ui_file *stream, int recurse,
861f93
 			  const struct value *val,
861f93
 			  const struct value_print_options *options,
861f93
@@ -837,7 +837,7 @@ gdbpy_default_visualizer (PyObject *self
861f93
 
861f93
 int
861f93
 apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
861f93
-			  int embedded_offset, CORE_ADDR address,
861f93
+			  LONGEST embedded_offset, CORE_ADDR address,
861f93
 			  struct ui_file *stream, int recurse,
861f93
 			  const struct value *val,
861f93
 			  const struct value_print_options *options,
861f93
Index: gdb-7.6.1/gdb/python/python.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/python/python.h	2013-08-30 21:54:18.755367545 +0200
861f93
+++ gdb-7.6.1/gdb/python/python.h	2013-08-30 21:54:20.470368196 +0200
861f93
@@ -37,7 +37,7 @@ void source_python_script (FILE *file, c
861f93
 void run_python_script (int argc, char **argv);
861f93
 
861f93
 int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
861f93
-			      int embedded_offset, CORE_ADDR address,
861f93
+			      LONGEST embedded_offset, CORE_ADDR address,
861f93
 			      struct ui_file *stream, int recurse,
861f93
 			      const struct value *val,
861f93
 			      const struct value_print_options *options,
861f93
Index: gdb-7.6.1/gdb/regcache.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/regcache.c	2013-08-30 21:54:18.756367545 +0200
861f93
+++ gdb-7.6.1/gdb/regcache.c	2013-08-30 21:54:20.471368196 +0200
861f93
@@ -899,7 +899,7 @@ typedef void (regcache_write_ftype) (str
861f93
 
861f93
 static enum register_status
861f93
 regcache_xfer_part (struct regcache *regcache, int regnum,
861f93
-		    int offset, int len, void *in, const void *out,
861f93
+		    LONGEST offset, LONGEST len, void *in, const void *out,
861f93
 		    enum register_status (*read) (struct regcache *regcache,
861f93
 						  int regnum,
861f93
 						  gdb_byte *buf),
861f93
@@ -943,7 +943,7 @@ regcache_xfer_part (struct regcache *reg
861f93
 
861f93
 enum register_status
861f93
 regcache_raw_read_part (struct regcache *regcache, int regnum,
861f93
-			int offset, int len, gdb_byte *buf)
861f93
+			int offset, LONGEST len, gdb_byte *buf)
861f93
 {
861f93
   struct regcache_descr *descr = regcache->descr;
861f93
 
861f93
@@ -954,7 +954,7 @@ regcache_raw_read_part (struct regcache
861f93
 
861f93
 void
861f93
 regcache_raw_write_part (struct regcache *regcache, int regnum,
861f93
-			 int offset, int len, const gdb_byte *buf)
861f93
+			 int offset, LONGEST len, const gdb_byte *buf)
861f93
 {
861f93
   struct regcache_descr *descr = regcache->descr;
861f93
 
861f93
@@ -965,7 +965,7 @@ regcache_raw_write_part (struct regcache
861f93
 
861f93
 enum register_status
861f93
 regcache_cooked_read_part (struct regcache *regcache, int regnum,
861f93
-			   int offset, int len, gdb_byte *buf)
861f93
+			   LONGEST offset, LONGEST len, gdb_byte *buf)
861f93
 {
861f93
   struct regcache_descr *descr = regcache->descr;
861f93
 
861f93
@@ -976,7 +976,7 @@ regcache_cooked_read_part (struct regcac
861f93
 
861f93
 void
861f93
 regcache_cooked_write_part (struct regcache *regcache, int regnum,
861f93
-			    int offset, int len, const gdb_byte *buf)
861f93
+			    LONGEST offset, LONGEST len, const gdb_byte *buf)
861f93
 {
861f93
   struct regcache_descr *descr = regcache->descr;
861f93
 
861f93
Index: gdb-7.6.1/gdb/regcache.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/regcache.h	2013-08-30 21:54:18.756367545 +0200
861f93
+++ gdb-7.6.1/gdb/regcache.h	2013-08-30 21:54:20.471368196 +0200
861f93
@@ -89,9 +89,9 @@ extern void regcache_raw_write_unsigned
861f93
 
861f93
 extern enum register_status
861f93
   regcache_raw_read_part (struct regcache *regcache, int regnum,
861f93
-			  int offset, int len, gdb_byte *buf);
861f93
+			  int offset, LONGEST len, gdb_byte *buf);
861f93
 void regcache_raw_write_part (struct regcache *regcache, int regnum,
861f93
-			      int offset, int len, const gdb_byte *buf);
861f93
+			      int offset, LONGEST len, const gdb_byte *buf);
861f93
 
861f93
 void regcache_invalidate (struct regcache *regcache, int regnum);
861f93
 
861f93
@@ -128,10 +128,11 @@ extern void regcache_cooked_write_unsign
861f93
    write style operations.  */
861f93
 
861f93
 enum register_status regcache_cooked_read_part (struct regcache *regcache,
861f93
-						int regnum, int offset,
861f93
-						int len, gdb_byte *buf);
861f93
+						int regnum, LONGEST offset,
861f93
+						LONGEST len, gdb_byte *buf);
861f93
 void regcache_cooked_write_part (struct regcache *regcache, int regnum,
861f93
-				 int offset, int len, const gdb_byte *buf);
861f93
+				 LONGEST offset, LONGEST len,
861f93
+				 const gdb_byte *buf);
861f93
 
861f93
 /* Special routines to read/write the PC.  */
861f93
 
861f93
Index: gdb-7.6.1/gdb/remote.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/remote.c	2013-08-30 21:54:18.758367546 +0200
861f93
+++ gdb-7.6.1/gdb/remote.c	2013-08-30 21:54:20.472368196 +0200
861f93
@@ -8272,7 +8272,7 @@ int remote_hw_watchpoint_length_limit =
861f93
 int remote_hw_breakpoint_limit = -1;
861f93
 
861f93
 static int
861f93
-remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+remote_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   if (remote_hw_watchpoint_length_limit == 0)
861f93
     return 0;
861f93
Index: gdb-7.6.1/gdb/s390-nat.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/s390-nat.c	2013-08-30 21:54:18.759367547 +0200
861f93
+++ gdb-7.6.1/gdb/s390-nat.c	2013-08-30 21:54:20.473368197 +0200
861f93
@@ -571,7 +571,7 @@ s390_can_use_hw_breakpoint (int type, in
861f93
 }
861f93
 
861f93
 static int
861f93
-s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
861f93
+s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST cnt)
861f93
 {
861f93
   return 1;
861f93
 }
861f93
Index: gdb-7.6.1/gdb/spu-multiarch.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/spu-multiarch.c	2013-08-30 21:54:18.759367547 +0200
861f93
+++ gdb-7.6.1/gdb/spu-multiarch.c	2013-08-30 21:54:20.473368197 +0200
861f93
@@ -118,7 +118,7 @@ spu_thread_architecture (struct target_o
861f93
 
861f93
 /* Override the to_region_ok_for_hw_watchpoint routine.  */
861f93
 static int
861f93
-spu_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+spu_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   struct target_ops *ops_beneath = find_target_beneath (&spu_ops);
861f93
   while (ops_beneath && !ops_beneath->to_region_ok_for_hw_watchpoint)
861f93
Index: gdb-7.6.1/gdb/stack.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/stack.c	2013-08-30 21:54:18.759367547 +0200
861f93
+++ gdb-7.6.1/gdb/stack.c	2013-08-30 21:54:20.473368197 +0200
861f93
@@ -174,7 +174,7 @@ print_stack_frame (struct frame_info *fr
861f93
    argument (not just the first nameless argument).  */
861f93
 
861f93
 static void
861f93
-print_frame_nameless_args (struct frame_info *frame, long start, int num,
861f93
+print_frame_nameless_args (struct frame_info *frame, LONGEST start, int num,
861f93
 			   int first, struct ui_file *stream)
861f93
 {
861f93
   struct gdbarch *gdbarch = get_frame_arch (frame);
861f93
@@ -519,7 +519,7 @@ print_frame_args (struct symbol *func, s
861f93
   /* Offset of next stack argument beyond the one we have seen that is
861f93
      at the highest offset, or -1 if we haven't come to a stack
861f93
      argument yet.  */
861f93
-  long highest_offset = -1;
861f93
+  LONGEST highest_offset = -1;
861f93
   /* Number of ints of arguments that we have printed so far.  */
861f93
   int args_printed = 0;
861f93
   struct cleanup *old_chain;
861f93
@@ -557,8 +557,8 @@ print_frame_args (struct symbol *func, s
861f93
 	    case LOC_ARG:
861f93
 	    case LOC_REF_ARG:
861f93
 	      {
861f93
-		long current_offset = SYMBOL_VALUE (sym);
861f93
-		int arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
861f93
+		LONGEST current_offset = SYMBOL_VALUE (sym);
861f93
+		LONGEST arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
861f93
 
861f93
 		/* Compute address of next argument by adding the size of
861f93
 		   this argument and rounding to an int boundary.  */
861f93
@@ -693,7 +693,7 @@ print_frame_args (struct symbol *func, s
861f93
      enough about the stack to find them.  */
861f93
   if (num != -1)
861f93
     {
861f93
-      long start;
861f93
+      LONGEST start;
861f93
 
861f93
       if (highest_offset == -1)
861f93
 	start = gdbarch_frame_args_skip (get_frame_arch (frame));
861f93
Index: gdb-7.6.1/gdb/symmisc.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/symmisc.c	2013-08-30 21:54:18.760367547 +0200
861f93
+++ gdb-7.6.1/gdb/symmisc.c	2013-08-30 21:54:20.473368197 +0200
861f93
@@ -527,11 +527,11 @@ print_symbol (void *args)
861f93
 
861f93
 	case LOC_CONST_BYTES:
861f93
 	  {
861f93
-	    unsigned i;
861f93
+	    ULONGEST i;
861f93
 	    struct type *type = check_typedef (SYMBOL_TYPE (symbol));
861f93
 
861f93
-	    fprintf_filtered (outfile, "const %u hex bytes:",
861f93
-			      TYPE_LENGTH (type));
861f93
+	    fprintf_filtered (outfile, "const %s hex bytes:",
861f93
+			      pulongest (TYPE_LENGTH (type)));
861f93
 	    for (i = 0; i < TYPE_LENGTH (type); i++)
861f93
 	      fprintf_filtered (outfile, " %02x",
861f93
 				(unsigned) SYMBOL_VALUE_BYTES (symbol)[i]);
861f93
Index: gdb-7.6.1/gdb/target.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/target.c	2013-08-30 21:54:18.761367547 +0200
861f93
+++ gdb-7.6.1/gdb/target.c	2013-08-30 21:54:20.474368197 +0200
861f93
@@ -51,7 +51,7 @@ static void default_terminal_info (char
861f93
 static int default_watchpoint_addr_within_range (struct target_ops *,
861f93
 						 CORE_ADDR, CORE_ADDR, int);
861f93
 
861f93
-static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
861f93
+static int default_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
861f93
 
861f93
 static void tcomplain (void) ATTRIBUTE_NORETURN;
861f93
 
861f93
@@ -127,7 +127,7 @@ static int debug_to_stopped_data_address
861f93
 static int debug_to_watchpoint_addr_within_range (struct target_ops *,
861f93
 						  CORE_ADDR, CORE_ADDR, int);
861f93
 
861f93
-static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, int);
861f93
+static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, LONGEST);
861f93
 
861f93
 static int debug_to_can_accel_watchpoint_condition (CORE_ADDR, int, int,
861f93
 						    struct expression *);
861f93
@@ -3577,7 +3577,7 @@ target_fileio_read_stralloc (const char
861f93
 
861f93
 
861f93
 static int
861f93
-default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+default_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   return (len <= gdbarch_ptr_bit (target_gdbarch ()) / TARGET_CHAR_BIT);
861f93
 }
861f93
@@ -4600,7 +4600,7 @@ debug_to_can_use_hw_breakpoint (int type
861f93
 }
861f93
 
861f93
 static int
861f93
-debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
861f93
+debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, LONGEST len)
861f93
 {
861f93
   CORE_ADDR retval;
861f93
 
861f93
Index: gdb-7.6.1/gdb/target.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/target.h	2013-08-30 21:54:18.761367547 +0200
861f93
+++ gdb-7.6.1/gdb/target.h	2013-08-30 21:54:20.475368197 +0200
861f93
@@ -485,7 +485,7 @@ struct target_ops
861f93
 
861f93
     /* Documentation of this routine is provided with the corresponding
861f93
        target_* macro.  */
861f93
-    int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
861f93
+    int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, LONGEST);
861f93
 
861f93
     int (*to_can_accel_watchpoint_condition) (CORE_ADDR, int, int,
861f93
 					      struct expression *);
861f93
Index: gdb-7.6.1/gdb/tracepoint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/tracepoint.c	2013-08-30 21:54:18.763367548 +0200
861f93
+++ gdb-7.6.1/gdb/tracepoint.c	2013-08-30 21:54:20.475368197 +0200
861f93
@@ -959,13 +959,13 @@ add_register (struct collection_list *co
861f93
 static void
861f93
 add_memrange (struct collection_list *memranges, 
861f93
 	      int type, bfd_signed_vma base,
861f93
-	      unsigned long len)
861f93
+	      ULONGEST len)
861f93
 {
861f93
   if (info_verbose)
861f93
     {
861f93
       printf_filtered ("(%d,", type);
861f93
       printf_vma (base);
861f93
-      printf_filtered (",%ld)\n", len);
861f93
+      printf_filtered (",%s)\n", pulongest (len));
861f93
     }
861f93
 
861f93
   /* type: memrange_absolute == memory, other n == basereg */
861f93
@@ -994,7 +994,7 @@ collect_symbol (struct collection_list *
861f93
 		long frame_regno, long frame_offset,
861f93
 		CORE_ADDR scope)
861f93
 {
861f93
-  unsigned long len;
861f93
+  ULONGEST len;
861f93
   unsigned int reg;
861f93
   bfd_signed_vma offset;
861f93
   int treat_as_expr = 0;
861f93
@@ -1018,8 +1018,8 @@ collect_symbol (struct collection_list *
861f93
 	  char tmp[40];
861f93
 
861f93
 	  sprintf_vma (tmp, offset);
861f93
-	  printf_filtered ("LOC_STATIC %s: collect %ld bytes at %s.\n",
861f93
-			   SYMBOL_PRINT_NAME (sym), len,
861f93
+	  printf_filtered ("LOC_STATIC %s: collect %s bytes at %s.\n",
861f93
+			   SYMBOL_PRINT_NAME (sym), pulongest (len),
861f93
 			   tmp /* address */);
861f93
 	}
861f93
       /* A struct may be a C++ class with static fields, go to general
861f93
@@ -1051,8 +1051,8 @@ collect_symbol (struct collection_list *
861f93
       offset = frame_offset + SYMBOL_VALUE (sym);
861f93
       if (info_verbose)
861f93
 	{
861f93
-	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
861f93
-			   SYMBOL_PRINT_NAME (sym), len);
861f93
+	  printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset ",
861f93
+			   SYMBOL_PRINT_NAME (sym), pulongest (len));
861f93
 	  printf_vma (offset);
861f93
 	  printf_filtered (" from frame ptr reg %d\n", reg);
861f93
 	}
861f93
@@ -1063,8 +1063,8 @@ collect_symbol (struct collection_list *
861f93
       offset = 0;
861f93
       if (info_verbose)
861f93
 	{
861f93
-	  printf_filtered ("LOC_REGPARM_ADDR %s: Collect %ld bytes at offset ",
861f93
-			   SYMBOL_PRINT_NAME (sym), len);
861f93
+	  printf_filtered ("LOC_REGPARM_ADDR %s: Collect %s bytes at offset ",
861f93
+			   SYMBOL_PRINT_NAME (sym), pulongest (len));
861f93
 	  printf_vma (offset);
861f93
 	  printf_filtered (" from reg %d\n", reg);
861f93
 	}
861f93
@@ -1075,8 +1075,8 @@ collect_symbol (struct collection_list *
861f93
       offset = frame_offset + SYMBOL_VALUE (sym);
861f93
       if (info_verbose)
861f93
 	{
861f93
-	  printf_filtered ("LOC_LOCAL %s: Collect %ld bytes at offset ",
861f93
-			   SYMBOL_PRINT_NAME (sym), len);
861f93
+	  printf_filtered ("LOC_LOCAL %s: Collect %s bytes at offset ",
861f93
+			   SYMBOL_PRINT_NAME (sym), pulongest (len));
861f93
 	  printf_vma (offset);
861f93
 	  printf_filtered (" from frame ptr reg %d\n", reg);
861f93
 	}
861f93
@@ -2657,7 +2657,8 @@ scope_info (char *args, int from_tty)
861f93
   const char *symname;
861f93
   char *save_args = args;
861f93
   struct block_iterator iter;
861f93
-  int j, count = 0;
861f93
+  int count = 0;
861f93
+  LONGEST j;
861f93
   struct gdbarch *gdbarch;
861f93
   int regno;
861f93
 
861f93
@@ -2787,8 +2788,11 @@ scope_info (char *args, int from_tty)
861f93
 	      break;
861f93
 	    }
861f93
 	  if (SYMBOL_TYPE (sym))
861f93
-	    printf_filtered (", length %d.\n",
861f93
-			     TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
861f93
+	    {
861f93
+	      ULONGEST len = TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym)));
861f93
+
861f93
+	      printf_filtered (", length %s.\n", pulongest (len));
861f93
+	    }
861f93
 	}
861f93
       if (BLOCK_FUNCTION (block))
861f93
 	break;
861f93
Index: gdb-7.6.1/gdb/typeprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/typeprint.c	2013-08-30 21:54:18.763367548 +0200
861f93
+++ gdb-7.6.1/gdb/typeprint.c	2013-08-30 21:54:20.476368198 +0200
861f93
@@ -409,7 +409,7 @@ whatis_exp (char *exp, int show)
861f93
   struct type *real_type = NULL;
861f93
   struct type *type;
861f93
   int full = 0;
861f93
-  int top = -1;
861f93
+  LONGEST top = -1;
861f93
   int using_enc = 0;
861f93
   struct value_print_options opts;
861f93
   struct type_print_options flags = default_ptype_flags;
861f93
Index: gdb-7.6.1/gdb/valarith.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/valarith.c	2013-08-30 21:54:18.764367548 +0200
861f93
+++ gdb-7.6.1/gdb/valarith.c	2013-08-30 21:54:20.476368198 +0200
861f93
@@ -190,15 +190,15 @@ value_subscript (struct value *array, LO
861f93
    to doubles, but no longer does.  */
861f93
 
861f93
 struct value *
861f93
-value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
861f93
+value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound)
861f93
 {
861f93
   struct type *array_type = check_typedef (value_type (array));
861f93
   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
861f93
-  unsigned int elt_size = TYPE_LENGTH (elt_type);
861f93
-  unsigned int elt_stride
861f93
+  ULONGEST elt_size = TYPE_LENGTH (elt_type);
861f93
+  ULONGEST elt_stride
861f93
     = (TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)) == 0
861f93
        ? elt_size : TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type)));
861f93
-  unsigned int elt_offs = elt_stride * longest_to_int (index - lowerbound);
861f93
+  ULONGEST elt_offs = elt_stride * longest_to_int (index - lowerbound);
861f93
   struct value *v;
861f93
 
861f93
   if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
861f93
@@ -635,7 +635,7 @@ value_concat (struct value *arg1, struct
861f93
   struct value *inval1;
861f93
   struct value *inval2;
861f93
   struct value *outval = NULL;
861f93
-  int inval1len, inval2len;
861f93
+  ssize_t inval1len, inval2len;
861f93
   int count, idx;
861f93
   char *ptr;
861f93
   char inchar;
861f93
@@ -1488,7 +1488,7 @@ value_binop (struct value *arg1, struct
861f93
 int
861f93
 value_logical_not (struct value *arg1)
861f93
 {
861f93
-  int len;
861f93
+  LONGEST len;
861f93
   const gdb_byte *p;
861f93
   struct type *type1;
861f93
 
861f93
@@ -1519,11 +1519,11 @@ value_logical_not (struct value *arg1)
861f93
 static int
861f93
 value_strcmp (struct value *arg1, struct value *arg2)
861f93
 {
861f93
-  int len1 = TYPE_LENGTH (value_type (arg1));
861f93
-  int len2 = TYPE_LENGTH (value_type (arg2));
861f93
+  LONGEST len1 = TYPE_LENGTH (value_type (arg1));
861f93
+  LONGEST len2 = TYPE_LENGTH (value_type (arg2));
861f93
   const gdb_byte *s1 = value_contents (arg1);
861f93
   const gdb_byte *s2 = value_contents (arg2);
861f93
-  int i, len = len1 < len2 ? len1 : len2;
861f93
+  LONGEST i, len = len1 < len2 ? len1 : len2;
861f93
 
861f93
   for (i = 0; i < len; i++)
861f93
     {
861f93
Index: gdb-7.6.1/gdb/valops.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/valops.c	2013-08-30 21:54:18.766367549 +0200
861f93
+++ gdb-7.6.1/gdb/valops.c	2013-08-30 21:54:20.477368198 +0200
861f93
@@ -54,11 +54,11 @@ static int typecmp (int staticp, int var
861f93
 		    struct field t1[], struct value *t2[]);
861f93
 
861f93
 static struct value *search_struct_field (const char *, struct value *, 
861f93
-					  int, struct type *, int);
861f93
+					  LONGEST, struct type *, int);
861f93
 
861f93
 static struct value *search_struct_method (const char *, struct value **,
861f93
 					   struct value **,
861f93
-					   int, int *, struct type *);
861f93
+					   LONGEST, int *, struct type *);
861f93
 
861f93
 static int find_oload_champ_namespace (struct value **, int,
861f93
 				       const char *, const char *,
861f93
@@ -86,7 +86,7 @@ oload_classification classify_oload_matc
861f93
 					   int, int);
861f93
 
861f93
 static struct value *value_struct_elt_for_reference (struct type *,
861f93
-						     int, struct type *,
861f93
+						     LONGEST, struct type *,
861f93
 						     char *,
861f93
 						     struct type *,
861f93
 						     int, enum noside);
861f93
@@ -103,8 +103,8 @@ static CORE_ADDR allocate_space_in_infer
861f93
 static struct value *cast_into_complex (struct type *, struct value *);
861f93
 
861f93
 static struct fn_field *find_method_list (struct value **, const char *,
861f93
-					  int, struct type *, int *,
861f93
-					  struct type **, int *);
861f93
+					  LONGEST, struct type *, int *,
861f93
+					  struct type **, LONGEST *);
861f93
 
861f93
 void _initialize_valops (void);
861f93
 
861f93
@@ -189,7 +189,7 @@ find_function_in_inferior (const char *n
861f93
    space.  */
861f93
 
861f93
 struct value *
861f93
-value_allocate_space_in_inferior (int len)
861f93
+value_allocate_space_in_inferior (LONGEST len)
861f93
 {
861f93
   struct objfile *objf;
861f93
   struct value *val = find_function_in_inferior ("malloc", &objf);
861f93
@@ -262,7 +262,8 @@ value_cast_structs (struct type *type, s
861f93
   if (TYPE_NAME (t2) != NULL)
861f93
     {
861f93
       /* Try downcasting using the run-time type of the value.  */
861f93
-      int full, top, using_enc;
861f93
+      int full, using_enc;
861f93
+      LONGEST top;
861f93
       struct type *real_type;
861f93
 
861f93
       real_type = value_rtti_type (v2, &full, &top, &using_enc);
861f93
@@ -401,12 +402,12 @@ value_cast (struct type *type, struct va
861f93
   if (code1 == TYPE_CODE_ARRAY)
861f93
     {
861f93
       struct type *element_type = TYPE_TARGET_TYPE (type);
861f93
-      unsigned element_length = TYPE_LENGTH (check_typedef (element_type));
861f93
+      ULONGEST element_length = TYPE_LENGTH (check_typedef (element_type));
861f93
 
861f93
       if (element_length > 0 && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
861f93
 	{
861f93
 	  struct type *range_type = TYPE_INDEX_TYPE (type);
861f93
-	  int val_length = TYPE_LENGTH (type2);
861f93
+	  LONGEST val_length = TYPE_LENGTH (type2);
861f93
 	  LONGEST low_bound, high_bound, new_length;
861f93
 
861f93
 	  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
861f93
@@ -640,7 +641,7 @@ value_reinterpret_cast (struct type *typ
861f93
 static int
861f93
 dynamic_cast_check_1 (struct type *desired_type,
861f93
 		      const gdb_byte *valaddr,
861f93
-		      int embedded_offset,
861f93
+		      LONGEST embedded_offset,
861f93
 		      CORE_ADDR address,
861f93
 		      struct value *val,
861f93
 		      struct type *search_type,
861f93
@@ -652,8 +653,8 @@ dynamic_cast_check_1 (struct type *desir
861f93
 
861f93
   for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i)
861f93
     {
861f93
-      int offset = baseclass_offset (search_type, i, valaddr, embedded_offset,
861f93
-				     address, val);
861f93
+      LONGEST offset = baseclass_offset (search_type, i, valaddr,
861f93
+					 embedded_offset, address, val);
861f93
 
861f93
       if (class_types_same_p (desired_type, TYPE_BASECLASS (search_type, i)))
861f93
 	{
861f93
@@ -687,7 +688,7 @@ dynamic_cast_check_1 (struct type *desir
861f93
 static int
861f93
 dynamic_cast_check_2 (struct type *desired_type,
861f93
 		      const gdb_byte *valaddr,
861f93
-		      int embedded_offset,
861f93
+		      LONGEST embedded_offset,
861f93
 		      CORE_ADDR address,
861f93
 		      struct value *val,
861f93
 		      struct type *search_type,
861f93
@@ -697,7 +698,7 @@ dynamic_cast_check_2 (struct type *desir
861f93
 
861f93
   for (i = 0; i < TYPE_N_BASECLASSES (search_type) && result_count < 2; ++i)
861f93
     {
861f93
-      int offset;
861f93
+      LONGEST offset;
861f93
 
861f93
       if (! BASETYPE_VIA_PUBLIC (search_type, i))
861f93
 	continue;
861f93
@@ -728,7 +729,8 @@ dynamic_cast_check_2 (struct type *desir
861f93
 struct value *
861f93
 value_dynamic_cast (struct type *type, struct value *arg)
861f93
 {
861f93
-  int full, top, using_enc;
861f93
+  int full, using_enc;
861f93
+  LONGEST top;
861f93
   struct type *resolved_type = check_typedef (type);
861f93
   struct type *arg_type = check_typedef (value_type (arg));
861f93
   struct type *class_type, *rtti_type;
861f93
@@ -1181,7 +1183,7 @@ value_fetch_lazy (struct value *val)
861f93
 }
861f93
 
861f93
 void
861f93
-read_value_memory (struct value *val, int embedded_offset,
861f93
+read_value_memory (struct value *val, LONGEST embedded_offset,
861f93
 		   int stack, CORE_ADDR memaddr,
861f93
 		   gdb_byte *buffer, size_t length)
861f93
 {
861f93
@@ -1332,7 +1334,7 @@ value_assign (struct value *toval, struc
861f93
       {
861f93
 	const gdb_byte *dest_buffer;
861f93
 	CORE_ADDR changed_addr;
861f93
-	int changed_len;
861f93
+	LONGEST changed_len;
861f93
         gdb_byte buffer[sizeof (LONGEST)];
861f93
 
861f93
 	if (value_bitsize (toval))
861f93
@@ -1411,7 +1413,7 @@ value_assign (struct value *toval, struc
861f93
 	    if (value_bitsize (toval))
861f93
 	      {
861f93
 		struct value *parent = value_parent (toval);
861f93
-		int offset = value_offset (parent) + value_offset (toval);
861f93
+		LONGEST offset = value_offset (parent) + value_offset (toval);
861f93
 		int changed_len;
861f93
 		gdb_byte buffer[sizeof (LONGEST)];
861f93
 		int optim, unavail;
861f93
@@ -1891,7 +1893,7 @@ value_array (int lowbound, int highbound
861f93
 {
861f93
   int nelem;
861f93
   int idx;
861f93
-  unsigned int typelength;
861f93
+  ULONGEST typelength;
861f93
   struct value *val;
861f93
   struct type *arraytype;
861f93
 
861f93
@@ -2066,7 +2068,7 @@ typecmp (int staticp, int varargs, int n
861f93
 
861f93
 static void
861f93
 update_search_result (struct value **result_ptr, struct value *v,
861f93
-		      int *last_boffset, int boffset,
861f93
+		      LONGEST *last_boffset, LONGEST boffset,
861f93
 		      const char *name, struct type *type)
861f93
 {
861f93
   if (v != NULL)
861f93
@@ -2090,10 +2092,10 @@ update_search_result (struct value **res
861f93
    lookup is ambiguous.  */
861f93
 
861f93
 static void
861f93
-do_search_struct_field (const char *name, struct value *arg1, int offset,
861f93
+do_search_struct_field (const char *name, struct value *arg1, LONGEST offset,
861f93
 			struct type *type, int looking_for_baseclass,
861f93
 			struct value **result_ptr,
861f93
-			int *last_boffset,
861f93
+			LONGEST *last_boffset,
861f93
 			struct type *outermost_type)
861f93
 {
861f93
   int i;
861f93
@@ -2148,7 +2150,7 @@ do_search_struct_field (const char *name
861f93
 		   <variant field>.  */
861f93
 
861f93
 		struct value *v = NULL;
861f93
-		int new_offset = offset;
861f93
+		LONGEST new_offset = offset;
861f93
 
861f93
 		/* This is pretty gross.  In G++, the offset in an
861f93
 		   anonymous union is relative to the beginning of the
861f93
@@ -2187,7 +2189,7 @@ do_search_struct_field (const char *name
861f93
 			     && (strcmp_iw (name, 
861f93
 					    TYPE_BASECLASS_NAME (type, 
861f93
 								 i)) == 0));
861f93
-      int boffset = value_embedded_offset (arg1) + offset;
861f93
+      LONGEST boffset = value_embedded_offset (arg1) + offset;
861f93
 
861f93
       if (BASETYPE_VIA_VIRTUAL (type, i))
861f93
 	{
861f93
@@ -2262,11 +2264,11 @@ do_search_struct_field (const char *name
861f93
    fields, look for a baseclass named NAME.  */
861f93
 
861f93
 static struct value *
861f93
-search_struct_field (const char *name, struct value *arg1, int offset,
861f93
+search_struct_field (const char *name, struct value *arg1, LONGEST offset,
861f93
 		     struct type *type, int looking_for_baseclass)
861f93
 {
861f93
   struct value *result = NULL;
861f93
-  int boffset = 0;
861f93
+  LONGEST boffset = 0;
861f93
 
861f93
   do_search_struct_field (name, arg1, offset, type, looking_for_baseclass,
861f93
 			  &result, &boffset, type);
861f93
@@ -2283,7 +2285,7 @@ search_struct_field (const char *name, s
861f93
 
861f93
 static struct value *
861f93
 search_struct_method (const char *name, struct value **arg1p,
861f93
-		      struct value **args, int offset,
861f93
+		      struct value **args, LONGEST offset,
861f93
 		      int *static_memfuncp, struct type *type)
861f93
 {
861f93
   int i;
861f93
@@ -2347,8 +2349,8 @@ search_struct_method (const char *name,
861f93
 
861f93
   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
861f93
     {
861f93
-      int base_offset;
861f93
-      int this_offset;
861f93
+      LONGEST base_offset;
861f93
+      LONGEST this_offset;
861f93
 
861f93
       if (BASETYPE_VIA_VIRTUAL (type, i))
861f93
 	{
861f93
@@ -2530,8 +2532,8 @@ value_struct_elt (struct value **argp, s
861f93
 
861f93
 static struct fn_field *
861f93
 find_method_list (struct value **argp, const char *method,
861f93
-		  int offset, struct type *type, int *num_fns,
861f93
-		  struct type **basetype, int *boffset)
861f93
+		  LONGEST offset, struct type *type, int *num_fns,
861f93
+		  struct type **basetype, LONGEST *boffset)
861f93
 {
861f93
   int i;
861f93
   struct fn_field *f;
861f93
@@ -2564,7 +2566,7 @@ find_method_list (struct value **argp, c
861f93
   /* Not found in object, check in base subobjects.  */
861f93
   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
861f93
     {
861f93
-      int base_offset;
861f93
+      LONGEST base_offset;
861f93
 
861f93
       if (BASETYPE_VIA_VIRTUAL (type, i))
861f93
 	{
861f93
@@ -2600,7 +2602,7 @@ find_method_list (struct value **argp, c
861f93
 static struct fn_field *
861f93
 value_find_oload_method_list (struct value **argp, const char *method,
861f93
 			      int offset, int *num_fns, 
861f93
-			      struct type **basetype, int *boffset)
861f93
+			      struct type **basetype, LONGEST *boffset)
861f93
 {
861f93
   struct type *t;
861f93
 
861f93
@@ -2690,7 +2692,7 @@ find_overload_match (struct value **args
861f93
   /* Number of overloaded instances being considered.  */
861f93
   int num_fns = 0;
861f93
   struct type *basetype = NULL;
861f93
-  int boffset;
861f93
+  LONGEST boffset;
861f93
 
861f93
   struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL);
861f93
 
861f93
@@ -3360,7 +3362,7 @@ compare_parameters (struct type *t1, str
861f93
    the form "DOMAIN::NAME".  */
861f93
 
861f93
 static struct value *
861f93
-value_struct_elt_for_reference (struct type *domain, int offset,
861f93
+value_struct_elt_for_reference (struct type *domain, LONGEST offset,
861f93
 				struct type *curtype, char *name,
861f93
 				struct type *intype, 
861f93
 				int want_address,
861f93
@@ -3397,7 +3399,7 @@ value_struct_elt_for_reference (struct t
861f93
 	  if (want_address)
861f93
 	    return value_from_longest
861f93
 	      (lookup_memberptr_type (TYPE_FIELD_TYPE (t, i), domain),
861f93
-	       offset + (LONGEST) (TYPE_FIELD_BITPOS (t, i) >> 3));
861f93
+	       offset + (TYPE_FIELD_BITPOS (t, i) >> 3));
861f93
 	  else if (noside == EVAL_AVOID_SIDE_EFFECTS)
861f93
 	    return allocate_value (TYPE_FIELD_TYPE (t, i));
861f93
 	  else
861f93
@@ -3540,7 +3542,7 @@ value_struct_elt_for_reference (struct t
861f93
   for (i = TYPE_N_BASECLASSES (t) - 1; i >= 0; i--)
861f93
     {
861f93
       struct value *v;
861f93
-      int base_offset;
861f93
+      LONGEST base_offset;
861f93
 
861f93
       if (BASETYPE_VIA_VIRTUAL (t, i))
861f93
 	base_offset = 0;
861f93
@@ -3630,7 +3632,7 @@ value_maybe_namespace_elt (const struct
861f93
 
861f93
 struct type *
861f93
 value_rtti_indirect_type (struct value *v, int *full, 
861f93
-			  int *top, int *using_enc)
861f93
+			  LONGEST *top, int *using_enc)
861f93
 {
861f93
   struct value *target;
861f93
   struct type *type, *real_type, *target_type;
861f93
@@ -3680,12 +3682,12 @@ value_rtti_indirect_type (struct value *
861f93
 struct value *
861f93
 value_full_object (struct value *argp, 
861f93
 		   struct type *rtype, 
861f93
-		   int xfull, int xtop,
861f93
+		   int xfull, LONGEST xtop,
861f93
 		   int xusing_enc)
861f93
 {
861f93
   struct type *real_type;
861f93
   int full = 0;
861f93
-  int top = -1;
861f93
+  LONGEST top = -1;
861f93
   int using_enc = 0;
861f93
   struct value *new_val;
861f93
 
861f93
Index: gdb-7.6.1/gdb/valprint.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/valprint.c	2013-08-30 21:54:18.767367550 +0200
861f93
+++ gdb-7.6.1/gdb/valprint.c	2013-08-30 21:54:20.477368198 +0200
861f93
@@ -299,7 +299,7 @@ scalar_type_p (struct type *type)
861f93
 int
861f93
 valprint_check_validity (struct ui_file *stream,
861f93
 			 struct type *type,
861f93
-			 int embedded_offset,
861f93
+			 LONGEST embedded_offset,
861f93
 			 const struct value *val)
861f93
 {
861f93
   CHECK_TYPEDEF (type);
861f93
@@ -363,7 +363,7 @@ val_print_invalid_address (struct ui_fil
861f93
 
861f93
 void
861f93
 generic_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-		   int embedded_offset, CORE_ADDR address,
861f93
+		   LONGEST embedded_offset, CORE_ADDR address,
861f93
 		   struct ui_file *stream, int recurse,
861f93
 		   const struct value *original_value,
861f93
 		   const struct value_print_options *options,
861f93
@@ -725,7 +725,7 @@ generic_val_print (struct type *type, co
861f93
    RECURSE.  */
861f93
 
861f93
 void
861f93
-val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
861f93
+val_print (struct type *type, const gdb_byte *valaddr, LONGEST embedded_offset,
861f93
 	   CORE_ADDR address, struct ui_file *stream, int recurse,
861f93
 	   const struct value *val,
861f93
 	   const struct value_print_options *options,
861f93
@@ -937,7 +937,7 @@ val_print_type_code_flags (struct type *
861f93
 
861f93
 void
861f93
 val_print_scalar_formatted (struct type *type,
861f93
-			    const gdb_byte *valaddr, int embedded_offset,
861f93
+			    const gdb_byte *valaddr, LONGEST embedded_offset,
861f93
 			    const struct value *val,
861f93
 			    const struct value_print_options *options,
861f93
 			    int size,
861f93
@@ -1478,7 +1478,7 @@ print_decimal_chars (struct ui_file *str
861f93
 
861f93
 void
861f93
 print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr,
861f93
-		 unsigned len, enum bfd_endian byte_order)
861f93
+		 ULONGEST len, enum bfd_endian byte_order)
861f93
 {
861f93
   const gdb_byte *p;
861f93
 
861f93
@@ -1595,23 +1595,23 @@ maybe_print_array_index (struct type *in
861f93
 
861f93
 void
861f93
 val_print_array_elements (struct type *type,
861f93
-			  const gdb_byte *valaddr, int embedded_offset,
861f93
+			  const gdb_byte *valaddr, LONGEST embedded_offset,
861f93
 			  CORE_ADDR address, struct ui_file *stream,
861f93
 			  int recurse,
861f93
 			  const struct value *val,
861f93
 			  const struct value_print_options *options,
861f93
-			  unsigned int i)
861f93
+			  ULONGEST i)
861f93
 {
861f93
   unsigned int things_printed = 0;
861f93
-  unsigned len;
861f93
+  ULONGEST len;
861f93
   struct type *saved_type = type;
861f93
   struct type *elttype, *index_type;
861f93
-  unsigned eltlen;
861f93
+  ULONGEST eltlen;
861f93
   /* Position of the array element we are examining to see
861f93
      whether it is repeated.  */
861f93
-  unsigned int rep1;
861f93
+  ULONGEST rep1;
861f93
   /* Number of repetitions we have detected so far.  */
861f93
-  unsigned int reps;
861f93
+  ULONGEST reps;
861f93
   LONGEST low_bound, high_bound;
861f93
   struct cleanup *back_to;
861f93
   CORE_ADDR saved_address = address;
861f93
@@ -1706,7 +1706,7 @@ val_print_array_elements (struct type *t
861f93
 		     address, stream, recurse + 1, val, options,
861f93
 		     current_language);
861f93
 	  annotate_elt_rep (reps);
861f93
-	  fprintf_filtered (stream, " <repeats %u times>", reps);
861f93
+	  fprintf_filtered (stream, " <repeats %s times>", pulongest (reps));
861f93
 	  annotate_elt_rep_end ();
861f93
 
861f93
 	  i = rep1 - 1;
861f93
@@ -2357,7 +2357,7 @@ print_converted_chars_to_obstack (struct
861f93
 
861f93
 void
861f93
 generic_printstr (struct ui_file *stream, struct type *type, 
861f93
-		  const gdb_byte *string, unsigned int length, 
861f93
+		  const gdb_byte *string, ULONGEST length,
861f93
 		  const char *encoding, int force_ellipses,
861f93
 		  int quote_char, int c_style_terminator,
861f93
 		  const struct value_print_options *options)
861f93
Index: gdb-7.6.1/gdb/valprint.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/valprint.h	2013-08-30 21:54:18.768367550 +0200
861f93
+++ gdb-7.6.1/gdb/valprint.h	2013-08-30 21:54:20.477368198 +0200
861f93
@@ -113,11 +113,11 @@ extern void maybe_print_array_index (str
861f93
                                      struct ui_file *stream,
861f93
 				     const struct value_print_options *);
861f93
 
861f93
-extern void val_print_array_elements (struct type *, const gdb_byte *, int,
861f93
+extern void val_print_array_elements (struct type *, const gdb_byte *, LONGEST,
861f93
 				      CORE_ADDR, struct ui_file *, int,
861f93
 				      const struct value *,
861f93
 				      const struct value_print_options *,
861f93
-				      unsigned int);
861f93
+				      ULONGEST);
861f93
 
861f93
 extern void val_print_type_code_int (struct type *, const gdb_byte *,
861f93
 				     struct ui_file *);
861f93
@@ -127,7 +127,7 @@ extern void val_print_type_code_flags (s
861f93
 				       struct ui_file *stream);
861f93
 
861f93
 extern void val_print_scalar_formatted (struct type *,
861f93
-					const gdb_byte *, int,
861f93
+					const gdb_byte *, LONGEST,
861f93
 					const struct value *,
861f93
 					const struct value_print_options *,
861f93
 					int,
861f93
@@ -143,7 +143,7 @@ extern void print_decimal_chars (struct
861f93
 				 unsigned int, enum bfd_endian);
861f93
 
861f93
 extern void print_hex_chars (struct ui_file *, const gdb_byte *,
861f93
-			     unsigned int, enum bfd_endian);
861f93
+			     ULONGEST, enum bfd_endian);
861f93
 
861f93
 extern void print_char_chars (struct ui_file *, struct type *,
861f93
 			      const gdb_byte *, unsigned int, enum bfd_endian);
861f93
@@ -188,7 +188,7 @@ struct generic_val_print_decorations
861f93
 
861f93
 
861f93
 extern void generic_val_print (struct type *type, const gdb_byte *valaddr,
861f93
-			       int embedded_offset, CORE_ADDR address,
861f93
+			       LONGEST embedded_offset, CORE_ADDR address,
861f93
 			       struct ui_file *stream, int recurse,
861f93
 			       const struct value *original_value,
861f93
 			       const struct value_print_options *options,
861f93
@@ -198,7 +198,7 @@ extern void generic_emit_char (int c, st
861f93
 			       int quoter, const char *encoding);
861f93
 
861f93
 extern void generic_printstr (struct ui_file *stream, struct type *type, 
861f93
-			      const gdb_byte *string, unsigned int length, 
861f93
+			      const gdb_byte *string, ULONGEST length,
861f93
 			      const char *encoding, int force_ellipses,
861f93
 			      int quote_char, int c_style_terminator,
861f93
 			      const struct value_print_options *options);
861f93
Index: gdb-7.6.1/gdb/value.c
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/value.c	2013-08-30 21:54:18.770367551 +0200
861f93
+++ gdb-7.6.1/gdb/value.c	2013-08-30 21:54:20.478368199 +0200
861f93
@@ -68,10 +68,10 @@ struct internal_function
861f93
 struct range
861f93
 {
861f93
   /* Lowest offset in the range.  */
861f93
-  int offset;
861f93
+  LONGEST offset;
861f93
 
861f93
   /* Length of the range.  */
861f93
-  int length;
861f93
+  LONGEST length;
861f93
 };
861f93
 
861f93
 typedef struct range range_s;
861f93
@@ -82,8 +82,8 @@ DEF_VEC_O(range_s);
861f93
    [offset2, offset2+len2) overlap.  */
861f93
 
861f93
 static int
861f93
-ranges_overlap (int offset1, int len1,
861f93
-		int offset2, int len2)
861f93
+ranges_overlap (LONGEST offset1, LONGEST len1,
861f93
+		LONGEST offset2, LONGEST len2)
861f93
 {
861f93
   ULONGEST h, l;
861f93
 
861f93
@@ -107,7 +107,7 @@ range_lessthan (const range_s *r1, const
861f93
    OFFSET+LENGTH).  */
861f93
 
861f93
 static int
861f93
-ranges_contain (VEC(range_s) *ranges, int offset, int length)
861f93
+ranges_contain (VEC(range_s) *ranges, LONGEST offset, LONGEST length)
861f93
 {
861f93
   range_s what;
861f93
   int i;
861f93
@@ -240,7 +240,7 @@ struct value
861f93
      lval == lval_register, this is a further offset from
861f93
      location.address within the registers structure.  Note also the
861f93
      member embedded_offset below.  */
861f93
-  int offset;
861f93
+  LONGEST offset;
861f93
 
861f93
   /* Only used for bitfields; number of bits contained in them.  */
861f93
   int bitsize;
861f93
@@ -310,8 +310,8 @@ struct value
861f93
      `type', and `embedded_offset' is zero, so everything works
861f93
      normally.  */
861f93
   struct type *enclosing_type;
861f93
-  int embedded_offset;
861f93
-  int pointed_to_offset;
861f93
+  LONGEST embedded_offset;
861f93
+  LONGEST pointed_to_offset;
861f93
 
861f93
   /* Values are stored in a chain, so that they can be deleted easily
861f93
      over calls to the inferior.  Values assigned to internal
861f93
@@ -333,7 +333,8 @@ struct value
861f93
 };
861f93
 
861f93
 int
861f93
-value_bytes_available (const struct value *value, int offset, int length)
861f93
+value_bytes_available (const struct value *value, LONGEST offset,
861f93
+		       LONGEST length)
861f93
 {
861f93
   gdb_assert (!value->lazy);
861f93
 
861f93
@@ -354,7 +355,8 @@ value_entirely_available (struct value *
861f93
 }
861f93
 
861f93
 void
861f93
-mark_value_bytes_unavailable (struct value *value, int offset, int length)
861f93
+mark_value_bytes_unavailable (struct value *value, LONGEST offset,
861f93
+			      LONGEST length)
861f93
 {
861f93
   range_s newr;
861f93
   int i;
861f93
@@ -525,7 +527,7 @@ mark_value_bytes_unavailable (struct val
861f93
 
861f93
 static int
861f93
 find_first_range_overlap (VEC(range_s) *ranges, int pos,
861f93
-			  int offset, int length)
861f93
+			  LONGEST offset, LONGEST length)
861f93
 {
861f93
   range_s *r;
861f93
   int i;
861f93
@@ -538,9 +540,9 @@ find_first_range_overlap (VEC(range_s) *
861f93
 }
861f93
 
861f93
 int
861f93
-value_available_contents_eq (const struct value *val1, int offset1,
861f93
-			     const struct value *val2, int offset2,
861f93
-			     int length)
861f93
+value_available_contents_eq (const struct value *val1, LONGEST offset1,
861f93
+			     const struct value *val2, LONGEST offset2,
861f93
+			     LONGEST length)
861f93
 {
861f93
   int idx1 = 0, idx2 = 0;
861f93
 
861f93
@@ -766,13 +768,13 @@ deprecated_set_value_type (struct value
861f93
   value->type = type;
861f93
 }
861f93
 
861f93
-int
861f93
+LONGEST
861f93
 value_offset (const struct value *value)
861f93
 {
861f93
   return value->offset;
861f93
 }
861f93
 void
861f93
-set_value_offset (struct value *value, int offset)
861f93
+set_value_offset (struct value *value, LONGEST offset)
861f93
 {
861f93
   value->offset = offset;
861f93
 }
861f93
@@ -926,8 +928,9 @@ value_contents_all (struct value *value)
861f93
    DST_OFFSET+LENGTH) range are wholly available.  */
861f93
 
861f93
 void
861f93
-value_contents_copy_raw (struct value *dst, int dst_offset,
861f93
-			 struct value *src, int src_offset, int length)
861f93
+value_contents_copy_raw (struct value *dst, ssize_t dst_offset,
861f93
+			 struct value *src, ssize_t src_offset,
861f93
+			 ssize_t length)
861f93
 {
861f93
   range_s *r;
861f93
   int i;
861f93
@@ -975,8 +978,8 @@ value_contents_copy_raw (struct value *d
861f93
    DST_OFFSET+LENGTH) range are wholly available.  */
861f93
 
861f93
 void
861f93
-value_contents_copy (struct value *dst, int dst_offset,
861f93
-		     struct value *src, int src_offset, int length)
861f93
+value_contents_copy (struct value *dst, ssize_t dst_offset,
861f93
+		     struct value *src, ssize_t src_offset, ssize_t length)
861f93
 {
861f93
   require_not_optimized_out (src);
861f93
 
861f93
@@ -1070,7 +1073,7 @@ value_entirely_optimized_out (const stru
861f93
 }
861f93
 
861f93
 int
861f93
-value_bits_valid (const struct value *value, int offset, int length)
861f93
+value_bits_valid (const struct value *value, LONGEST offset, LONGEST length)
861f93
 {
861f93
   if (!value->optimized_out)
861f93
     return 1;
861f93
@@ -1083,7 +1086,7 @@ value_bits_valid (const struct value *va
861f93
 
861f93
 int
861f93
 value_bits_synthetic_pointer (const struct value *value,
861f93
-			      int offset, int length)
861f93
+			      LONGEST offset, LONGEST length)
861f93
 {
861f93
   if (value->lval != lval_computed
861f93
       || !value->location.computed.funcs->check_synthetic_pointer)
861f93
@@ -1093,26 +1096,26 @@ value_bits_synthetic_pointer (const stru
861f93
 								  length);
861f93
 }
861f93
 
861f93
-int
861f93
+LONGEST
861f93
 value_embedded_offset (struct value *value)
861f93
 {
861f93
   return value->embedded_offset;
861f93
 }
861f93
 
861f93
 void
861f93
-set_value_embedded_offset (struct value *value, int val)
861f93
+set_value_embedded_offset (struct value *value, LONGEST val)
861f93
 {
861f93
   value->embedded_offset = val;
861f93
 }
861f93
 
861f93
-int
861f93
+LONGEST
861f93
 value_pointed_to_offset (struct value *value)
861f93
 {
861f93
   return value->pointed_to_offset;
861f93
 }
861f93
 
861f93
 void
861f93
-set_value_pointed_to_offset (struct value *value, int val)
861f93
+set_value_pointed_to_offset (struct value *value, LONGEST val)
861f93
 {
861f93
   value->pointed_to_offset = val;
861f93
 }
861f93
@@ -1967,7 +1970,7 @@ get_internalvar_function (struct interna
861f93
 }
861f93
 
861f93
 void
861f93
-set_internalvar_component (struct internalvar *var, int offset, int bitpos,
861f93
+set_internalvar_component (struct internalvar *var, LONGEST offset, int bitpos,
861f93
 			   int bitsize, struct value *newval)
861f93
 {
861f93
   gdb_byte *addr;
861f93
@@ -2674,7 +2677,7 @@ set_value_enclosing_type (struct value *
861f93
    FIELDNO says which field.  */
861f93
 
861f93
 struct value *
861f93
-value_primitive_field (struct value *arg1, int offset,
861f93
+value_primitive_field (struct value *arg1, LONGEST offset,
861f93
 		       int fieldno, struct type *arg_type)
861f93
 {
861f93
   struct value *v;
861f93
@@ -2704,7 +2707,7 @@ value_primitive_field (struct value *arg
861f93
 	 bit.  Assume that the address, offset, and embedded offset
861f93
 	 are sufficiently aligned.  */
861f93
 
861f93
-      int bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
861f93
+      LONGEST bitpos = TYPE_FIELD_BITPOS (arg_type, fieldno);
861f93
       int container_bitsize = TYPE_LENGTH (type) * 8;
861f93
 
861f93
       v = allocate_value_lazy (type);
861f93
@@ -2727,7 +2730,7 @@ value_primitive_field (struct value *arg
861f93
       /* This field is actually a base subobject, so preserve the
861f93
 	 entire object's contents for later references to virtual
861f93
 	 bases, etc.  */
861f93
-      int boffset;
861f93
+      LONGEST boffset;
861f93
 
861f93
       /* Lazy register values with offsets are not supported.  */
861f93
       if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
861f93
@@ -2804,7 +2807,7 @@ value_field (struct value *arg1, int fie
861f93
 struct value *
861f93
 value_fn_field (struct value **arg1p, struct fn_field *f,
861f93
 		int j, struct type *type,
861f93
-		int offset)
861f93
+		LONGEST offset)
861f93
 {
861f93
   struct value *v;
861f93
   struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);
861f93
@@ -2864,8 +2867,8 @@ value_fn_field (struct value **arg1p, st
861f93
 
861f93
 static int
861f93
 unpack_value_bits_as_long_1 (struct type *field_type, const gdb_byte *valaddr,
861f93
-			     int embedded_offset, int bitpos, int bitsize,
861f93
-			     const struct value *original_value,
861f93
+			     LONGEST embedded_offset, LONGEST bitpos,
861f93
+			     int bitsize, const struct value *original_value,
861f93
 			     LONGEST *result)
861f93
 {
861f93
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (field_type));
861f93
@@ -2873,7 +2876,7 @@ unpack_value_bits_as_long_1 (struct type
861f93
   ULONGEST valmask;
861f93
   int lsbcount;
861f93
   int bytes_read;
861f93
-  int read_offset;
861f93
+  LONGEST read_offset;
861f93
 
861f93
   /* Read the minimum number of bytes required; there may not be
861f93
      enough bytes to read an entire ULONGEST.  */
861f93
@@ -2943,7 +2946,7 @@ unpack_value_bits_as_long_1 (struct type
861f93
 
861f93
 int
861f93
 unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr,
861f93
-			   int embedded_offset, int bitpos, int bitsize,
861f93
+			   LONGEST embedded_offset, int bitpos, int bitsize,
861f93
 			   const struct value *original_value,
861f93
 			   LONGEST *result)
861f93
 {
861f93
@@ -2961,10 +2964,10 @@ unpack_value_bits_as_long (struct type *
861f93
 
861f93
 static int
861f93
 unpack_value_field_as_long_1 (struct type *type, const gdb_byte *valaddr,
861f93
-			      int embedded_offset, int fieldno,
861f93
+			      LONGEST embedded_offset, int fieldno,
861f93
 			      const struct value *val, LONGEST *result)
861f93
 {
861f93
-  int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
861f93
+  LONGEST bitpos = TYPE_FIELD_BITPOS (type, fieldno);
861f93
   int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
861f93
   struct type *field_type = TYPE_FIELD_TYPE (type, fieldno);
861f93
 
861f93
@@ -2980,7 +2983,7 @@ unpack_value_field_as_long_1 (struct typ
861f93
 
861f93
 int
861f93
 unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr,
861f93
-			    int embedded_offset, int fieldno,
861f93
+			    LONGEST embedded_offset, int fieldno,
861f93
 			    const struct value *val, LONGEST *result)
861f93
 {
861f93
   gdb_assert (val != NULL);
861f93
@@ -3012,7 +3015,7 @@ unpack_field_as_long (struct type *type,
861f93
 struct value *
861f93
 value_field_bitfield (struct type *type, int fieldno,
861f93
 		      const gdb_byte *valaddr,
861f93
-		      int embedded_offset, const struct value *val)
861f93
+		      LONGEST embedded_offset, const struct value *val)
861f93
 {
861f93
   LONGEST l;
861f93
 
861f93
@@ -3039,12 +3042,12 @@ value_field_bitfield (struct type *type,
861f93
 
861f93
 void
861f93
 modify_field (struct type *type, gdb_byte *addr,
861f93
-	      LONGEST fieldval, int bitpos, int bitsize)
861f93
+	      LONGEST fieldval, LONGEST bitpos, int bitsize)
861f93
 {
861f93
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
861f93
   ULONGEST oword;
861f93
   ULONGEST mask = (ULONGEST) -1 >> (8 * sizeof (ULONGEST) - bitsize);
861f93
-  int bytesize;
861f93
+  LONGEST bytesize;
861f93
 
861f93
   /* Normalize BITPOS.  */
861f93
   addr += bitpos / 8;
861f93
Index: gdb-7.6.1/gdb/value.h
861f93
===================================================================
861f93
--- gdb-7.6.1.orig/gdb/value.h	2013-08-30 21:54:18.771367551 +0200
861f93
+++ gdb-7.6.1/gdb/value.h	2013-08-30 21:55:01.872384221 +0200
861f93
@@ -82,8 +82,8 @@ extern void set_value_parent (struct val
861f93
    within the registers structure.  Note also the member
861f93
    embedded_offset below.  */
861f93
 
861f93
-extern int value_offset (const struct value *);
861f93
-extern void set_value_offset (struct value *, int offset);
861f93
+extern LONGEST value_offset (const struct value *);
861f93
+extern void set_value_offset (struct value *, LONGEST offset);
861f93
 
861f93
 /* The comment from "struct value" reads: ``Is it modifiable?  Only
861f93
    relevant if lval != not_lval.''.  Shouldn't the value instead be
861f93
@@ -152,10 +152,10 @@ extern struct type *value_actual_type (s
861f93
 				       int resolve_simple_types,
861f93
 				       int *real_type_found);
861f93
 
861f93
-extern int value_pointed_to_offset (struct value *value);
861f93
-extern void set_value_pointed_to_offset (struct value *value, int val);
861f93
-extern int value_embedded_offset (struct value *value);
861f93
-extern void set_value_embedded_offset (struct value *value, int val);
861f93
+extern LONGEST value_pointed_to_offset (struct value *value);
861f93
+extern void set_value_pointed_to_offset (struct value *value, LONGEST val);
861f93
+extern LONGEST value_embedded_offset (struct value *value);
861f93
+extern void set_value_embedded_offset (struct value *value, LONGEST val);
861f93
 
861f93
 /* For lval_computed values, this structure holds functions used to
861f93
    retrieve and set the value (or portions of the value).
861f93
@@ -183,7 +183,8 @@ struct lval_funcs
861f93
   /* Check the validity of some bits in VALUE.  This should return 1
861f93
      if all the bits starting at OFFSET and extending for LENGTH bits
861f93
      are valid, or 0 if any bit is invalid.  */
861f93
-  int (*check_validity) (const struct value *value, int offset, int length);
861f93
+  int (*check_validity) (const struct value *value, LONGEST offset,
861f93
+			 LONGEST length);
861f93
 
861f93
   /* Return 1 if any bit in VALUE is valid, 0 if they are all invalid.  */
861f93
   int (*check_any_valid) (const struct value *value);
861f93
@@ -201,7 +202,7 @@ struct lval_funcs
861f93
   /* If non-NULL, this is used to determine whether the indicated bits
861f93
      of VALUE are a synthetic pointer.  */
861f93
   int (*check_synthetic_pointer) (const struct value *value,
861f93
-				  int offset, int length);
861f93
+				  LONGEST offset, LONGEST length);
861f93
 
861f93
   /* Return a duplicate of VALUE's closure, for use in a new value.
861f93
      This may simply return the same closure, if VALUE's is
861f93
@@ -238,7 +239,7 @@ extern struct value *allocate_computed_v
861f93
    Otherwise, return 1.  */
861f93
 
861f93
 extern int valprint_check_validity (struct ui_file *stream, struct type *type,
861f93
-				    int embedded_offset,
861f93
+				    LONGEST embedded_offset,
861f93
 				    const struct value *val);
861f93
 
861f93
 extern struct value *allocate_optimized_out_value (struct type *type);
861f93
@@ -409,13 +410,13 @@ extern struct value *coerce_array (struc
861f93
    bits in the given range are valid, zero if any bit is invalid.  */
861f93
 
861f93
 extern int value_bits_valid (const struct value *value,
861f93
-			     int offset, int length);
861f93
+			     LONGEST offset, LONGEST length);
861f93
 
861f93
 /* Given a value, determine whether the bits starting at OFFSET and
861f93
    extending for LENGTH bits are a synthetic pointer.  */
861f93
 
861f93
 extern int value_bits_synthetic_pointer (const struct value *value,
861f93
-					 int offset, int length);
861f93
+					 LONGEST offset, LONGEST length);
861f93
 
861f93
 /* Given a value, determine whether the contents bytes starting at
861f93
    OFFSET and extending for LENGTH bytes are available.  This returns
861f93
@@ -423,7 +424,7 @@ extern int value_bits_synthetic_pointer
861f93
    byte is unavailable.  */
861f93
 
861f93
 extern int value_bytes_available (const struct value *value,
861f93
-				  int offset, int length);
861f93
+				  LONGEST offset, LONGEST length);
861f93
 
861f93
 /* Like value_bytes_available, but return false if any byte in the
861f93
    whole object is unavailable.  */
861f93
@@ -433,7 +434,7 @@ extern int value_entirely_available (str
861f93
    LENGTH bytes as unavailable.  */
861f93
 
861f93
 extern void mark_value_bytes_unavailable (struct value *value,
861f93
-					  int offset, int length);
861f93
+					  LONGEST offset, LONGEST length);
861f93
 
861f93
 /* Compare LENGTH bytes of VAL1's contents starting at OFFSET1 with
861f93
    LENGTH bytes of VAL2's contents starting at OFFSET2.
861f93
@@ -443,7 +444,7 @@ extern void mark_value_bytes_unavailable
861f93
    example, to compare a complete object value with itself, including
861f93
    its enclosing type chunk, you'd do:
861f93
 
861f93
-     int len = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
861f93
+     ULONGEST len = TYPE_LENGTH (check_typedef (value_enclosing_type (val)));
861f93
      value_available_contents (val, 0, val, 0, len);
861f93
 
861f93
    Returns true iff the set of available contents match.  Unavailable
861f93
@@ -470,9 +471,10 @@ extern void mark_value_bytes_unavailable
861f93
    gone, it works with const values.  Therefore, this routine must not
861f93
    be called with lazy values.  */
861f93
 
861f93
-extern int value_available_contents_eq (const struct value *val1, int offset1,
861f93
-					const struct value *val2, int offset2,
861f93
-					int length);
861f93
+extern int value_available_contents_eq (const struct value *val1,
861f93
+					LONGEST offset1,
861f93
+					const struct value *val2,
861f93
+					LONGEST offset2, LONGEST length);
861f93
 
861f93
 /* Read LENGTH bytes of memory starting at MEMADDR into BUFFER, which
861f93
    is (or will be copied to) VAL's contents buffer offset by
861f93
@@ -481,7 +483,7 @@ extern int value_available_contents_eq (
861f93
    memory is likewise unavailable.  STACK indicates whether the memory
861f93
    is known to be stack memory.  */
861f93
 
861f93
-extern void read_value_memory (struct value *val, int embedded_offset,
861f93
+extern void read_value_memory (struct value *val, LONGEST embedded_offset,
861f93
 			       int stack, CORE_ADDR memaddr,
861f93
 			       gdb_byte *buffer, size_t length);
861f93
 
861f93
@@ -515,7 +517,7 @@ extern CORE_ADDR unpack_pointer (struct
861f93
 
861f93
 extern int unpack_value_bits_as_long (struct type *field_type,
861f93
 				      const gdb_byte *valaddr,
861f93
-				      int embedded_offset, int bitpos,
861f93
+				      LONGEST embedded_offset, int bitpos,
861f93
 				      int bitsize,
861f93
 				      const struct value *original_value,
861f93
 				      LONGEST *result);
861f93
@@ -524,12 +526,12 @@ extern LONGEST unpack_field_as_long (str
861f93
 				     const gdb_byte *valaddr,
861f93
 				     int fieldno);
861f93
 extern int unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr,
861f93
-				int embedded_offset, int fieldno,
861f93
+				LONGEST embedded_offset, int fieldno,
861f93
 				const struct value *val, LONGEST *result);
861f93
 
861f93
 extern struct value *value_field_bitfield (struct type *type, int fieldno,
861f93
 					   const gdb_byte *valaddr,
861f93
-					   int embedded_offset,
861f93
+					   LONGEST embedded_offset,
861f93
 					   const struct value *val);
861f93
 
861f93
 extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num);
861f93
@@ -588,12 +590,12 @@ extern struct value *default_read_var_va
861f93
 extern struct value *allocate_value (struct type *type);
861f93
 extern struct value *allocate_value_lazy (struct type *type);
861f93
 extern void allocate_value_contents (struct value *value);
861f93
-extern void value_contents_copy (struct value *dst, int dst_offset,
861f93
-				 struct value *src, int src_offset,
861f93
-				 int length);
861f93
-extern void value_contents_copy_raw (struct value *dst, int dst_offset,
861f93
-				     struct value *src, int src_offset,
861f93
-				     int length);
861f93
+extern void value_contents_copy (struct value *dst, ssize_t dst_offset,
861f93
+				 struct value *src, ssize_t src_offset,
861f93
+				 ssize_t length);
861f93
+extern void value_contents_copy_raw (struct value *dst, ssize_t dst_offset,
861f93
+				     struct value *src, ssize_t src_offset,
861f93
+				     ssize_t length);
861f93
 
861f93
 extern struct value *allocate_repeat_value (struct type *type, int count);
861f93
 
861f93
@@ -665,16 +667,16 @@ extern int find_overload_match (struct v
861f93
 
861f93
 extern struct value *value_field (struct value *arg1, int fieldno);
861f93
 
861f93
-extern struct value *value_primitive_field (struct value *arg1, int offset,
861f93
+extern struct value *value_primitive_field (struct value *arg1, LONGEST offset,
861f93
 					    int fieldno,
861f93
 					    struct type *arg_type);
861f93
 
861f93
 
861f93
-extern struct type *value_rtti_indirect_type (struct value *, int *, int *,
861f93
+extern struct type *value_rtti_indirect_type (struct value *, int *, LONGEST *,
861f93
 					      int *);
861f93
 
861f93
 extern struct value *value_full_object (struct value *, struct type *, int,
861f93
-					int, int);
861f93
+					LONGEST, int);
861f93
 
861f93
 extern struct value *value_cast_pointers (struct type *, struct value *, int);
861f93
 
861f93
@@ -768,7 +770,7 @@ extern void set_internalvar_string (stru
861f93
 extern void clear_internalvar (struct internalvar *var);
861f93
 
861f93
 extern void set_internalvar_component (struct internalvar *var,
861f93
-				       int offset,
861f93
+				       LONGEST offset,
861f93
 				       int bitpos, int bitsize,
861f93
 				       struct value *newvalue);
861f93
 
861f93
@@ -850,7 +852,7 @@ extern struct value *value_x_unop (struc
861f93
 				   enum noside noside);
861f93
 
861f93
 extern struct value *value_fn_field (struct value **arg1p, struct fn_field *f,
861f93
-				     int j, struct type *type, int offset);
861f93
+				     int j, struct type *type, LONGEST offset);
861f93
 
861f93
 extern int binop_types_user_defined_p (enum exp_opcode op,
861f93
 				       struct type *type1,
861f93
@@ -878,7 +880,8 @@ extern void release_value_or_incref (str
861f93
 extern int record_latest_value (struct value *val);
861f93
 
861f93
 extern void modify_field (struct type *type, gdb_byte *addr,
861f93
-			  LONGEST fieldval, int bitpos, int bitsize);
861f93
+			  LONGEST fieldval, LONGEST bitpos,
861f93
+			  int bitsize);
861f93
 
861f93
 extern void type_print (struct type *type, const char *varstring,
861f93
 			struct ui_file *stream, int show);
861f93
@@ -908,7 +911,7 @@ extern void value_print_array_elements (
861f93
 extern struct value *value_release_to_mark (struct value *mark);
861f93
 
861f93
 extern void val_print (struct type *type, const gdb_byte *valaddr,
861f93
-		       int embedded_offset, CORE_ADDR address,
861f93
+		       LONGEST embedded_offset, CORE_ADDR address,
861f93
 		       struct ui_file *stream, int recurse,
861f93
 		       const struct value *val,
861f93
 		       const struct value_print_options *options,
861f93
@@ -957,10 +960,11 @@ extern struct value *value_literal_compl
861f93
 extern struct value *find_function_in_inferior (const char *,
861f93
 						struct objfile **);
861f93
 
861f93
-extern struct value *value_allocate_space_in_inferior (int);
861f93
+extern struct value *value_allocate_space_in_inferior (LONGEST);
861f93
 
861f93
 extern struct value *value_subscripted_rvalue (struct value *array,
861f93
-					       LONGEST index, int lowerbound);
861f93
+					       LONGEST index,
861f93
+					       LONGEST lowerbound);
861f93
 
861f93
 /* User function handler.  */
861f93