xref: /dflybsd-src/contrib/gdb-7/gdb/typeprint.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* Language independent support for printing types for GDB, the GNU debugger.
2*ef5ccd6cSJohn Marino    Copyright (C) 1986-2013 Free Software Foundation, Inc.
35796c8dcSSimon Schubert 
45796c8dcSSimon Schubert    This file is part of GDB.
55796c8dcSSimon Schubert 
65796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
75796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
85796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
95796c8dcSSimon Schubert    (at your option) any later version.
105796c8dcSSimon Schubert 
115796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
125796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
135796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
145796c8dcSSimon Schubert    GNU General Public License for more details.
155796c8dcSSimon Schubert 
165796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
175796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
185796c8dcSSimon Schubert 
195796c8dcSSimon Schubert #ifndef TYPEPRINT_H
205796c8dcSSimon Schubert #define TYPEPRINT_H
215796c8dcSSimon Schubert 
22cf7f2e2dSJohn Marino enum language;
235796c8dcSSimon Schubert struct ui_file;
24*ef5ccd6cSJohn Marino struct typedef_hash_table;
25*ef5ccd6cSJohn Marino 
26*ef5ccd6cSJohn Marino struct type_print_options
27*ef5ccd6cSJohn Marino {
28*ef5ccd6cSJohn Marino   /* True means that no special printing flags should apply.  */
29*ef5ccd6cSJohn Marino   unsigned int raw : 1;
30*ef5ccd6cSJohn Marino 
31*ef5ccd6cSJohn Marino   /* True means print methods in a class.  */
32*ef5ccd6cSJohn Marino   unsigned int print_methods : 1;
33*ef5ccd6cSJohn Marino 
34*ef5ccd6cSJohn Marino   /* True means print typedefs in a class.  */
35*ef5ccd6cSJohn Marino   unsigned int print_typedefs : 1;
36*ef5ccd6cSJohn Marino 
37*ef5ccd6cSJohn Marino   /* If not NULL, a local typedef hash table used when printing a
38*ef5ccd6cSJohn Marino      type.  */
39*ef5ccd6cSJohn Marino   struct typedef_hash_table *local_typedefs;
40*ef5ccd6cSJohn Marino 
41*ef5ccd6cSJohn Marino   /* If not NULL, a global typedef hash table used when printing a
42*ef5ccd6cSJohn Marino      type.  */
43*ef5ccd6cSJohn Marino   struct typedef_hash_table *global_typedefs;
44*ef5ccd6cSJohn Marino 
45*ef5ccd6cSJohn Marino   /* The list of type printers associated with the global typedef
46*ef5ccd6cSJohn Marino      table.  This is intentionally opaque.  */
47*ef5ccd6cSJohn Marino   void *global_printers;
48*ef5ccd6cSJohn Marino };
49*ef5ccd6cSJohn Marino 
50*ef5ccd6cSJohn Marino extern const struct type_print_options type_print_raw_options;
51*ef5ccd6cSJohn Marino 
52*ef5ccd6cSJohn Marino void recursively_update_typedef_hash (struct typedef_hash_table *,
53*ef5ccd6cSJohn Marino 				      struct type *);
54*ef5ccd6cSJohn Marino 
55*ef5ccd6cSJohn Marino void add_template_parameters (struct typedef_hash_table *, struct type *);
56*ef5ccd6cSJohn Marino 
57*ef5ccd6cSJohn Marino struct typedef_hash_table *create_typedef_hash (void);
58*ef5ccd6cSJohn Marino 
59*ef5ccd6cSJohn Marino void free_typedef_hash (struct typedef_hash_table *);
60*ef5ccd6cSJohn Marino 
61*ef5ccd6cSJohn Marino struct cleanup *make_cleanup_free_typedef_hash (struct typedef_hash_table *);
62*ef5ccd6cSJohn Marino 
63*ef5ccd6cSJohn Marino struct typedef_hash_table *copy_typedef_hash (struct typedef_hash_table *);
64*ef5ccd6cSJohn Marino 
65*ef5ccd6cSJohn Marino const char *find_typedef_in_hash (const struct type_print_options *,
66*ef5ccd6cSJohn Marino 				  struct type *);
675796c8dcSSimon Schubert 
685796c8dcSSimon Schubert void print_type_scalar (struct type * type, LONGEST, struct ui_file *);
695796c8dcSSimon Schubert 
705796c8dcSSimon Schubert void c_type_print_varspec_suffix (struct type *, struct ui_file *, int,
71*ef5ccd6cSJohn Marino 				  int, int, const struct type_print_options *);
72cf7f2e2dSJohn Marino 
73*ef5ccd6cSJohn Marino void c_type_print_args (struct type *, struct ui_file *, int, enum language,
74*ef5ccd6cSJohn Marino 			const struct type_print_options *);
75*ef5ccd6cSJohn Marino 
765796c8dcSSimon Schubert #endif
77