aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2015-05-16 14:26:06 +0200
committerJan Kratochvil <jan.kratochvil@redhat.com>2015-05-16 14:26:06 +0200
commit1c88ceb1bedc81dbfd1d076e4a49bbf533b4e238 (patch)
tree536661170661d5de5ca7a65457d1be3aaa8dd6e1 /gdb/valprint.h
parent0b738f2744178ad33eeb60bcd9bdfb77adb5605b (diff)
downloadgdb-1c88ceb1bedc81dbfd1d076e4a49bbf533b4e238.zip
gdb-1c88ceb1bedc81dbfd1d076e4a49bbf533b4e238.tar.gz
gdb-1c88ceb1bedc81dbfd1d076e4a49bbf533b4e238.tar.bz2
Code cleanup: Make parts of print_command_1 public
The later 'compile print' command should share its behavior with the existing 'print' command. Make the needed existing parts of print_command_1 public. gdb/ChangeLog 2015-05-16 Jan Kratochvil <jan.kratochvil@redhat.com> * printcmd.c (struct format_data): Move it to valprint.h. (print_command_parse_format, print_value): New functions from ... (print_command_1): ... here. Call them. * valprint.h (struct format_data): Move it here from printcmd.c. (print_command_parse_format, print_value): New declarations.
Diffstat (limited to 'gdb/valprint.h')
-rw-r--r--gdb/valprint.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/valprint.h b/gdb/valprint.h
index e3d0137..ed4964f 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -217,4 +217,19 @@ extern void output_command_const (const char *args, int from_tty);
extern int val_print_scalar_type_p (struct type *type);
+struct format_data
+ {
+ int count;
+ char format;
+ char size;
+
+ /* True if the value should be printed raw -- that is, bypassing
+ python-based formatters. */
+ unsigned char raw;
+ };
+
+extern void print_command_parse_format (const char **expp, const char *cmdname,
+ struct format_data *fmtp);
+extern void print_value (struct value *val, const struct format_data *fmtp);
+
#endif