gdb: fix vfork with multiple threads
[deliverable/binutils-gdb.git] / gdb / typeprint.h
index 8936b9adf53787b93093497e9c7f3a2f49f11581..86e781378f9f54406bcf996d3ee546fdc2c53d1b 100644 (file)
@@ -1,5 +1,5 @@
 /* Language independent support for printing types for GDB, the GNU debugger.
-   Copyright (C) 1986-2020 Free Software Foundation, Inc.
+   Copyright (C) 1986-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,8 +26,45 @@ struct ui_file;
 struct typedef_hash_table;
 struct ext_lang_type_printers;
 
+struct type_print_options
+{
+  /* True means that no special printing flags should apply.  */
+  unsigned int raw : 1;
+
+  /* True means print methods in a class.  */
+  unsigned int print_methods : 1;
+
+  /* True means print typedefs in a class.  */
+  unsigned int print_typedefs : 1;
+
+  /* True means to print offsets, a la 'pahole'.  */
+  unsigned int print_offsets : 1;
+
+  /* True means to print offsets in hex, otherwise use decimal.  */
+  unsigned int print_in_hex : 1;
+
+  /* The number of nested type definitions to print.  -1 == all.  */
+  int print_nested_type_limit;
+
+  /* If not NULL, a local typedef hash table used when printing a
+     type.  */
+  typedef_hash_table *local_typedefs;
+
+  /* If not NULL, a global typedef hash table used when printing a
+     type.  */
+  typedef_hash_table *global_typedefs;
+
+  /* The list of type printers associated with the global typedef
+     table.  This is intentionally opaque.  */
+  struct ext_lang_type_printers *global_printers;
+};
+
 struct print_offset_data
 {
+  /* Indicate if the offset an d size fields should be printed in decimal
+     (default) or hexadecimal.  */
+  bool print_in_hex  = false;
+
   /* The offset to be applied to bitpos when PRINT_OFFSETS is true.
      This is needed for when we are printing nested structs and want
      to make sure that the printed offset for each field carries over
@@ -62,6 +99,8 @@ struct print_offset_data
      certain field.  */
   static const int indentation;
 
+  explicit print_offset_data (const struct type_print_options *flags);
+
 private:
 
   /* Helper function for ptype/o implementation that prints
@@ -73,36 +112,6 @@ private:
                         const char *for_what);
 };
 
-struct type_print_options
-{
-  /* True means that no special printing flags should apply.  */
-  unsigned int raw : 1;
-
-  /* True means print methods in a class.  */
-  unsigned int print_methods : 1;
-
-  /* True means print typedefs in a class.  */
-  unsigned int print_typedefs : 1;
-
-  /* True means to print offsets, a la 'pahole'.  */
-  unsigned int print_offsets : 1;
-
-  /* The number of nested type definitions to print.  -1 == all.  */
-  int print_nested_type_limit;
-
-  /* If not NULL, a local typedef hash table used when printing a
-     type.  */
-  typedef_hash_table *local_typedefs;
-
-  /* If not NULL, a global typedef hash table used when printing a
-     type.  */
-  typedef_hash_table *global_typedefs;
-
-  /* The list of type printers associated with the global typedef
-     table.  This is intentionally opaque.  */
-  struct ext_lang_type_printers *global_printers;
-};
-
 extern const struct type_print_options type_print_raw_options;
 
 /* A hash table holding typedef_field objects.  This is more
@@ -151,6 +160,11 @@ private:
 
 void print_type_scalar (struct type * type, LONGEST, struct ui_file *);
 
+/* Assuming the TYPE is a fixed point type, print its type description
+   on STREAM.  */
+
+void print_type_fixed_point (struct type *type, struct ui_file *stream);
+
 void c_type_print_args (struct type *, struct ui_file *, int, enum language,
                        const struct type_print_options *);
 
This page took 0.02608 seconds and 4 git commands to generate.