GDB (xrefs)
Macros | Enumerations | Functions
/tmp/gdb-8.1/gdb/c-typeprint.c File Reference
#include "defs.h"
#include "gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "value.h"
#include "gdbcore.h"
#include "target.h"
#include "language.h"
#include "demangle.h"
#include "c-lang.h"
#include "typeprint.h"
#include "cp-abi.h"
#include "cp-support.h"

Go to the source code of this file.

Macros

#define OFFSET_SPC_LEN   23
 

Enumerations

enum  access_specifier { s_none, s_public, s_private, s_protected }
 

Functions

static void c_type_print_varspec_prefix (struct type *, struct ui_file *, int, int, int, const struct type_print_options *, struct print_offset_data *)
 
static void c_type_print_modifier (struct type *, struct ui_file *, int, int)
 
static void c_type_print_base_1 (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags, struct print_offset_data *podata)
 
static const char * find_typedef_for_canonicalize (struct type *t, void *data)
 
static void print_name_maybe_canonical (const char *name, const struct type_print_options *flags, struct ui_file *stream)
 
static void c_print_type_1 (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags, struct print_offset_data *podata)
 
void c_print_type (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
 
void c_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream)
 
static void cp_type_print_derivation_info (struct ui_file *stream, struct type *type, const struct type_print_options *flags)
 
static void cp_type_print_method_args (struct type *mtype, const char *prefix, const char *varstring, int staticp, struct ui_file *stream, const struct type_print_options *flags)
 
void c_type_print_args (struct type *type, struct ui_file *stream, int linkage_name, enum language language, const struct type_print_options *flags)
 
static int is_type_conversion_operator (struct type *type, int i, int j)
 
static char * remove_qualifiers (char *qid)
 
void c_type_print_varspec_suffix (struct type *type, struct ui_file *stream, int show, int passed_a_ptr, int demangled_args, const struct type_print_options *flags)
 
static void c_type_print_template_args (const struct type_print_options *flags, struct type *type, struct ui_file *stream)
 
static void print_spaces_filtered_with_print_options (int level, struct ui_file *stream, const struct type_print_options *flags)
 
static enum access_specifier output_access_specifier (struct ui_file *stream, enum access_specifier last_access, int level, bool is_protected, bool is_private, const struct type_print_options *flags)
 
static void c_print_type_union_field_offset (struct type *type, unsigned int field_idx, struct ui_file *stream)
 
static void c_print_type_struct_field_offset (struct type *type, unsigned int field_idx, struct ui_file *stream, struct print_offset_data *podata)
 
static bool need_access_label_p (struct type *type)
 
static void c_print_type_no_offsets (struct type *type, const char *varstring, struct ui_file *stream, int show, int level, struct type_print_options *flags, struct print_offset_data *podata)
 
static void c_type_print_base_struct_union (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags, struct print_offset_data *podata)
 
