Hi, I have finally finished this off with a combined patch to expand bitpos to LONGEST and type.length to ULONGEST. A quick recap of the problem I'm trying to solve: Currently gdb stores type sizes and struct offsets in 32-bit unsigned and int respectively, which overflows for larger values. This patch extends these values and all its usages throughout the code to the longest possible values so that gdb can read larger structs, arrays and ofsets within those structs and arrays. An initial patch had gone in to avoid overloading the meaning of structure offset with enum values, primarily to allow bitpos to be defined as ULONGEST: http://sourceware.org/ml/gdb-patches/2012-04/msg00538.html This however is not possible anyway, since bitpos may be negative for vtable offsets and as a result, I have extended bitpos to LONGEST in this patch. I have attached the test case patch as a separate file. Below is the changelog. Regards, Siddhesh gdb/ChangeLog 2012-05-04 Siddhesh Poyarekar * ada-lang.c (fat_pntr_bounds_bitpos): Return LONGEST. (fat_pntr_data_bitpos): Likewise. (desc_bound_bitpos): Likewise. (constrained_packed_array_type): Expand elt_bits parameter to LONGEST. (move_bits): Expand parameters src_offset and n to ULONGEST. (ada_index_struct_field): Expand parameters index and offset to LONGEST. (cond_offset_host): Expand parameter offset to LONGEST. (cond_offset_target): Likewise. (ada_type_of_array): Expand array_bitsize to LONGEST. (decode_constrained_packed_array_type): Expand bits to ULONGEST. (decode_constrained_packed_array): Expand bit_pos to LONGEST. (ada_value_primitive_packed_val): Expand parameter offset to LONGEST. Expand targ to LONGEST and ntarg to ULONGEST. (ada_value_assign): Expand from_size to ULONGEST. (value_assign_to_component): Expand bits to ULONGEST. (ensure_lval): Expand len to ULONGEST. (value_pointer): Likewise. (value_tag_from_contents_and_address): Expand tag_byte_offset to LONGEST. (ada_value_primitive_field): Expand parameter offset to LONGEST. Expand bit_pos to LONGEST. (find_struct_field): Expand parameters offset and byte_offset_p to LONGEST. Expand bit_pos and fld_offset to LONGEST. (ada_search_struct_field): Expand parameter offset to LONGEST. Expand var_offset to LONGEST. (ada_index_struct_field): Expand parameters index and offset to LONGEST. (ada_index_struct_field_1): Expand parameters index_p and offset to LONGEST. (ada_value_struct_elt): Expand byte_offset to LONGEST. (align_value): Return ULONGEST. Expand parameter off to LONGEST and alignment to ULONGEST. (ada_template_to_fixed_record_type_1): Expand off, bit_len and fld_bit_len to ULONGEST. Expand field_offset to LONGEST. Use pulongest function to print TYPE_LENGTH. (to_fixed_array_type): Expand len to ULONGEST. * ada-lang.h (ada_val_print): Expand parameter embedded_offset to LONGEST. (ada_printstr): Expand parameter length to ULONGEST. (ada_value_primitive_packed_val): Expand parameter offset to LONGEST. * ada-typeprint.c (ada_print_type): Use pulongest to print TYPE_LENGTH. * ada-valprint.c (val_print_packed_array_elements): Expand eltlen to ULONGEST. (char_at): Expand parameter i to ULONGEST. (printstr): Expand parameter length to ULONGEST. (ada_printstr): Likewise. (ada_val_print): Expand embedded_offset to LONGEST. (ada_val_print_array): Expand eltlen, len and temp_len to ULONGEST. (ada_val_print_1): Expand parameter offset to ULONGEST. Expand len to ULONGEST. (print_variant_part): Expand parameters offset and outer_offset to LONGEST. (print_field_values): Likewise. Expand bit_pos to LONGEST. * alpha-tdep.c (struct alpha_arg): Expand member len to ULONGEST. (alpha_push_dummy_call): Expand len to ULONGEST. (alpha_extract_return_value): Expand length to ULONGEST. (alpha_store_return_value): Likewise. * amd64-tdep.c (amd64_classify_aggregate): Expand len, bitsize, endpos to ULONGEST and pos to LONGEST. (amd64_classify): Expand len to ULONGEST. (amd64_return_value): Expand len to LONGEST. (amd64_push_arguments): Expand num_elements, element to ULONGEST and len to LONGEST. (amd64_get_longjmp_target): Expand len to ULONGEST. * amd64-windows-tdep.c (amd64_windows_return_value): Expand len to LONGEST. * arm-tdep.c (arm_push_dummy_call): Expand len to LONGEST. (arm_extract_return_value): Expand len to ULONGEST. (arm_store_return_value): Likewise. * avr-tdep.c (avr_return_value): Expand i to ULONGEST. (push_stack_item): Expand parameter len to ULONGEST. (avr_push_dummy_call): Expand last_regnum, len to ULONGEST. * ax-gdb.c (gen_trace_static_fields): Expand length to ULONGEST. (gen_traced_pop): Likewise. (gen_left_shift): Expand parameter distance to LONGEST. (gen_offset): Expand parameter offset to LONGEST. (gen_bitfield_ref): Expand parameters start, end to LONGEST. Expand bound_start, bound_endi, offset to LONGEST. (gen_primitive_field): Expand parameter offset to LONGEST. (gen_struct_ref_recursive): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Expand total_len, len, container_len to ULONGEST. (bfin_extract_return_value): Expand len to LONGEST. (bfin_store_return_value): Likewise. * breakpoint.c (update_watchpoint): Expand len to ULONGEST. (can_use_hardware_watchpoint): Likewise. (invalidate_bp_value_on_memory_change): Expand parameter len to LONGEST. * breakpoint.h (struct bp_location): Expand member length to ULONGEST. * c-lang.c (c_printstr): Expand parameter length to ULONGEST. Remove unused variable width. (evaluate_subexp_c): Expand element_size, i to ULONGEST. * c-lang.h (c_val_print): Expand parameter embedded_offset to LONGEST. (c_printstr): Expand parameter length to ULONGEST. (cp_print_value_fields): Expand parameter offset to LONGEST. (cp_print_value_fields_rtti): Likewise. * c-typeprint.c (c_type_print_varspec_suffix): Remove cast down to int and use pulongest to print ULONGEST. * c-valprint.c (c_val_print): Expand parameter embedded_offset to LONGEST. Expand offset to LONGEST, eltlen to ULONGEST. (c_value_print): Expand top to LONGEST. * corefile.c (read_memory): Expand len to ULONGEST. (read_stack): Likewise. (write_memory): Likewise. * cp-abi.c (baseclass_offset): Return LONGEST. Expand parameter embedded_offset to LONGEST. Expand res to LONGEST. (value_virtual_fn_field): Expand parameter offset to LONGEST. (value_rtti_type): Expand parameter top to LONGEST *. * cp-abi.h (value_virtual_fn_field): Expand offset to LONGEST. (value_rtti_type): Expand top to LONGEST *. (baseclass_offset): Return LONGEST. Expand parameter embedded_offset to LONGEST. (struct cp_abi_ops): Expand parameter offset for virtual_fn_field to LONGEST. Expand parameter top to LONGEST * in value_rtti_type. Return LONGEST from baseclass_offset and expand parameter for embedded_offset to LONGEST. * cp-valprint.c (cp_print_value_fields): Expand parameter offset to LONGEST. (cp_print_value_fields_rtti): Likewise. Expand top to LONGEST. (cp_print_value): Expand parameter offset to LONGEST. Expand thisoffset, boffset to LONGEST. (cp_find_class_member): Expand bitsize to ULONGEST. * cris-tdep.c (push_stack_item): Expand parameter len to ULONGEST. (cris_push_dummy_call): Expand len, reg_demand, i to ULONGEST. (cris_store_return_value): Expand len to ULONGEST. (cris_extract_return_value): Likewise. * d-lang.h (d_val_print): Expand parameter embedded_offset to LONGEST. * d-valprint.c (dynamic_array_type): Likewise. (d_val_print): Likewise. * doc/observer.texi (memory_changed): Expand parameter len to LONGEST. * doublest.c (floatformat_from_length): Likewise. Use pulongest to format string for ULONGEST. * dwarf2loc.c (copy_bitwise): Expand parameters dest_offset_bits, bit_count to ULONGEST. Rename parameter source_offset_bits to source_offset and expand to ULONGEST. New variable source_offset_bits. (read_pieced_value): Expand offset, dest_offset_bits, source_offset_bits, source_offset to LONGEST. Expand type_len, this_size, this_size_bits to ULONGEST. (write_pieced_value): Expand type_len, this_size, this_size_bits to ULONGEST. Expand dest_offset_bits, source_offset_bits, dest_offset, source_offset to LONGEST. (check_pieced_value_bits): Expand parameter bit_length to ULONGEST. (check_pieced_value_validity): Likewise. (check_pieced_synthetic_pointer): Likewise. (indirect_pieced_value): Expand bit_length to ULONGEST. Expand bit_offset to LONGEST. (dwarf2_evaluate_loc_desc_full): Expand n to ULONGEST. * dwarf2read.c (struct dwarf_block): ULONGEST size. (dwarf2_const_value_length_mismatch_complaint): Expand parameters arg2 and arg3 to ULONGEST. Use pulongest to print arg2 and arg3. (dwarf2_add_field): Expand anonymous size to ULONGEST. (dump_die_shallow): Use pulongest to print dwarf_block.size. * eval.c (evaluate_struct_tuple): Expand bitpos to LONGEST. (init_array_element): Expand element_size to ULONGEST. (binop_promote): Expand promoted_len1, promoted_len2, result_len to ULONGEST. (evaluate_subexp_standard): Expand mem_offset, top to LONGEST. Expand element_size to ULONGEST. * f-lang.c (f_printstr): Expand parameter length to ULONGEST. * f-lang.h (f_val_print): Expand parameter embedded_offset to LONGEST. * f-valprint.c (f77_array_offset_tbl): Make LONGEST. (f77_create_arrayprint_offset_tbl): Expand eltlen to ULONGEST. (f77_print_array_1): Expand parameter embedded_offset to LONGEST. (f77_print_array): Likewise. (f_val_print): Likewise. Expand offset to LONGEST. * findcmd.c (parse_find_args): Expand val_bytes to ULONGEST. * findvar.c (extract_unsigned_integer): Remove unnecessary cast. (default_read_var_value): Expand len to ULONGEST. (default_value_from_register): Likewise. (read_frame_register_value): Expand offset, reg_offset to LONGEST. Expand len, reg_len to ULONGEST. * frv-tdep.c (frv_extract_return_value): Expand len to ULONGEST. Use pulongest to format print len. (frv_push_dummy_call): Expand len to ULONGEST. (frv_store_return_value): Likewise. Use pulongest to format print len. * gdbcore.h (read_memory): Expand parameter len to ULONGEST. (read_stack): Likewise. (write_memory): Likewise. * gdbtypes.c (init_type): Expand parameter length to ULONGEST. (is_unique_ancestor_worker): Expand parameters offset, embedded_offset to LONGEST. Expand this_offset to LONGEST. (recursive_dump_type): Use pulongest to format print TYPE_LENGTH. Use plongest to format print TYPE_FIELD_BITPOS. (arch_type): Expand parameter length to ULONGEST. * gdbtypes.h (type.main_type.fld_bnds.fields): Expand bitpos to LONGEST. (type): Expand length to ULONGEST. (init_type): Expand parameter length to ULONGEST. (arch_type): Likewise. * gnu-v2-abi.c (gnuv2_virtual_fn_field): Expand parameter offset to LONGEST. (gnuv2_value_rtti_type): Expand parameter top to LONGEST *. (gnuv2_baseclass_offset): Return LONGEST. Expand parameter embedded_offset to LONGEST. Expand field_offset, boffset to LONGEST, field_length to ULONGEST. * gnu-v3-abi.c (build_gdb_vtable_type): Expand offset to LONGEST. (vtable_address_point_offset): Return LONGEST. (gnuv3_rtti_type): Expand parameter top_p to LONGEST *. (gnuv3_virtual_fn_field): Expand parameter offset to LONGEST. (gnuv3_baseclass_offset): Return LONGEST. Expand parameter embedded_ofset to LONGEST. Expand cur_base_offset, base_offset to LONGEST. (gnuv3_find_method_in): Expand pos to LONGEST. * go-lang.h (go_val_print): Expand parameter embedded_offset to LONGEST. * go-valprint.c (go_val_print): Likewise. * h8300-tdep.c (h8300_push_dummy_call): Expand stack_alloc, stack_offset, len, padded_len, offset to LONGEST. * hppa-tdep.c (hppa64_push_dummy_call): Expand len to ULONGEST. (hppa64_return_value): Likewise. * i386-darwin-tdep.c (i386_darwin_arg_type_alignment): Return ULONGEST. Expand res to ULONGEST. (i386_darwin_push_dummy_call): Expand arg_spaces, len, align to ULONGEST. * i386-nat.c (i386_handle_nonaligned_watchpoint): Expand parameter len to ULONGEST. (i386_region_ok_for_watchpoint): Expand parameter len to LONGEST. * i386-tdep.c (i386_push_dummy_call): Expand arg_space, arg_space_used, len to ULONGEST. (i386_extract_return_value): Expand len to ULONGEST. Use pulongest to format print len. (i386_store_return_value): Likewise. * ia64-tdep.c (ia64_extract_return_value): Expand n to ULONGEST. (ia64_store_return_value): Likewise. (ia64_push_dummy_call): Expand argoffset, len, nslots, memslots to ULONGEST. * infcall.c (call_function_by_hand): Expand len to ULONGEST. * infrun.c (save_infcall_suspend_state): Expand len to ULONGEST. (restore_infcall_suspend_state): Eliminate single-use variable len. * iq2000-tdep.c (iq2000_store_return_value): Expand len to ULONGEST. (iq2000_extract_return_value): Likewise. Use len instead of TYPE_LENGTH. (iq2000_push_dummy_call): Expand typelen, stackspace to ULONGEST. * jv-lang.c (java_link_class_type): Expand boffset to LONGEST. (java_printstr): Expand parameter length to ULONGEST. * jv-lang.h (java_val_print): Expand parameter embedded_offset to LONGEST. * jv-valprint.c (java_print_value_fields): Expand parameter offset to LONGEST. (java_val_print): Expand parameter embedded_offset to LONGEST. * language.c (unk_lang_printstr): Expand parameter length to ULONGEST. (unk_lang_val_print): Expand parameter embedded_offset to LONGEST. * language.h (language_defn): Expand parameter length of la_printstr to ULONGEST. Expand parameter embedded_offset of la_val_print to LONGEST. * lm32-tdep.c (lm32_push_dummy_call): Expand len to ULONGEST. (lm32_store_return_value): Likewise. * m2-lang.c (m2_printstr): Expand parameter length to ULONGEST. * m2-lang.h (m2_val_print): Expand parameter embedded_offset to ULONGEST. * m2-typeprint.c (m2_array): Use pulongest to print TYPE_LENGTH. (m2_enum): expand lastval to LONGEST. * m2-valprint.c (m2_print_long_set): Expand parameter embedded_offset to LONGEST. (m2_print_unbounded_array): Likewise. (m2_print_array_contents): Likewise. Eliminate eltlen and use TYPE_LENGTH directly. (m2_val_print): Expand parameter embedded_offset to LONGEST. Expand i, len, temp_len to ULONGEST. Remove eltlen, use TYPE_LENGTH directly. * m32r-tdep.c (m32r_push_dummy_call): Expand len to ULONGEST. (m32r_extract_return_value): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call): Expand len to ULONGEST. (m68hc11_store_return_value): Likewise. * m68k-tdep.c (m68k_extract_return_value): Expand len to ULONGEST. Use pulongest to format print len. (m68k_svr4_extract_return_value): Replace single-use variable len with TYPE_LENGTH. (m68k_store_return_value): Expand len to ULONGEST. Use pulongest to format print len. (m68k_svr4_store_return_value): Replace single-use variable len with TYPE_LENGTH. (m68k_push_dummy_call): Expand len, container_len, offset to ULONGEST. * m88k-tdep.c (m88k_store_arguments): Expand num_register_words, num_stack_words, len to ULONGEST. (m88k_return_value): Expand len to ULONGEST. * memrange.c (mem_ranges_overlap): Expand parameters len1, len2 to ULONGEST. * memrange.h (struct mem_range): Expand member length to ULONGEST. (mem_ranges_overlap): Expand parameters len1, len2 to ULONGEST. * mep-tdep.c (push_large_arguments): Expand arg_len to ULONGEST. (mep_push_dummy_call): Expand arg_size to ULONGEST. * microblaze-tdep.c (microblaze_store_return_value): Expand len to ULONGEST. * mips-tdep.c (mips_xfer_register): Expand parameter buf_offset to LONGEST. Use plongest to format print buf_offset. (mips_eabi_push_dummy_call): Expand len to ULONGEST. Use pulongest to format print len. (mips_n32n64_fp_arg_chunk_p): Expand parameter offset to LONGEST. Expand pos to LONGEST. (mips_n32n64_return_value): Expand offset to LONGEST. Use plongest to format print offset. (mips_o32_push_dummy_call): Expand len to ULONGEST. Eliminate single-use variable arglen. Use pulongest to format print len. (mips_o64_push_dummy_call): Expand len, stack_offset to ULONGEST. Eliminate single-use variable arglen. use pulongest to format print len. * mn10300-tdep.c (mn10300_type_align): Return ULONGEST. Expand align, falign to ULONGEST. (mn10300_push_dummy_call): Expand len, arg_len to ULONGEST. * moxie-tdep.c (moxie_store_return_value): Expand len to ULONGEST. (moxie_extract_return_value): Likewise. * mt-tdep.c (mt_push_dummy_call): Expand stack_dest, typelen to ULONGEST. * objc-lang.c (objc_printstr): Expand parameter length to ULONGEST. * opencl-lang.c (lookup_opencl_vector_type): Expand parameter el_length to ULONGEST. Expand length to ULONGEST. (lval_func_read): Expand offset, n, i, j to LONGEST. Expand elsize to ULONGEST. (lval_func_write): Likewise. (lval_func_check_validity): Expand parameter length to ULONGEST. Expand elsize to ULONGEST. Expand start, end, i to LONGEST. (lval_func_check_any_valid): Expand elsize to ULONGEST. (lval_func_check_synthetic_pointer): Expand parameter offset to LONGEST. Expand parameter length to ULONGEST. Expand elsize to ULONGEST. Expand start, end, i to LONGEST. * p-lang.c (is_pascal_string_type): Expand parameter length_pos, string_pos to LONGEST *. Expand parameter length_size to ULONGEST *. (pascal_printstr): Expand parameter length to ULONGEST. * p-lang.h (pascal_val_print): Expand parameter embedded_offset to LONGEST. (is_pascal_string_type): Expand parameter length_pos, string_pos to LONGEST *. Expand parameter length_size to ULONGEST *. (pascal_printstr): Expand parameter length to ULONGEST. (pascal_object_print_value_fields): Expand parameter offset to LONGEST. * p-typeprint.c (pascal_type_print_base): Expand lastval to LONGEST. * p-valprint.c (pascal_val_print): Expand parameter embedded_offset to LONGEST. Expand eltlen, length_size to ULONGEST. Expand length_pos, string_pos to LONGEST. (pascal_object_print_value_fields): Expand parameter offset to LONGEST. (pascal_object_print_value): Likewise. Expand boffset, thisoffset to LONGEST. * ppc-linux-nat.c (check_condition): Expand parameter len to ULONGEST *. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Expand argoffset, structoffset, len, i, nelt to ULONGEST. (do_ppc_sysv_return_value): Expand i, nelt, offset to ULONGEST. (ppc64_sysv_abi_push_dummy_call): Expand len to ULONGEST. (ppc64_sysv_abi_return_value): Expand n_regs, i, offset to ULONGEST. * printcmd.c (print_formatted): Expand len to ULONGEST. (float_type_from_length): Likewise. (print_scalar_formatted): Likewise. * python/py-prettyprint.c (apply_val_pretty_printer): Expand parameter embedded_offset to LONGEST. * python/python.h (apply_val_pretty_printer): Likewise. * regcache.c (regcache_xfer_part): Expand parameter offset to LONGEST. (regcache_cooked_read_part): Likewise. (regcache_cooked_write_part): Likewise. * regcache.h (regcache_cooked_read_part): Likewise. (regcache_cooked_write_part): Likewise. * remote.c (remote_write_bytes_aux): Expand parameter len to LONGEST. (remote_write_bytes): Likewise. (remote_region_ok_for_hw_watchpoint): Likewise. * rl78-tdep.c (rl78_push_dummy_call): Expand len, container_len to ULONGEST. * rs6000-aix-tdep.c (rs6000_push_dummy_call): Expand len to ULONGEST. (ran_out_of_registers_for_arguments): Expand space, jj to ULONGEST. * s390-tdep.c (s390_value_from_register): Eliminate single use variable len. (s390_function_arg_pass_by_reference): Likewise. (s390_function_arg_float): Eliminate single-use variable length. (s390_push_dummy_call): Likewise. Expand length to ULONGEST. (s390_frame_align): Eliminate single-us variable length. (s390_return_value): Expand length to ULONGEST. * score-tdep.c (score_push_dummy_call): Expand arglen to ULONGEST. * sh-tdep.c (sh_extract_return_value_nofpu): Epand len to ULONGEST. (sh_store_return_value_nofpu): Likewise. * sh64-tdep.c (sh64_push_dummy_call): Expand stack_offset, stack_alloc, len to ULONGEST. (sh64_extract_return_value): Expand len to ULONGEST. (sh64_store_return_value): Likewise. * sparc-tdep.c (sparc32_store_arguments): Likewise. * sparc64-tdep.c (sparc64_store_floating_fields): Expand parameter bitpos to LONGEST. Expand subpos to LONGEST. (sparc64_extract_floating_fields): Likewise. (sparc64_store_arguments): Expand len to ULONGEST. * spu-tdep.c (spu_value_from_register): Likewise. * stack.c (read_frame_arg): Expand len, len_deref to ULONGEST. (print_frame_args): Expand current_offset, arg_size to ULONGEST. * symfile-mem.c (symfile_target_read_memory): New function. Wrap around target_read_memory. (symbol_file_add_from_memory): Use symfile_target_read_memory. * symmisc.c (print_symbol): Expand i to ULONGEST. Use pulongest to format print TYPE_LENGTH. * target.c (target_read_memory): Expand parameter len to LONGEST. (target_read_stack): Likewise. (target_write_memory): Likewise. (target_write_raw_memory): Likewise. (default_region_ok_for_hw_watchpoint): Likewise. (debug_to_region_ok_for_hw_watchpoint): Likewise. * target.h (struct target_ops): Expand parameter len to LONGEST for to_region_ok_for_hw_watchpoint. (target_read_memory): Expand parameter len to LONGEST. (target_read_stack): Likewise. (target_write_memory): Likewise. (target_write_raw_memory): Likewise. * tracepoint.c (collect_symbol): Expand len to ULONGEST. (encode_actions_1): Make addr as CORE_ADDR. Expand len to ULONGEST. (scope_info): Expand j to ULONGEST. Use pulongest to format print TYPE_LENGTH. * typeprint.c (whatis_exp): Expand top to LONGEST. * v850-tdep.c (v850_push_dummy_call): Expand len to ULONGEST. (v850_extract_return_value): Expand len to LONGEST. (v850_store_return_value): Expand len to ULONGEST. * valarith.c (value_subscripted_rvalue): Expand elt_size, elt_offs to ULONGEST. (value_binop): Expand len to LONGEST. (value_logical_not): Expand len1, len2 to LONGEST. * valops.c (value_allocate_space_in_inferior): Expand parameter len to ULONGEST. Use value_from_ulongest to get the value for len. (value_cast_structs): Expand top to LONGEST. (value_cast): Expand val_length, element_length to ULONGEST. (dynamic_cast_check_1): Expand parameter embedded_offset to LONGEST. Expand offset to LONGEST. (dynamic_cast_check_2): Likewise. (value_dynamic_cast): Expand top to LONGEST. (value_fetch_lazy): Expand length to ULONGEST. (read_value_memory): Expand parameter length to ULONGEST. (value_assign): Expand changed_len to ULONGEST. Expand offset to LONGEST. (value_array): Expand typelength to ULONGEST. (search_struct_field): Expand parameter offset to LONGEST. Expand new_offset, boffset to LONGEST. (search_struct_method): Expand parameter offset to LONGEST. Expand base_offset, this_offset to LONGEST. (find_method_list): Expand parameter offset to LONGEST, parameter boffset to LONGEST *. Expand base_offset to LONGEST. (value_find_oload_method_list): Expand parameter boffset to LONGEST *. (find_overload_match): Expand boffset to LONGEST. (value_struct_elt_for_reference): Expand parameter offset to LONGEST. Expand base_offset to LONGEST. (value_rtti_indirect_type): Expand parameter top to LONGEST *. (value_full_object): Expand parameter xtop to LONGEST. Expand top to LONGEST. * valprint.c (valprint_check_validity): Expand parameter embedded_offset to LONGEST. (generic_val_print): Likewise. (val_print): Likewise. (val_print_scalar_formatted): Likewise. (print_hex_chars): Expand parameter len to ULONGEST. (val_print_array_elements): Expand parameter embedded_offset to LONGEST. Expand len, eltlen to ULONGEST. (generic_printstr): Expand parameter length to ULONGEST. * valprint.h (val_print_array_elements): Expand parameter embedded_offset to LONGEST. (val_print_scalar_formatted): Likewise. (print_hex_chars): Expand parameter len to ULONGEST. (generic_val_print): Expand parameter embedded_offset to LONGEST. (generic_printstr): Expand parameter length to ULONGEST. * value.c (struct range): Expand member offset to LONGEST. Expand member length to ULONGEST. (ranges_overlap): Expand parameters offset1, offset2 to LONGEST. Expand parameters len1, len2 to ULONGEST. (range_contain): Expand parameter offset to LONGEST. Expand parameter length to ULONGEST. (struct value): Expand members offset, embedded_offset, pointed_to_offset to LONGEST. (value_bytes_available): Expand parameter offset to LONGEST, parameter length to ULONGEST. (mark_value_bytes_unavailable): Likewise. (find_first_range_overlap): Likewise. (value_available_contents_eq): Expand parameters offset1, offset2 to LONGEST. Expand parameter length to ULONGEST. (value_offset): Return LONGEST. (set_value_offset): Expand parameter offset to LONGEST. (value_contents_copy_raw): Expand parameters src_offset, dst_offset to LONGEST. Expand parameters length to ULONGEST. (value_contents_copy): Likewise. (value_contents_equal): Expand len to ULONGEST. (value_bits_valid): Expand parameter offset to LONGEST, length to ULONGEST. (value_bits_synthetic_pointer): Likewise. (value_embedded_offset): Return LONGEST. (set_value_embedded_offset): Expand parameter val to LONGEST. (value_pointed_to_offset): Return LONGEST. (set_value_pointed_to_offset): Expand parameter val to LONGEST. (set_internalvar_component): Expand parameter offset to LONGEST. (value_primitive_field): Likewise. Expand bitpos, boffset to LONGEST, container_bitpos to ULONGEST. (value_fn_field): Expand parameter offset to LONGEST. (unpack_value_bits_as_long_1): Expand parameters embedded_offset, bitpos to LONGEST. Expand read_offset to LONGEST. (unpack_value_bits_as_long): Expand parameter embeded_offset to LONGEST. (unpack_value_field_as_long_1): Likewise. Expand bitpos to LONGEST. (unpack_value_field_as_long): Expand parameter embedded_offset to LONGEST. (value_field_bitfield): Likewise. (modify_field): Expand parameter bitpos to LONGEST. Expand bytesize to ULONGEST. * value.h (value_offset): Return LONGEST. (set_value_offset): Expand parameter offset to LONGEST. (value_pointed_to_offset): Return LONGEST. (set_value_pointed_to_offset): Expand parameter val to LONGEST. (value_embedded_offset): Return LONGEST. (set_value_embedded_offset): Expand parameter val to LONGEST. (struct lval_funcs): Expand parameter offset to LONGEST, length to ULONGEST for check_validity. Likewise for check_synthetic_pointer. (valprint_check_validity): Expand parameter embedded_offset to LONGEST. (value_bits_valid): Expand parameter offset to LONGEST, length to ULONGEST. (value_bits_synthetic_pointer): Likewise. (mark_value_bytes_unavailable): Expand parameter offset to LONGEST, parameter length to ULONGEST. (value_available_contents_eq): Expand parameters offset1, offset2 to LONGEST. Expand parameter length to ULONGEST. (read_value_memory): Expand parameter length to ULONGEST. (unpack_value_bits_as_long): Expand parameter embeded_offset to LONGEST. (unpack_value_field_as_long): Likewise. (value_field_bitfield): Likewise. (value_contents_copy_raw): Expand parameters src_offset, dst_offset to LONGEST. Expand parameters length to ULONGEST. (value_contents_copy): Likewise. (value_find_oload_method_list): Expand parameter boffset to LONGEST *. (value_primitive_field): Expand parameter offset to LONGEST. (value_rtti_indirect_type): Expand parameter top to LONGEST *. (value_full_object): Expand parameter xtop to LONGEST. (set_internalvar_component): Expand parameter offset to LONGEST. (value_fn_field): Expand parameter offset to LONGEST. (modify_field): Expand parameter bitpos to LONGEST. (val_print): Expand parameter embedded_offset to LONGEST. (value_allocate_space_in_inferior): Expand parameter len to ULONGEST. * vax-tdep.c (vax_store_arguments): Expand count, len to ULONGEST. (vax_return_value): Expand len to ULONGEST. * xstormy16-tdep.c (xstormy16_extract_return_value): Expand len, i to ULONGEST. (xstormy16_store_return_value): Likewise. (xstormy16_push_dummy_call): Expand j to LONGEST, typelen to ULONGEST. (xstormy16_push_dummy_call): * xtensa-tdep.c (xtensa_extract_return_value): Expand len to ULONGEST. Use pulongest to format print len. (xtensa_store_return_value): Likewise. (xtensa_push_dummy_call): Expand size, onstack_size, length to ULONGEST. Expand offset to LONGEST. Use pulongest to format print TYPE_LENGTH. testsuite/ChangeLog: 2012-05-04 Siddhesh Poyarekar * gdb.base/structs-longest-bitpos.c: New test case. * gdb.base/structs-longest-bitpos.exp: New test case.