aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-03-01 19:27:18 +0000
committerTom Tromey <tromey@redhat.com>2012-03-01 19:27:18 +0000
commite88acd96184003169ba2c23cfd807243da100d72 (patch)
treedb11f591eca89ac686032c24ab314ef514b7da69 /gdb/valprint.h
parentd3eab38a48ec521922e7d07595fd693df7ff3510 (diff)
downloadgdb-e88acd96184003169ba2c23cfd807243da100d72.zip
gdb-e88acd96184003169ba2c23cfd807243da100d72.tar.gz
gdb-e88acd96184003169ba2c23cfd807243da100d72.tar.bz2
* valprint.h (struct generic_val_print_decorations): New.
(generic_val_print): Declare. * valprint.c (generic_val_print): New function. * p-valprint.c (p_decorations): New global. (pascal_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_RANGE, TYPE_CODE_INT, TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ERROR, TYPE_CODE_UNDEF, TYPE_CODE_BOOL, TYPE_CODE_CHAR>: Call generic_val_print. * m2-valprint.c (m2_decorations): New global. (m2_val_print) <TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FUNC, TYPE_CODE_BOOL, TYPE_CODE_RANGE, TYPE_CODE_INT, TYPE_CODE_CHAR, TYPE_CODE_FLT, TYPE_CODE_METHOD, TYPE_CODE_VOID, TYPE_CODE_UNDEF, TYPE_CODE_ERROR>: Call generic_val_print. * f-valprint.c (f_decorations): New global. (f_val_print): Use print_function_pointer_address. <TYPE_CODE_REF, TYPE_CODE_FUNC, TYPE_CODE_CHAR, TYPE_CODE_FLAGS, TYPE_CODE_FLT, TYPE_CODE_VOID, TYPE_CODE_ENUM, TYPE_CODE_RANGE, TYPE_CODE_BOOL, TYPE_CODE_COMPLEX, TYPE_CODE_UNDEF>: Call generic_val_print. * c-valprint.c (c_decorations): New global. (c_val_print) <TYPE_CODE_MEMBERPTR, TYPE_CODE_REF, TYPE_CODE_ENUM, TYPE_CODE_FLAGS, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_BOOL, TYPE_CODE_RANGE, TYPE_CODE_CHAR, TYPE_CODE_FLT, TYPE_CODE_DECFLOAT, TYPE_CODE_VOID, TYPE_CODE_ERROR, TYPE_CODE_UNDEF, TYPE_CODE_COMPLEX>: Call generic_val_print. * ada-valprint.c (ada_val_print_1) <TYPE_CODE_FLAGS>: Remove case.
Diffstat (limited to 'gdb/valprint.h')
-rw-r--r--gdb/valprint.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/valprint.h b/gdb/valprint.h
index 234a18a..56c0c92 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -163,6 +163,36 @@ extern void val_print_unavailable (struct ui_file *stream);
extern void val_print_invalid_address (struct ui_file *stream);
+/* An instance of this is passed to generic_val_print and describes
+ some language-specific ways to print things. */
+
+struct generic_val_print_decorations
+{
+ /* Printing complex numbers: what to print before, between the
+ elements, and after. */
+
+ const char *complex_prefix;
+ const char *complex_infix;
+ const char *complex_suffix;
+
+ /* Boolean true and false. */
+
+ const char *true_name;
+ const char *false_name;
+
+ /* What to print when we see TYPE_CODE_VOID. */
+
+ const char *void_name;
+};
+
+
+extern void generic_val_print (struct type *type, const gdb_byte *valaddr,
+ int embedded_offset, CORE_ADDR address,
+ struct ui_file *stream, int recurse,
+ const struct value *original_value,
+ const struct value_print_options *options,
+ const struct generic_val_print_decorations *);
+
extern void generic_emit_char (int c, struct type *type, struct ui_file *stream,
int quoter, const char *encoding);