summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorsiddhesh <siddhesh>2012-09-27 08:57:14 +0000
committersiddhesh <siddhesh>2012-09-27 08:57:14 +0000
commit7ac6308af5ea6b4583930da73a2c184e0bbccc98 (patch)
tree18f3d3b38374fbbb40fa49ebb665d531d55e5242 /gdb
parentd18178c13a938cd8a5e57475b5063fbe84aa02e4 (diff)
downloadgdb-7ac6308af5ea6b4583930da73a2c184e0bbccc98.tar.gz
* 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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/gdbtypes.c4
-rw-r--r--gdb/gdbtypes.h4
-rw-r--r--gdb/valops.c8
-rw-r--r--gdb/value.h4
5 files changed, 23 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 959e90db6c6..26aeafbca04 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+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
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 8ac87997065..149d31f3380 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -964,7 +964,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;
@@ -1000,7 +1000,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/gdbtypes.h b/gdb/gdbtypes.h
index 73fcbb19652..59a6a657415 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1526,11 +1526,11 @@ extern struct type *create_range_type (struct type *, struct type *, LONGEST,
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 *);
diff --git a/gdb/valops.c b/gdb/valops.c
index 75995ac9f6b..502fb0d1f07 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1838,11 +1838,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, 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);
@@ -1861,11 +1861,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, 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);
diff --git a/gdb/value.h b/gdb/value.h
index cfdf0851f5a..36859357493 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -587,9 +587,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_array (int lowbound, int highbound,