aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/language.h b/gdb/language.h
index d581bd2..e25aec4 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -275,6 +275,12 @@ struct language_defn
void (*la_language_arch_info) (struct gdbarch *,
struct language_arch_info *);
+ /* Print the index of an element of an array. */
+ void (*la_print_array_index) (struct value *index_value,
+ struct ui_file *stream,
+ int format,
+ enum val_prettyprint pretty);
+
/* Add fields above this point, so the magic number is always last. */
/* Magic number for compat checking */
@@ -362,6 +368,9 @@ extern enum language set_language (enum language);
#define LA_EMIT_CHAR(ch, stream, quoter) \
(current_language->la_emitchar(ch, stream, quoter))
+#define LA_PRINT_ARRAY_INDEX(index_value, stream, format, pretty) \
+ (current_language->la_print_array_index(index_value, stream, format, pretty))
+
/* Test a character to decide whether it can be printed in literal form
or needs to be printed in another representation. For example,
in C the literal form of the character with octal value 141 is 'a'
@@ -457,4 +466,10 @@ extern char *language_class_name_from_physname (const struct language_defn *,
/* Splitting strings into words. */
extern char *default_word_break_characters (void);
+/* Print the index of an array element using the C99 syntax. */
+extern void default_print_array_index (struct value *index_value,
+ struct ui_file *stream,
+ int format,
+ enum val_prettyprint pretty);
+
#endif /* defined (LANGUAGE_H) */