Record nested types
[deliverable/binutils-gdb.git] / gdb / typeprint.h
1 /* Language independent support for printing types for GDB, the GNU debugger.
2 Copyright (C) 1986-2017 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18
19 #ifndef TYPEPRINT_H
20 #define TYPEPRINT_H
21
22 enum language;
23 struct ui_file;
24 struct typedef_hash_table;
25 struct ext_lang_type_printers;
26
27 struct type_print_options
28 {
29 /* True means that no special printing flags should apply. */
30 unsigned int raw : 1;
31
32 /* True means print methods in a class. */
33 unsigned int print_methods : 1;
34
35 /* True means print typedefs in a class. */
36 unsigned int print_typedefs : 1;
37
38 /* The number of nested type definitions to print. -1 == all. */
39 int print_nested_type_limit;
40
41 /* If not NULL, a local typedef hash table used when printing a
42 type. */
43 struct typedef_hash_table *local_typedefs;
44
45 /* If not NULL, a global typedef hash table used when printing a
46 type. */
47 struct typedef_hash_table *global_typedefs;
48
49 /* The list of type printers associated with the global typedef
50 table. This is intentionally opaque. */
51 struct ext_lang_type_printers *global_printers;
52 };
53
54 extern const struct type_print_options type_print_raw_options;
55
56 void recursively_update_typedef_hash (struct typedef_hash_table *,
57 struct type *);
58
59 void add_template_parameters (struct typedef_hash_table *, struct type *);
60
61 struct typedef_hash_table *create_typedef_hash (void);
62
63 void free_typedef_hash (struct typedef_hash_table *);
64
65 struct cleanup *make_cleanup_free_typedef_hash (struct typedef_hash_table *);
66
67 struct typedef_hash_table *copy_typedef_hash (struct typedef_hash_table *);
68
69 const char *find_typedef_in_hash (const struct type_print_options *,
70 struct type *);
71
72 void print_type_scalar (struct type * type, LONGEST, struct ui_file *);
73
74 void c_type_print_varspec_suffix (struct type *, struct ui_file *, int,
75 int, int, const struct type_print_options *);
76
77 void c_type_print_args (struct type *, struct ui_file *, int, enum language,
78 const struct type_print_options *);
79
80 /* Print <unknown return type> to stream STREAM. */
81
82 void type_print_unknown_return_type (struct ui_file *stream);
83
84 /* Throw an error indicating that the user tried to use a symbol that
85 has unknown type. SYM_PRINT_NAME is the name of the symbol, to be
86 included in the error message. */
87 extern void error_unknown_type (const char *sym_print_name);
88
89 extern void val_print_not_allocated (struct ui_file *stream);
90
91 extern void val_print_not_associated (struct ui_file *stream);
92
93 #endif
This page took 0.043782 seconds and 4 git commands to generate.