aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-03-13 17:39:52 -0600
committerTom Tromey <tom@tromey.com>2020-03-13 18:03:40 -0600
commit156bfec999186e3eccaf51fa3b81280bf51dbaa4 (patch)
tree7d4c7f55d544de65d149b3285d7b121329a9e26b /gdb/valprint.h
parent2b4e573d62be3a59057895054b1b5faa67557ce6 (diff)
downloadfsf-binutils-gdb-156bfec999186e3eccaf51fa3b81280bf51dbaa4.zip
fsf-binutils-gdb-156bfec999186e3eccaf51fa3b81280bf51dbaa4.tar.gz
fsf-binutils-gdb-156bfec999186e3eccaf51fa3b81280bf51dbaa4.tar.bz2
Introduce generic_value_print
This introduces generic_value_print, which is a value-based analogue to generic_val_print. For now this is unused and simply calls generic_val_print, but subsequent patches will both change this function to work using the value API directly, and convert callers of generic_val_print to call this instead. gdb/ChangeLog 2020-03-13 Tom Tromey <tom@tromey.com> * valprint.h (generic_value_print): Declare. * valprint.c (generic_value_print): New function.
Diffstat (limited to 'gdb/valprint.h')
-rw-r--r--gdb/valprint.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/valprint.h b/gdb/valprint.h
index 13b2b2d..1aca294 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -211,6 +211,17 @@ extern void generic_val_print (struct type *type,
const struct value_print_options *options,
const struct generic_val_print_decorations *);
+/* Print a value in a generic way. VAL is the value, STREAM is where
+ to print it, RECURSE is the recursion depth, OPTIONS describe how
+ the printing should be done, and D is the language-specific
+ decorations object. Note that structs and unions cannot be printed
+ by this function. */
+
+extern void generic_value_print (struct value *val, struct ui_file *stream,
+ int recurse,
+ const struct value_print_options *options,
+ const struct generic_val_print_decorations *d);
+
extern void generic_emit_char (int c, struct type *type, struct ui_file *stream,
int quoter, const char *encoding);