gdb: Update type of lower bound in value_subscripted_rvalue
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 24 Apr 2019 16:50:40 +0000 (17:50 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 12 Jul 2019 11:09:52 +0000 (12:09 +0100)
The dynamic lower (and upper) bounds of ranges are stored as type
LONGEST (see union dynamic_prop_data in gdbtypes.h).  In most places
that range bounds are handled they are held in a LONGEST, however in
value_subscripted_rvalue the bound is placed into an int.

This commit changes value_subscripted_rvalue to use LONGEST, there
should be no user visible changes after this commit.

gdb/ChangeLog:

* valarith.c (value_subscripted_rvalue): Change lowerbound
parameter type from int to LONGEST.
* value.h (value_subscripted_rvalue): Likewise in declaration.

gdb/ChangeLog
gdb/valarith.c
gdb/value.h

index 90af6d38b57c8d7c60a58f4cd9e2580018666071..33cff4edf878f6e68ebcd3fc58a55b94ef82d718 100644 (file)
@@ -1,3 +1,9 @@
+2019-07-12  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * valarith.c (value_subscripted_rvalue): Change lowerbound
+       parameter type from int to LONGEST.
+       * value.h (value_subscripted_rvalue): Likewise in declaration.
+
 2019-07-11  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * cli/cli-utils.c (info_print_command_completer): New function.
index 4ee7f248b565d9cb1eecf5e94a7d4d58d08ea287..8f3c5029eb5dd8e1c19c1425cec003e5d071741f 100644 (file)
@@ -183,7 +183,7 @@ value_subscript (struct value *array, LONGEST index)
    to doubles, but no longer does.  */
 
 struct value *
-value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
+value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound)
 {
   struct type *array_type = check_typedef (value_type (array));
   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
index 9f55408dde0b6a6646b56e7a4d8ab0609305c6a5..47bf672eb5dad6c04fc61eb61c34f015f02ace87 100644 (file)
@@ -1152,7 +1152,8 @@ extern struct value *find_function_in_inferior (const char *,
 extern struct value *value_allocate_space_in_inferior (int);
 
 extern struct value *value_subscripted_rvalue (struct value *array,
-                                              LONGEST index, int lowerbound);
+                                              LONGEST index,
+                                              LONGEST lowerbound);
 
 /* User function handler.  */
 
This page took 0.028958 seconds and 4 git commands to generate.