aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-05-23 18:13:35 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-05-23 18:13:35 +0000
commite936309cee103c8067460fc2ca051a9290af3564 (patch)
treee016843fcf3698d85d7900b4e176e24e38a49789 /gdb/valprint.h
parent133d72e9955c347d1cbb0fae4424f0b34ef20b91 (diff)
downloadgdb-e936309cee103c8067460fc2ca051a9290af3564.zip
gdb-e936309cee103c8067460fc2ca051a9290af3564.tar.gz
gdb-e936309cee103c8067460fc2ca051a9290af3564.tar.bz2
* valprint.h (get_array_bounds): Renames get_array_low_bound.
* valprint.c (get_array_bounds): Renames get_array_low_bound. Return the proper bound value if the array index type is an enumerated type. Compute the high bound if requested. (val_print_array_elements): Handle the case when the array element has a null size. * ada-valprint.c (print_optional_low_bound): Add handling for empty arrays or arrays of zero-size elements. (ada_val_print_array): New function, extracted out from ada_val_print_1 case TYPE_CODE_ARRAY, and enhanced to handle empty arrays and arrays of zero-size elements. (ada_val_print_1)[case TYPE_CODE_ARRAY]: Replace extracted-out code by call to ada_val_print_array. (ada_value_print): Remove handling of null array. The handling was incomplete and is now better handled by ada_val_print_array.
Diffstat (limited to 'gdb/valprint.h')
-rw-r--r--gdb/valprint.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/valprint.h b/gdb/valprint.h
index 669f59d..3b20516 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -50,7 +50,8 @@ extern int stop_print_at_null; /* Stop printing at null char? */
extern int print_array_indexes_p (void);
-extern int get_array_low_bound (struct type *type, long *low_bound);
+extern int get_array_bounds (struct type *type, long *low_bound,
+ long *high_bound);
extern void maybe_print_array_index (struct type *index_type, LONGEST index,
struct ui_file *stream, int format,