GDB (API)
/home/stan/gdb/src/gdb/c-lang.h
Go to the documentation of this file.
00001 /* C language support definitions for GDB, the GNU debugger.
00002 
00003    Copyright (C) 1992-2013 Free Software Foundation, Inc.
00004 
00005    This file is part of GDB.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 3 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00019 
00020 
00021 #if !defined (C_LANG_H)
00022 #define C_LANG_H 1
00023 
00024 struct ui_file;
00025 struct language_arch_info;
00026 struct type_print_options;
00027 
00028 #include "value.h"
00029 #include "macroexp.h"
00030 #include "parser-defs.h"
00031 
00032 
00033 /* The various kinds of C string and character.  Note that these
00034    values are chosen so that they may be or'd together in certain
00035    ways.  */
00036 enum c_string_type
00037   {
00038     /* An ordinary string: "value".  */
00039     C_STRING = 0,
00040     /* A wide string: L"value".  */
00041     C_WIDE_STRING = 1,
00042     /* A 16-bit Unicode string: u"value".  */
00043     C_STRING_16 = 2,
00044     /* A 32-bit Unicode string: U"value".  */
00045     C_STRING_32 = 3,
00046     /* An ordinary char: 'v'.  This can also be or'd with one of the
00047        above to form the corresponding CHAR value from a STRING
00048        value.  */
00049     C_CHAR = 4,
00050     /* A wide char: L'v'.  */
00051     C_WIDE_CHAR = 5,
00052     /* A 16-bit Unicode char: u'v'.  */
00053     C_CHAR_16 = 6,
00054     /* A 32-bit Unicode char: U'v'.  */
00055     C_CHAR_32 = 7
00056   };
00057 
00058 /* Defined in c-exp.y.  */
00059 
00060 extern int c_parse (void);
00061 
00062 extern void c_error (char *);
00063 
00064 extern int c_parse_escape (const char **, struct obstack *);
00065 
00066 /* Defined in c-typeprint.c */
00067 extern void c_print_type (struct type *, const char *,
00068                           struct ui_file *, int, int,
00069                           const struct type_print_options *);
00070 
00071 extern void c_print_typedef (struct type *,
00072                              struct symbol *,
00073                              struct ui_file *);
00074 
00075 extern void c_val_print (struct type *, const gdb_byte *,
00076                          int, CORE_ADDR,
00077                          struct ui_file *, int,
00078                          const struct value *,
00079                          const struct value_print_options *);
00080 
00081 extern void c_value_print (struct value *, struct ui_file *,
00082                            const struct value_print_options *);
00083 
00084 /* These are in c-lang.c: */
00085 
00086 extern struct value *evaluate_subexp_c (struct type *expect_type,
00087                                         struct expression *exp,
00088                                         int *pos,
00089                                         enum noside noside);
00090 
00091 extern void c_printchar (int, struct type *, struct ui_file *);
00092 
00093 extern void c_printstr (struct ui_file * stream,
00094                         struct type *elttype,
00095                         const gdb_byte *string,
00096                         unsigned int length,
00097                         const char *user_encoding,
00098                         int force_ellipses,
00099                         const struct value_print_options *options);
00100 
00101 extern void c_language_arch_info (struct gdbarch *gdbarch,
00102                                   struct language_arch_info *lai);
00103 
00104 extern const struct exp_descriptor exp_descriptor_c;
00105 
00106 extern void c_emit_char (int c, struct type *type,
00107                          struct ui_file *stream, int quoter);
00108 
00109 extern const struct op_print c_op_print_tab[];
00110 
00111 /* These are in c-typeprint.c: */
00112 
00113 extern void c_type_print_base (struct type *, struct ui_file *,
00114                                int, int, const struct type_print_options *);
00115 
00116 /* These are in cp-valprint.c */
00117 
00118 extern void cp_print_class_member (const gdb_byte *, struct type *,
00119                                    struct ui_file *, char *);
00120 
00121 extern void cp_print_value_fields (struct type *, struct type *,
00122                                    const gdb_byte *, int, CORE_ADDR,
00123                                    struct ui_file *, int,
00124                                    const struct value *,
00125                                    const struct value_print_options *,
00126                                    struct type **, int);
00127 
00128 extern void cp_print_value_fields_rtti (struct type *,
00129                                         const gdb_byte *, int, CORE_ADDR,
00130                                         struct ui_file *, int,
00131                                         const struct value *,
00132                                         const struct value_print_options *,
00133                                         struct type **, int);
00134 
00135 extern int cp_is_vtbl_ptr_type (struct type *);
00136 
00137 extern int cp_is_vtbl_member (struct type *);
00138 
00139 /* These are in c-valprint.c.  */
00140 
00141 extern int c_textual_element_type (struct type *, char);
00142 
00143 
00144 #endif /* !defined (C_LANG_H) */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines