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