void c_type_print_base (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
 

Macro Definition Documentation

◆ OFFSET_SPC_LEN

#define OFFSET_SPC_LEN   23

Enumeration Type Documentation

◆ access_specifier

Enumerator
s_none 
s_public 
s_private 
s_protected 

Definition at line 45 of file c-typeprint.c.

Function Documentation

◆ c_print_type()

void c_print_type ( struct type type,
const char *  varstring,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags 
)

◆ c_print_type_1()

static void c_print_type_1 ( struct type type,
const char *  varstring,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags,
struct print_offset_data podata 
)
static

◆ c_print_type_no_offsets()

static void c_print_type_no_offsets ( struct type type,
const char *  varstring,
struct ui_file stream,
int  show,
int  level,
struct type_print_options flags,
struct print_offset_data podata 
)
static

Definition at line 1086 of file c-typeprint.c.

References c_print_type_1(), and flags.

Referenced by c_type_print_base_struct_union().

◆ c_print_type_struct_field_offset()

static void c_print_type_struct_field_offset ( struct type type,
unsigned int  field_idx,
struct ui_file stream,
struct print_offset_data podata 
)
static

◆ c_print_type_union_field_offset()

static void c_print_type_union_field_offset ( struct type type,
unsigned int  field_idx,
struct ui_file stream 
)
static

◆ c_print_typedef()

void c_print_typedef ( struct type type,
struct symbol new_symbol,
struct ui_file stream 
)

◆ c_type_print_args()

void c_type_print_args ( struct type type,
struct ui_file stream,
int  linkage_name,
enum language language  ,
const struct type_print_options flags 
)

◆ c_type_print_base()

void c_type_print_base ( struct type type,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags 
)

Definition at line 1774 of file c-typeprint.c.

References c_type_print_base_1(), and flags.

Referenced by cp_print_class_member().

◆ c_type_print_base_1()

static void c_type_print_base_1 ( struct type type,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags,
struct print_offset_data podata 
)
static

◆ c_type_print_base_struct_union()

static void c_type_print_base_struct_union ( struct type type,
struct ui_file stream,
int  show,
int  level,
const struct type_print_options flags,
struct print_offset_data podata 
)
static

Definition at line 1106 of file c-typeprint.c.

References _, add_template_parameters(), c_print_type_1(), c_print_type_no_offsets(), c_print_type_struct_field_offset(), c_print_type_union_field_offset(), c_type_print_modifier(), c_type_print_template_args(), copy_typedef_hash(), cp_type_print_derivation_info(), cp_type_print_method_args(), create_typedef_hash(), do_cleanups(), print_offset_data::end_bitpos, field_is_static(), flags, fprintf_filtered(), fprintfi_filtered(), fputs_filtered(), gdb_assert, gdb_demangle(), gdb_mangle_name(), get_vptr_fieldno(), cleanup_check::is_constructor(), is_constructor_name(), is_destructor_name(), is_type_conversion_operator(), type::length, type_print_options::local_typedefs, make_cleanup(), make_cleanup_free_typedef_hash(), name, need_access_label_p(), null_cleanup(), print_offset_data::offset_bitpos, OFFSET_SPC_LEN, output_access_specifier(), fn_field::physname, print_name_maybe_canonical(), type_print_options::print_nested_type_limit, print_spaces_filtered(), print_spaces_filtered_with_print_options(), QUIT, recursively_update_typedef_hash(), remove_qualifiers(), s_none, startswith(), TARGET_CHAR_BIT, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNION, TYPE_DECLARED_CLASS, TYPE_FIELD, TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_BITPOS, TYPE_FIELD_BITSIZE, TYPE_FIELD_NAME, TYPE_FIELD_PACKED, TYPE_FIELD_PRIVATE, TYPE_FIELD_PROTECTED, TYPE_FIELD_TYPE, TYPE_FN_FIELD_ARTIFICIAL, TYPE_FN_FIELD_CONSTRUCTOR, TYPE_FN_FIELD_PHYSNAME, TYPE_FN_FIELD_PRIVATE, TYPE_FN_FIELD_PROTECTED, TYPE_FN_FIELD_STATIC_P, TYPE_FN_FIELD_STUB, TYPE_FN_FIELD_TYPE, TYPE_FN_FIELD_VIRTUAL_P, TYPE_FN_FIELDLIST1, TYPE_FN_FIELDLIST_LENGTH, TYPE_FN_FIELDLIST_NAME, TYPE_LENGTH, TYPE_N_BASECLASSES, type_name_no_tag(), TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_TYPE, TYPE_NFIELDS, TYPE_NFN_FIELDS, TYPE_STUB, TYPE_TAG_NAME, TYPE_TARGET_TYPE, TYPE_TYPEDEF_FIELD_COUNT, TYPE_TYPEDEF_FIELD_NAME, TYPE_TYPEDEF_FIELD_PRIVATE, TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_TYPE, xfree(), and xmalloc().

Referenced by c_type_print_base_1().

◆ c_type_print_modifier()

static void c_type_print_modifier ( struct type type,
struct ui_file stream,
int  need_pre_space,
int  need_post_space 
)
static

◆ c_type_print_template_args()

static void c_type_print_template_args ( const struct type_print_options flags,
struct type type,
struct ui_file stream 
)
static

◆ c_type_print_varspec_prefix()

static void c_type_print_varspec_prefix ( struct type type,
struct ui_file stream,
int  show,
int  passed_a_ptr,
int  need_post_space,
const struct type_print_options flags,
struct print_offset_data podata 
)
static

◆ c_type_print_varspec_suffix()

void c_type_print_varspec_suffix ( struct type type,
struct ui_file stream,
int  show,
int  passed_a_ptr,
int  demangled_args,
const struct type_print_options flags 
)

◆ cp_type_print_derivation_info()

static void cp_type_print_derivation_info ( struct ui_file stream,
struct type type,
const struct type_print_options flags 
)
static

◆ cp_type_print_method_args()

static void cp_type_print_method_args ( struct type mtype,
const char *  prefix,
const char *  varstring,
int  staticp,
struct ui_file stream,
const struct type_print_options flags 
)
static

◆ find_typedef_for_canonicalize()

static const char* find_typedef_for_canonicalize ( struct type t,
void *  data 
)
static

Definition at line 74 of file c-typeprint.c.

References find_typedef_in_hash().

Referenced by print_name_maybe_canonical().

◆ is_type_conversion_operator()

static int is_type_conversion_operator ( struct type type,
int  i,
int  j 
)
static

Definition at line 583 of file c-typeprint.c.

References CP_OPERATOR_STR, name, startswith(), and TYPE_FN_FIELDLIST_NAME.

Referenced by c_type_print_base_struct_union().

◆ need_access_label_p()

static bool need_access_label_p ( struct type type)
static

◆ output_access_specifier()

static enum access_specifier output_access_specifier ( struct ui_file stream,
enum access_specifier  last_access,
int  level,
bool  is_protected,
bool  is_private,
const struct type_print_options flags 
)
static

◆ print_name_maybe_canonical()

static void print_name_maybe_canonical ( const char *  name,
const struct type_print_options flags,
struct ui_file stream 
)
static

◆ print_spaces_filtered_with_print_options()

static void print_spaces_filtered_with_print_options ( int  level,
struct ui_file stream,
const struct type_print_options flags 
)
static

◆ remove_qualifiers()

static char* remove_qualifiers ( char *  qid)
static

Definition at line 640 of file c-typeprint.c.

References scan().

Referenced by c_type_print_base_struct_union().