]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/typeprint.h
Stop assuming no-debug-info functions return int
[thirdparty/binutils-gdb.git] / gdb / typeprint.h
CommitLineData
c906108c 1/* Language independent support for printing types for GDB, the GNU debugger.
61baf725 2 Copyright (C) 1986-2017 Free Software Foundation, Inc.
c906108c 3
c5aa993b 4 This file is part of GDB.
c906108c 5
c5aa993b
JM
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
a9762ec7 8 the Free Software Foundation; either version 3 of the License, or
c5aa993b 9 (at your option) any later version.
c906108c 10
c5aa993b
JM
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.
c906108c 15
c5aa993b 16 You should have received a copy of the GNU General Public License
a9762ec7 17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c 18
17732724
AC
19#ifndef TYPEPRINT_H
20#define TYPEPRINT_H
21
94af9270 22enum language;
da3331ec 23struct ui_file;
bd69fc68 24struct typedef_hash_table;
6dddc817 25struct ext_lang_type_printers;
da3331ec 26
79d43c61
TT
27struct type_print_options
28{
29 /* True means that no special printing flags should apply. */
30 unsigned int raw : 1;
53342f27
TT
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;
bd69fc68
TT
37
38 /* If not NULL, a local typedef hash table used when printing a
39 type. */
40 struct typedef_hash_table *local_typedefs;
18a9fc12
TT
41
42 /* If not NULL, a global typedef hash table used when printing a
43 type. */
44 struct typedef_hash_table *global_typedefs;
45
46 /* The list of type printers associated with the global typedef
47 table. This is intentionally opaque. */
6dddc817 48 struct ext_lang_type_printers *global_printers;
79d43c61
TT
49};
50
51extern const struct type_print_options type_print_raw_options;
52
bd69fc68
TT
53void recursively_update_typedef_hash (struct typedef_hash_table *,
54 struct type *);
55
56void add_template_parameters (struct typedef_hash_table *, struct type *);
57
58struct typedef_hash_table *create_typedef_hash (void);
59
60void free_typedef_hash (struct typedef_hash_table *);
61
62struct cleanup *make_cleanup_free_typedef_hash (struct typedef_hash_table *);
63
64struct typedef_hash_table *copy_typedef_hash (struct typedef_hash_table *);
65
66const char *find_typedef_in_hash (const struct type_print_options *,
67 struct type *);
68
d9fcf2fb 69void print_type_scalar (struct type * type, LONGEST, struct ui_file *);
c906108c 70
d9fcf2fb 71void c_type_print_varspec_suffix (struct type *, struct ui_file *, int,
79d43c61
TT
72 int, int, const struct type_print_options *);
73
74void c_type_print_args (struct type *, struct ui_file *, int, enum language,
75 const struct type_print_options *);
94af9270 76
7022349d
PA
77/* Print <unknown return type> to stream STREAM. */
78
79void type_print_unknown_return_type (struct ui_file *stream);
80
3f2f83dd
KB
81extern void val_print_not_allocated (struct ui_file *stream);
82
83extern void val_print_not_associated (struct ui_file *stream);
84
17732724 85#endif