summaryrefslogtreecommitdiff
path: root/gdb/valprint.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2005-10-03 21:21:20 +0000
committerJoel Brobecker <brobecker@gnat.com>2005-10-03 21:21:20 +0000
commit350e719b73bbbe84bcb5b7eb1f2d88b11bae5d00 (patch)
tree374a845b6c57a4df231af385d14220a08274ec12 /gdb/valprint.h
parentd82cbbda1d31eb58166f3fc8e90215bece00d404 (diff)
downloadgdb-350e719b73bbbe84bcb5b7eb1f2d88b11bae5d00.tar.gz
2005-10-03 Joel Brobecker <brobecker@adacore.com>
* language.h (language_defn): New field la_print_array_index. (LA_PRINT_ARRAY_INDEX): New macro. (default_print_array_index): Add declaration. * language.c (default_print_array_index): new function. (unknown_language): Add value for new field. (auto_language): Likewise. (local_language): Likewise. * ada-lang.c (ada_print_array_index): New function. (ada_language_defn): Add value for new field. * c-lang.c (c_language_defn): Likewise. (cpluc_language_defn): Likewise. (asm_language_defn): Likewise. (minimal_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise. * scm-lang.c (scm_language_defn): Likewise. * valprint.h (print_array_indexes_p): Add declaration. (get_array_low_bound): Add declaration. (maybe_print_array_index): Add declaration. * valprint.c (print_array_indexes): New static variable. (show_print_array_indexes): New function. (print_array_indexes_p): New function. (get_array_low_bound): New function. (maybe_print_array_index): New function. (val_print_array_elements): Print the index of each element if requested by the user. (_initialize_valprint): Add new array-indexes "set/show print" command. * ada-valprint.c (print_optional_low_bound): Replace extracted code by call to ada_get_array_low_bound_and_type(). Stop printing the low bound if indexes will be printed for all elements of the array. (val_print_packed_array_elements): Print the index of each element of the array if necessary.
Diffstat (limited to 'gdb/valprint.h')
-rw-r--r--gdb/valprint.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/valprint.h b/gdb/valprint.h
index 4b776189f6c..1c2288e33d7 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -50,6 +50,14 @@ extern int output_format;
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 void maybe_print_array_index (struct type *index_type, LONGEST index,
+ struct ui_file *stream, int format,
+ enum val_prettyprint pretty);
+
extern void val_print_array_elements (struct type *, const gdb_byte *,
CORE_ADDR, struct ui_file *, int,
int, int, enum val_prettyprint,