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 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * 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 <yao@codesourcery.com>
PR breakpoints/13898
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;
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;
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 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 *);
}
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);
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);
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_array (int lowbound, int highbound,