This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, This is the main patch that expands bitpos and type.length to LONGEST and ULONGEST respectively. The change from the earlier patch is that I have identified additional expansions based on the splint report and I have reverted the expansion in the LEN argument for insert/remove watchpoints since it's not necessary. I have verified that the change does not introduce any regressions on x86_64. This change has a couple of test cases too that pass after this change. Regards, Siddhesh
Attachment:
bitpos-cl-main.txt
Description: Text document
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 9b474f7..4845fcc 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -469,7 +469,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, const struct value_print_options *options) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (elttype)); - unsigned int i; + ULONGEST i; unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; @@ -484,9 +484,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, { /* Position of the character we are examining to see whether it is repeated. */ - unsigned int rep1; + ULONGEST rep1; /* Number of repetitions we have detected so far. */ - unsigned int reps; + ULONGEST reps; QUIT; @@ -520,7 +520,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); fputs_filtered ("'", stream); - fprintf_filtered (stream, _(" <repeats %u times>"), reps); + fprintf_filtered (stream, _(" <repeats %s times>"), + pulongest (reps)); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 9dd64fe..7a6f38d 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -299,18 +299,18 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int i; - int accumulate_size = struct_return ? 8 : 0; + ssize_t accumulate_size = struct_return ? 8 : 0; struct alpha_arg { const gdb_byte *contents; - LONGEST len; - int offset; + ssize_t len; + ssize_t offset; }; struct alpha_arg *alpha_args = (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg)); struct alpha_arg *m_arg; gdb_byte arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS]; - int required_arg_regs; + ssize_t required_arg_regs; CORE_ADDR func_addr = find_function_addr (function, NULL); /* The ABI places the address of the called function in T12. */ @@ -423,8 +423,8 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (i = nargs; m_arg--, --i >= 0;) { const gdb_byte *contents = m_arg->contents; - int offset = m_arg->offset; - LONGEST len = m_arg->len; + ssize_t offset = m_arg->offset; + ssize_t len = m_arg->len; /* Copy the bytes destined for registers into arg_reg_buffer. */ if (offset < sizeof(arg_reg_buffer)) @@ -436,7 +436,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, } else { - int tlen = sizeof(arg_reg_buffer) - offset; + ssize_t tlen = sizeof(arg_reg_buffer) - offset; memcpy (arg_reg_buffer + offset, contents, tlen); offset += tlen; contents += tlen; diff --git a/gdb/annotate.c b/gdb/annotate.c index cd0a94a..9fd649a 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -522,21 +522,21 @@ annotate_frame_end (void) } void -annotate_array_section_begin (int idx, struct type *elttype) +annotate_array_section_begin (LONGEST idx, struct type *elttype) { if (annotation_level == 2) { - printf_filtered (("\n\032\032array-section-begin %d "), idx); + printf_filtered (("\n\032\032array-section-begin %s "), plongest (idx)); print_value_flags (elttype); printf_filtered (("\n")); } } void -annotate_elt_rep (unsigned int repcount) +annotate_elt_rep (ULONGEST repcount) { if (annotation_level == 2) - printf_filtered (("\n\032\032elt-rep %u\n"), repcount); + printf_filtered (("\n\032\032elt-rep %s\n"), pulongest (repcount)); } void diff --git a/gdb/annotate.h b/gdb/annotate.h index 0eae524..cd50a65 100644 --- a/gdb/annotate.h +++ b/gdb/annotate.h @@ -94,8 +94,8 @@ extern void annotate_frame_source_end (void); extern void annotate_frame_where (void); extern void annotate_frame_end (void); -extern void annotate_array_section_begin (int, struct type *); -extern void annotate_elt_rep (unsigned int); +extern void annotate_array_section_begin (LONGEST, struct type *); +extern void annotate_elt_rep (ULONGEST); extern void annotate_elt_rep_end (void); extern void annotate_elt (void); extern void annotate_array_section_end (void); diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 66cfdc2..a401c00 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3377,7 +3377,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) array). Vectors and complex types are not currently supported, matching the generic AAPCS support. */ -static int +static LONGEST arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { @@ -3408,7 +3408,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_ARRAY: { - int count; + LONGEST count; unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), base_type); if (count == -1) @@ -3433,8 +3433,10 @@ arm_vfp_cprc_sub_candidate (struct type *t, int i; for (i = 0; i < TYPE_NFIELDS (t); i++) { - int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), - base_type); + LONGEST sub_count; + + sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), + base_type); if (sub_count == -1) return -1; count += sub_count; @@ -3454,13 +3456,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_UNION: { - int count = 0; + LONGEST count = 0; unsigned unitlen; int i; for (i = 0; i < TYPE_NFIELDS (t); i++) { - int sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), - base_type); + LONGEST sub_count; + + sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), + base_type); if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); @@ -3496,7 +3500,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; - int c = arm_vfp_cprc_sub_candidate (t, &b); + LONGEST c = arm_vfp_cprc_sub_candidate (t, &b); if (c <= 0 || c > 4) return 0; *base_type = b; diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index e138699..b9a660a 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -905,7 +905,7 @@ avr_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) { - LONGEST i; + int i; /* Single byte are returned in r24. Otherwise, the MSB of the return value is always in r25, calculate which register holds the LSB. */ @@ -1170,14 +1170,14 @@ avr_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) struct stack_item { - int len; + ssize_t len; struct stack_item *prev; void *data; }; static struct stack_item * push_stack_item (struct stack_item *prev, const bfd_byte *contents, - LONGEST len) + ssize_t len) { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); @@ -1267,7 +1267,7 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (i = 0; i < nargs; i++) { LONGEST last_regnum; - int j; + LONGEST j; struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const bfd_byte *contents = value_contents (arg); diff --git a/gdb/ax-general.c b/gdb/ax-general.c index 6ea6f14..8e26ec4 100644 --- a/gdb/ax-general.c +++ b/gdb/ax-general.c @@ -192,7 +192,7 @@ ax_zero_ext (struct agent_expr *x, int n) /* Append a trace_quick instruction to EXPR, to record N bytes. */ void -ax_trace_quick (struct agent_expr *x, int n) +ax_trace_quick (struct agent_expr *x, LONGEST n) { /* N must fit in a byte. */ if (n < 0 || n > 255) diff --git a/gdb/ax.h b/gdb/ax.h index 368f727..9c904af 100644 --- a/gdb/ax.h +++ b/gdb/ax.h @@ -190,7 +190,7 @@ extern void ax_ext (struct agent_expr *EXPR, int N); extern void ax_zero_ext (struct agent_expr *EXPR, int N); /* Append a trace_quick instruction to EXPR, to record N bytes. */ -extern void ax_trace_quick (struct agent_expr *EXPR, int N); +extern void ax_trace_quick (struct agent_expr *EXPR, LONGEST N); /* Append a goto op to EXPR. OP is the actual op (must be aop_goto or aop_if_goto). We assume we don't know the target offset yet, diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 6b55cb1..8bc329e 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -360,7 +360,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, } else if (i == TYPE_VPTR_FIELDNO (type)) { - int i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8; + LONGEST i_offset = offset + TYPE_FIELD_BITPOS (type, i) / 8; struct type *i_type = TYPE_FIELD_TYPE (type, i); if (valprint_check_validity (stream, i_type, i_offset, val)) diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index b011ec8..abbcbf1 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -670,13 +670,13 @@ static CORE_ADDR cris_unwind_sp (struct gdbarch *gdbarch, struct stack_item { - int len; + ssize_t len; struct stack_item *prev; void *data; }; static struct stack_item * -push_stack_item (struct stack_item *prev, void *contents, LONGEST len) +push_stack_item (struct stack_item *prev, void *contents, ssize_t len) { struct stack_item *si; si = xmalloc (sizeof (struct stack_item)); diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 9f772b0..ad12e37 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -1714,7 +1714,7 @@ static void write_pieced_value (struct value *to, struct value *from) { int i; - long offset = 0; + LONGEST offset = 0; ULONGEST bits_to_skip; const gdb_byte *contents; struct piece_closure *c @@ -1895,7 +1895,7 @@ check_pieced_value_bits (const struct value *value, LONGEST bit_offset, for (i = 0; i < c->n_pieces && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; - size_t this_size_bits = p->size; + ULONGEST this_size_bits = p->size; if (bit_offset > 0) { diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index da8678b..84e0059 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -9844,7 +9844,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, the field itself. The result is the bit offset of the LSB of the field. */ LONGEST anonymous_size; - int bit_offset = DW_UNSND (attr); + LONGEST bit_offset = DW_UNSND (attr); attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 8dc989c..a422ac2 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -170,7 +170,7 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, const struct value_print_options *options, int *elts) { - int i; + LONGEST i; if (nss != ndimensions) { diff --git a/gdb/frame.c b/gdb/frame.c index 278269d..fdd46e7 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1111,7 +1111,7 @@ frame_register_read (struct frame_info *frame, int regnum, int get_frame_register_bytes (struct frame_info *frame, int regnum, - CORE_ADDR offset, int len, gdb_byte *myaddr, + CORE_ADDR offset, LONGEST len, gdb_byte *myaddr, int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -1140,7 +1140,7 @@ get_frame_register_bytes (struct frame_info *frame, int regnum, } if (len > maxsize) error (_("Bad debug information detected: " - "Attempt to read %d bytes from registers."), len); + "Attempt to read %s bytes from registers."), plongest (len)); /* Copy the data. */ while (len > 0) diff --git a/gdb/frame.h b/gdb/frame.h index 532fb26..8d88432 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -530,7 +530,7 @@ extern void put_frame_register (struct frame_info *frame, int regnum, contents are optimized out or unavailable, set *OPTIMIZEDP, *UNAVAILABLEP accordingly. */ extern int get_frame_register_bytes (struct frame_info *frame, int regnum, - CORE_ADDR offset, int len, + CORE_ADDR offset, LONGEST len, gdb_byte *myaddr, int *optimizedp, int *unavailablep); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index d6386d0..9479098 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -953,7 +953,7 @@ create_array_type (struct type *result_type, struct type * lookup_array_range_type (struct type *element_type, - int low_bound, int high_bound) + LONGEST low_bound, LONGEST high_bound) { struct gdbarch *gdbarch = get_type_arch (element_type); struct type *index_type = builtin_type (gdbarch)->builtin_int; @@ -989,7 +989,7 @@ create_string_type (struct type *result_type, struct type * lookup_string_range_type (struct type *string_char_type, - int low_bound, int high_bound) + LONGEST low_bound, LONGEST high_bound) { struct type *result_type; diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index b7d53ba..ee5aa2d 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -744,7 +744,7 @@ h8300_extract_return_value (struct type *type, struct regcache *regcache, { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); ULONGEST c, addr; switch (len) @@ -781,7 +781,7 @@ h8300h_extract_return_value (struct type *type, struct regcache *regcache, { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); ULONGEST c; switch (len) @@ -848,7 +848,7 @@ h8300_store_return_value (struct type *type, struct regcache *regcache, { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); ULONGEST val; switch (len) @@ -878,7 +878,7 @@ h8300h_store_return_value (struct type *type, struct regcache *regcache, { struct gdbarch *gdbarch = get_regcache_arch (regcache); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); ULONGEST val; switch (len) diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index e3537cb..19917ad 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -2591,7 +2591,7 @@ i386_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION @@ -3043,7 +3043,7 @@ static int i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); /* Values may be spread across multiple registers. Most debugging formats aren't expressive enough to specify the locations, so @@ -3076,7 +3076,7 @@ i386_register_to_value (struct frame_info *frame, int regnum, int *optimizedp, int *unavailablep) { struct gdbarch *gdbarch = get_frame_arch (frame); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); if (i386_fp_regnum_p (gdbarch, regnum)) return i387_register_to_value (frame, regnum, type, to, @@ -3112,7 +3112,7 @@ static void i386_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); if (i386_fp_regnum_p (get_frame_arch (frame), regnum)) { diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 5390c12..4af53a4 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -3231,7 +3231,7 @@ ia64_extract_return_value (struct type *type, struct regcache *regcache, char from[MAX_REGISTER_SIZE]; int offset = 0; int regnum = IA64_FR8_REGNUM; - int n = TYPE_LENGTH (type) / TYPE_LENGTH (float_elt_type); + LONGEST n = TYPE_LENGTH (type) / TYPE_LENGTH (float_elt_type); while (n-- > 0) { diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 0c9d394..f52ef56 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -107,7 +107,7 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, ULONGEST length, const char *encoding, int force_ellipses, const struct value_print_options *options) { - unsigned int i; + ULONGEST i; unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; @@ -122,9 +122,9 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, { /* Position of the character we are examining to see whether it is repeated. */ - unsigned int rep1; + ULONGEST rep1; /* Number of repetitions we have detected so far. */ - unsigned int reps; + ULONGEST reps; QUIT; @@ -153,7 +153,7 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, in_quotes = 0; } m2_printchar (string[i], type, stream); - fprintf_filtered (stream, " <repeats %u times>", reps); + fprintf_filtered (stream, " <repeats %s times>", pulongest (reps)); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 47600a2..f553139 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1291,7 +1291,7 @@ static void m68hc11_extract_return_value (struct type *type, struct regcache *regcache, void *valbuf) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); char buf[M68HC11_REG_SIZE]; regcache_raw_read (regcache, HARD_D_REGNUM, buf); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 0d8b3fd..5b3fd26 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -386,7 +386,7 @@ m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); enum type_code code = TYPE_CODE (type); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); gdb_assert (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION || code == TYPE_CODE_COMPLEX); diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index ec27ed7..c990d6b 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -259,7 +259,7 @@ m88k_store_arguments (struct regcache *regcache, int nargs, struct value **args, CORE_ADDR sp) { struct gdbarch *gdbarch = get_regcache_arch (regcache); - LONGEST num_register_words = 0; + int num_register_words = 0; LONGEST num_stack_words = 0; int i; @@ -308,8 +308,8 @@ m88k_store_arguments (struct regcache *regcache, int nargs, { const bfd_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); - int len = TYPE_LENGTH (type); - int stack_word = num_stack_words; + LONGEST len = TYPE_LENGTH (type); + LONGEST stack_word = num_stack_words; if (m88k_in_register_p (type)) { diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index d1ab58e..4eb91b6 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -4643,7 +4643,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int argreg; int float_argreg; int argnum; - int len = 0; + LONGEST len = 0; int stack_offset = 0; enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); CORE_ADDR func_addr = find_function_addr (function, NULL); @@ -5030,7 +5030,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch, struct value *function, /* A composite type. Extract the left justified value, regardless of the byte order. I.e. DO NOT USE mips_xfer_lower. */ - int offset; + LONGEST offset; int regnum; for (offset = 0, regnum = MIPS_V0_REGNUM; offset < TYPE_LENGTH (type); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 7de7aac..51a7de8 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -171,7 +171,7 @@ static void mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); int reg, regsz; if (TYPE_CODE (type) == TYPE_CODE_PTR) @@ -192,7 +192,8 @@ mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type, } else internal_error (__FILE__, __LINE__, - _("Cannot store return value %d bytes long."), len); + _("Cannot store return value %s bytes long."), + plongest (len)); } static void @@ -200,7 +201,7 @@ mn10300_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf) { char buf[MAX_REGISTER_SIZE]; - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); int reg, regsz; if (TYPE_CODE (type) == TYPE_CODE_PTR) @@ -224,7 +225,8 @@ mn10300_extract_return_value (struct gdbarch *gdbarch, struct type *type, } else internal_error (__FILE__, __LINE__, - _("Cannot extract return value %d bytes long."), len); + _("Cannot extract return value %s bytes long."), + plongest (len)); } /* Determine, for architecture GDBARCH, how a return value of TYPE diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 9f25d14..6f2876c 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -351,7 +351,7 @@ objc_printstr (struct ui_file *stream, struct type *type, const char *encoding, int force_ellipses, const struct value_print_options *options) { - unsigned int i; + ULONGEST i; unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; @@ -372,9 +372,9 @@ objc_printstr (struct ui_file *stream, struct type *type, { /* Position of the character we are examining to see whether it is repeated. */ - unsigned int rep1; + ULONGEST rep1; /* Number of repetitions we have detected so far. */ - unsigned int reps; + ULONGEST reps; QUIT; @@ -403,7 +403,7 @@ objc_printstr (struct ui_file *stream, struct type *type, in_quotes = 0; } objc_printchar (string[i], type, stream); - fprintf_filtered (stream, " <repeats %u times>", reps); + fprintf_filtered (stream, " <repeats %s times>", pulongest (reps)); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 69833b5..d41f13b 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -250,9 +250,9 @@ lval_func_check_validity (const struct value *v, LONGEST offset, /* Size of the target type in bits. */ LONGEST elsize = TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; - int startrest = offset % elsize; + LONGEST startrest = offset % elsize; LONGEST start = offset / elsize; - int endrest = (offset + length) % elsize; + LONGEST endrest = (offset + length) % elsize; LONGEST end = (offset + length) / elsize; LONGEST i; @@ -264,8 +264,8 @@ lval_func_check_validity (const struct value *v, LONGEST offset, for (i = start; i < end; i++) { - int comp_offset = (i == start) ? startrest : 0; - int comp_length = (i == end) ? endrest : elsize; + LONGEST comp_offset = (i == start) ? startrest : 0; + LONGEST comp_length = (i == end) ? endrest : elsize; if (!value_bits_valid (c->val, c->indices[i] * elsize + comp_offset, comp_length)) @@ -304,9 +304,9 @@ lval_func_check_synthetic_pointer (const struct value *v, /* Size of the target type in bits. */ LONGEST elsize = TYPE_LENGTH (TYPE_TARGET_TYPE (check_typedef (value_type (c->val)))) * 8; - int startrest = offset % elsize; + LONGEST startrest = offset % elsize; LONGEST start = offset / elsize; - int endrest = (offset + length) % elsize; + LONGEST endrest = (offset + length) % elsize; LONGEST end = (offset + length) / elsize; LONGEST i; @@ -318,8 +318,8 @@ lval_func_check_synthetic_pointer (const struct value *v, for (i = start; i < end; i++) { - int comp_offset = (i == start) ? startrest : 0; - int comp_length = (i == end) ? endrest : elsize; + LONGEST comp_offset = (i == start) ? startrest : 0; + LONGEST comp_length = (i == end) ? endrest : elsize; if (!value_bits_synthetic_pointer (c->val, c->indices[i] * elsize + comp_offset, diff --git a/gdb/p-lang.c b/gdb/p-lang.c index b72f5c4..bbdfbf9 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -222,7 +222,7 @@ pascal_printstr (struct ui_file *stream, struct type *type, const struct value_print_options *options) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); - unsigned int i; + ULONGEST i; unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; @@ -250,9 +250,9 @@ pascal_printstr (struct ui_file *stream, struct type *type, { /* Position of the character we are examining to see whether it is repeated. */ - unsigned int rep1; + ULONGEST rep1; /* Number of repetitions we have detected so far. */ - unsigned int reps; + ULONGEST reps; unsigned long int current_char; QUIT; @@ -287,7 +287,7 @@ pascal_printstr (struct ui_file *stream, struct type *type, in_quotes = 0; } pascal_printchar (current_char, type, stream); - fprintf_filtered (stream, " <repeats %u times>", reps); + fprintf_filtered (stream, " <repeats %s times>", pulongest (reps)); i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index bdbcfd3..3547d3f 100644 --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -69,7 +69,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function, enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); int opencl_abi = ppc_sysv_use_opencl_abi (value_type (function)); ULONGEST saved_sp; - int argspace = 0; /* 0 is an initial wrong guess. */ + LONGEST argspace = 0; /* 0 is an initial wrong guess. */ int write_pass; gdb_assert (tdep->wordsize == 4); @@ -1557,14 +1557,14 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, } else { - int byte; + LONGEST byte; for (byte = 0; byte < TYPE_LENGTH (type); byte += tdep->wordsize) { if (write_pass && greg <= 10) { gdb_byte regval[MAX_REGISTER_SIZE]; - int len = TYPE_LENGTH (type) - byte; + LONGEST len = TYPE_LENGTH (type) - byte; if (len > tdep->wordsize) len = tdep->wordsize; memset (regval, 0, sizeof regval); diff --git a/gdb/regcache.c b/gdb/regcache.c index 12ed8fa..800b660 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -902,7 +902,7 @@ typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum, static enum register_status regcache_xfer_part (struct regcache *regcache, int regnum, - LONGEST offset, int len, void *in, const void *out, + LONGEST offset, LONGEST len, void *in, const void *out, enum register_status (*read) (struct regcache *regcache, int regnum, gdb_byte *buf), @@ -946,7 +946,7 @@ regcache_xfer_part (struct regcache *regcache, int regnum, enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, - int offset, int len, gdb_byte *buf) + int offset, LONGEST len, gdb_byte *buf) { struct regcache_descr *descr = regcache->descr; @@ -957,7 +957,7 @@ regcache_raw_read_part (struct regcache *regcache, int regnum, void regcache_raw_write_part (struct regcache *regcache, int regnum, - int offset, int len, const gdb_byte *buf) + int offset, LONGEST len, const gdb_byte *buf) { struct regcache_descr *descr = regcache->descr; @@ -968,7 +968,7 @@ regcache_raw_write_part (struct regcache *regcache, int regnum, enum register_status regcache_cooked_read_part (struct regcache *regcache, int regnum, - LONGEST offset, int len, gdb_byte *buf) + LONGEST offset, LONGEST len, gdb_byte *buf) { struct regcache_descr *descr = regcache->descr; @@ -979,7 +979,7 @@ regcache_cooked_read_part (struct regcache *regcache, int regnum, void regcache_cooked_write_part (struct regcache *regcache, int regnum, - LONGEST offset, int len, const gdb_byte *buf) + LONGEST offset, LONGEST len, const gdb_byte *buf) { struct regcache_descr *descr = regcache->descr; diff --git a/gdb/regcache.h b/gdb/regcache.h index 81ccda6..44ba350 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -90,9 +90,9 @@ extern void regcache_raw_write_unsigned (struct regcache *regcache, extern enum register_status regcache_raw_read_part (struct regcache *regcache, int regnum, - int offset, int len, gdb_byte *buf); + int offset, LONGEST len, gdb_byte *buf); void regcache_raw_write_part (struct regcache *regcache, int regnum, - int offset, int len, const gdb_byte *buf); + int offset, LONGEST len, const gdb_byte *buf); void regcache_invalidate (struct regcache *regcache, int regnum); @@ -130,9 +130,10 @@ extern void regcache_cooked_write_unsigned (struct regcache *regcache, enum register_status regcache_cooked_read_part (struct regcache *regcache, int regnum, LONGEST offset, - int len, gdb_byte *buf); + LONGEST len, gdb_byte *buf); void regcache_cooked_write_part (struct regcache *regcache, int regnum, - LONGEST offset, int len, const gdb_byte *buf); + LONGEST offset, LONGEST len, + const gdb_byte *buf); /* Special routines to read/write the PC. */ diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c index d13bfe6..37353f6 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -199,7 +199,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function, int ii; LONGEST len = 0; int argno; /* current argument number */ - int argbytes; /* current argument byte */ + LONGEST argbytes; /* current argument byte */ gdb_byte tmp_buffer[50]; int f_argno = 0; /* current floating point argno */ int wordsize = gdbarch_tdep (gdbarch)->wordsize; diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 671921d..8fa7b1b 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -2479,7 +2479,7 @@ is_float_like (struct type *type) static int -is_power_of_two (unsigned int n) +is_power_of_two (ULONGEST n) { return ((n & (n - 1)) == 0); } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index a2ebea8..00d7401 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -805,7 +805,7 @@ sh_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) static int sh_use_struct_convention (int renesas_abi, struct type *type) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); int nelem = TYPE_NFIELDS (type); /* The Renesas ABI returns aggregate types always on stack. */ @@ -907,7 +907,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp) /* Helper function to justify value in register according to endianess. */ static char * -sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, int len) +sh_justify_value_in_reg (struct gdbarch *gdbarch, struct value *val, LONGEST len) { static char valbuf[4]; @@ -1067,7 +1067,8 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, struct type *type; CORE_ADDR regval; char *val; - int len, reg_size = 0; + LONGEST len; + int reg_size = 0; int pass_on_stack = 0; int treat_as_flt; int last_reg_arg = INT_MAX; @@ -1208,7 +1209,8 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch, struct type *type; CORE_ADDR regval; char *val; - int len, reg_size = 0; + LONGEST len; + int reg_size = 0; int pass_on_stack = 0; int last_reg_arg = INT_MAX; @@ -1367,7 +1369,8 @@ sh_store_return_value_nofpu (struct type *type, struct regcache *regcache, } else { - int i, regnum = R0_REGNUM; + LONGEST i; + int regnum = R0_REGNUM; for (i = 0; i < len; i += 4) regcache_raw_write (regcache, regnum++, (char *) valbuf + i); } diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index e5e5b84..d632cd6 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -884,7 +884,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); int regnum = -1; gdb_byte buf[16]; @@ -1021,7 +1021,7 @@ static void sparc64_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *valbuf) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); gdb_byte buf[32]; int i; @@ -1071,7 +1071,7 @@ static void sparc64_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); gdb_byte buf[16]; int i; diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index f628d30..3bf5c95 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -1293,7 +1293,7 @@ static void spu_value_to_regcache (struct regcache *regcache, int regnum, struct type *type, const gdb_byte *in) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); if (spu_scalar_value_p (type)) { @@ -1318,7 +1318,7 @@ static void spu_regcache_to_value (struct regcache *regcache, int regnum, struct type *type, gdb_byte *out) { - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); if (spu_scalar_value_p (type)) { @@ -1373,8 +1373,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); const gdb_byte *contents = value_contents (arg); - int len = TYPE_LENGTH (type); - int n_regs = align_up (len, 16) / 16; + LONGEST n_regs = align_up (TYPE_LENGTH (type), 16) / 16; /* If the argument doesn't wholly fit into registers, it and all subsequent arguments go to the stack. */ @@ -1406,7 +1405,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { struct value *arg = args[i]; struct type *type = check_typedef (value_type (arg)); - int len = TYPE_LENGTH (type); + LONGEST len = TYPE_LENGTH (type); int preferred_slot; if (spu_scalar_value_p (type)) diff --git a/gdb/stack.c b/gdb/stack.c index 12e3704..9ab981c 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -173,7 +173,7 @@ print_stack_frame (struct frame_info *frame, int print_level, argument (not just the first nameless argument). */ static void -print_frame_nameless_args (struct frame_info *frame, long start, int num, +print_frame_nameless_args (struct frame_info *frame, LONGEST start, int num, int first, struct ui_file *stream) { struct gdbarch *gdbarch = get_frame_arch (frame); @@ -496,7 +496,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, /* Offset of next stack argument beyond the one we have seen that is at the highest offset, or -1 if we haven't come to a stack argument yet. */ - long highest_offset = -1; + LONGEST highest_offset = -1; /* Number of ints of arguments that we have printed so far. */ int args_printed = 0; struct cleanup *old_chain; @@ -668,7 +668,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, enough about the stack to find them. */ if (num != -1) { - long start; + LONGEST start; if (highest_offset == -1) start = gdbarch_frame_args_skip (get_frame_arch (frame)); diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index 1fefcf3..8309d58 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -916,7 +916,6 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { int argreg = 0; int argnum; - int len = 0; int stack_offset = 4; int references_offset = 4; CORE_ADDR func_addr = find_function_addr (function, NULL); @@ -952,7 +951,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* Now make space on the stack for the args. */ for (argnum = 0; argnum < nargs; argnum++) { - int len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4); + LONGEST len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4); if (argnum >= 10 - argreg) references_offset += len; stack_offset += len; @@ -971,7 +970,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function, const gdb_byte *val; struct value *arg = args[argnum]; struct type *arg_type = check_typedef (value_type (arg)); - int len = TYPE_LENGTH (arg_type); + LONGEST len = TYPE_LENGTH (arg_type); enum type_code typecode = TYPE_CODE (arg_type); val = value_contents (arg); diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index 9ec3aaa..fc1da14 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -218,8 +218,8 @@ static void tilegx_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *valbuf) { - int len = TYPE_LENGTH (type); - int i, regnum = TILEGX_R0_REGNUM; + LONGEST i, len = TYPE_LENGTH (type); + int regnum = TILEGX_R0_REGNUM; for (i = 0; i < len; i += tilegx_reg_size) regcache_raw_read (regcache, regnum++, valbuf + i); @@ -243,8 +243,8 @@ tilegx_store_return_value (struct type *type, struct regcache *regcache, } else { - int len = TYPE_LENGTH (type); - int i, regnum = TILEGX_R0_REGNUM; + LONGEST i, len = TYPE_LENGTH (type); + int regnum = TILEGX_R0_REGNUM; for (i = 0; i < len; i += tilegx_reg_size) regcache_raw_write (regcache, regnum++, (gdb_byte *) valbuf + i); @@ -291,7 +291,8 @@ tilegx_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR stack_dest = sp; int argreg = TILEGX_R0_REGNUM; int i, j; - int typelen, slacklen, alignlen; + LONGEST typelen; + int slacklen, alignlen; static const gdb_byte two_zero_words[8] = { 0 }; /* If struct_return is 1, then the struct return address will diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 264e174..3bfac74 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -934,13 +934,13 @@ add_register (struct collection_list *collection, unsigned int regno) static void add_memrange (struct collection_list *memranges, int type, bfd_signed_vma base, - unsigned long len) + ULONGEST len) { if (info_verbose) { printf_filtered ("(%d,", type); printf_vma (base); - printf_filtered (",%ld)\n", len); + printf_filtered (",%s)\n", pulongest (len)); } /* type: memrange_absolute == memory, other n == basereg */ diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 4775ab6..d143bd0 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -834,7 +834,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch, in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { - int len; + LONGEST len; gdb_byte *val; gdb_byte valbuf[v850_reg_size]; diff --git a/gdb/valarith.c b/gdb/valarith.c index 113cfd8..0d4b5a9 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -1509,7 +1509,7 @@ value_strcmp (struct value *arg1, struct value *arg2) LONGEST len2 = TYPE_LENGTH (value_type (arg2)); const gdb_byte *s1 = value_contents (arg1); const gdb_byte *s2 = value_contents (arg2); - int i, len = len1 < len2 ? len1 : len2; + LONGEST i, len = len1 < len2 ? len1 : len2; for (i = 0; i < len; i++) { diff --git a/gdb/valops.c b/gdb/valops.c index f44e3b5..36fe229 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1128,7 +1128,7 @@ value_fetch_lazy (struct value *val) } void -read_value_memory (struct value *val, int embedded_offset, +read_value_memory (struct value *val, LONGEST embedded_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length) { @@ -1842,11 +1842,11 @@ value_array (int lowbound, int highbound, struct value **elemvec) } struct value * -value_cstring (char *ptr, int len, struct type *char_type) +value_cstring (char *ptr, LONGEST len, struct type *char_type) { struct value *val; int lowbound = current_language->string_lower_bound; - int highbound = len / TYPE_LENGTH (char_type); + LONGEST highbound = len / TYPE_LENGTH (char_type); struct type *stringtype = lookup_array_range_type (char_type, lowbound, highbound + lowbound - 1); @@ -1865,11 +1865,11 @@ value_cstring (char *ptr, int len, struct type *char_type) string may contain embedded null bytes. */ struct value * -value_string (char *ptr, int len, struct type *char_type) +value_string (char *ptr, LONGEST len, struct type *char_type) { struct value *val; int lowbound = current_language->string_lower_bound; - int highbound = len / TYPE_LENGTH (char_type); + LONGEST highbound = len / TYPE_LENGTH (char_type); struct type *stringtype = lookup_string_range_type (char_type, lowbound, highbound + lowbound - 1); @@ -1987,7 +1987,7 @@ typecmp (int staticp, int varargs, int nargs, static void update_search_result (struct value **result_ptr, struct value *v, - int *last_boffset, int boffset, + LONGEST *last_boffset, LONGEST boffset, const char *name, struct type *type) { if (v != NULL) @@ -2014,7 +2014,7 @@ static void do_search_struct_field (const char *name, struct value *arg1, LONGEST offset, struct type *type, int looking_for_baseclass, struct value **result_ptr, - int *last_boffset, + LONGEST *last_boffset, struct type *outermost_type) { int i; @@ -2187,7 +2187,7 @@ search_struct_field (const char *name, struct value *arg1, LONGEST offset, struct type *type, int looking_for_baseclass) { struct value *result = NULL; - int boffset = 0; + LONGEST boffset = 0; do_search_struct_field (name, arg1, offset, type, looking_for_baseclass, &result, &boffset, type); diff --git a/gdb/valprint.c b/gdb/valprint.c index 17b1316..dd1f88e 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1566,7 +1566,7 @@ val_print_array_elements (struct type *type, int recurse, const struct value *val, const struct value_print_options *options, - unsigned int i) + ULONGEST i) { unsigned int things_printed = 0; ULONGEST len; @@ -1574,9 +1574,9 @@ val_print_array_elements (struct type *type, ULONGEST eltlen; /* Position of the array element we are examining to see whether it is repeated. */ - unsigned int rep1; + ULONGEST rep1; /* Number of repetitions we have detected so far. */ - unsigned int reps; + ULONGEST reps; LONGEST low_bound, high_bound; elttype = TYPE_TARGET_TYPE (type); @@ -1647,7 +1647,7 @@ val_print_array_elements (struct type *type, address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); - fprintf_filtered (stream, " <repeats %u times>", reps); + fprintf_filtered (stream, " <repeats %s times>", pulongest (reps)); annotate_elt_rep_end (); i = rep1 - 1; diff --git a/gdb/valprint.h b/gdb/valprint.h index dc5d329..219608b 100644 --- a/gdb/valprint.h +++ b/gdb/valprint.h @@ -121,7 +121,7 @@ extern void val_print_array_elements (struct type *, const gdb_byte *, LONGEST, CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *, - unsigned int); + ULONGEST); extern void val_print_type_code_int (struct type *, const gdb_byte *, struct ui_file *); diff --git a/gdb/value.h b/gdb/value.h index 178628a..525f86d 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -480,7 +480,7 @@ extern int value_available_contents_eq (const struct value *val1, memory is likewise unavailable. STACK indicates whether the memory is known to be stack memory. */ -extern void read_value_memory (struct value *val, int embedded_offset, +extern void read_value_memory (struct value *val, LONGEST embedded_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length); @@ -589,9 +589,9 @@ extern struct value *value_mark (void); extern void value_free_to_mark (struct value *mark); -extern struct value *value_cstring (char *ptr, int len, +extern struct value *value_cstring (char *ptr, LONGEST len, struct type *char_type); -extern struct value *value_string (char *ptr, int len, +extern struct value *value_string (char *ptr, LONGEST len, struct type *char_type); extern struct value *value_bitstring (char *ptr, int len, struct type *index_type); diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index f6226d7..1f234e1 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -1883,7 +1883,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, if (info->onstack) { - int n = info->length; + LONGEST n = info->length; CORE_ADDR offset = sp + info->u.offset; /* Odd-sized structs are aligned to the lower side of a memory @@ -1899,7 +1899,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch, } else { - int n = info->length; + LONGEST n = info->length; const bfd_byte *cp = info->contents; int r = info->u.regno;
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |