GDB (xrefs)
Loading...
Searching...
No Matches
Enumerations | Functions
c-typeprint.c File Reference
#include "defs.h"
#include "gdbsupport/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 "cli/cli-style.h"
#include "typeprint.h"
#include "cp-abi.h"
#include "cp-support.h"

Go to the source code of this file.

Enumerations

enum  access_specifier { s_none , s_public , s_private , s_protected }
 

Functions

static void c_type_print_varspec_suffix (struct type *, struct ui_file *, int, int, int, enum language, const struct type_print_options *)
 
static void c_type_print_varspec_prefix (struct type *, struct ui_file *, int, int, int, enum language, const struct type_print_options *, struct print_offset_data *)
 
static void c_type_print_modifier (struct type *, struct ui_file *, int, int, enum language)
 
static void c_type_print_base_1 (struct type *type, struct ui_file *stream, int show, int level, enum language language, 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, enum language language, 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, enum language language, 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, enum language language, 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 const char * remove_qualifiers (const char *qid)
 
static void c_type_print_template_args (const struct type_print_options *flags, struct type *type, struct ui_file *stream, enum language language)
 
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 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, enum language language, 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, enum language language, const struct type_print_options *flags, struct print_offset_data *podata)
 
static void c_type_print_base_1 (struct type *type, struct ui_file *stream, int show, int level, enum language language, 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)
 

Enumeration Type Documentation

◆ access_specifier

Enumerator
s_none 
s_public 
s_private 
s_protected 

Definition at line 38 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,
enum language language language ,
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,
enum language language,
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,
enum language language,
struct type_print_options * flags,
struct print_offset_data * podata )
static

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

References c_print_type_1(), and flags.

Referenced by c_type_print_base_struct_union().

◆ 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 )

◆ c_type_print_base_1() [1/2]

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

◆ c_type_print_base_1() [2/2]

static void c_type_print_base_1 ( struct type * type,
struct ui_file * stream,
int show,
int level,
enum language language,
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,
enum language language,
const struct type_print_options * flags,
struct print_offset_data * podata )
static

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

References typedef_hash_table::add_template_parameters(), field::bitsize(), c_print_type_1(), c_print_type_no_offsets(), c_type_print_modifier(), c_type_print_template_args(), type::code(), cp_type_print_derivation_info(), cp_type_print_method_args(), print_offset_data::end_bitpos, f(), type::field(), print_offset_data::finish(), flags, fprintf_styled(), gdb_demangle(), gdb_mangle_name(), gdb_printf(), gdb_puts(), get_vptr_fieldno(), print_offset_data::indentation, field::is_artificial(), fn_field::is_constructor, is_constructor_name(), type::is_declared_class(), is_destructor_name(), field::is_packed(), field::is_static(), type::is_stub(), is_type_conversion_operator(), type::length(), field::loc_bitpos(), type_print_options::local_typedefs, metadata_style, name, field::name(), type::name(), need_access_label_p(), type::num_fields(), print_offset_data::offset_bitpos, output_access_specifier(), fn_field::physname, print_name_maybe_canonical(), type_print_options::print_nested_type_limit, print_spaces(), print_spaces_filtered_with_print_options(), ui_file_style::ptr(), QUIT, typedef_hash_table::recursively_update(), remove_qualifiers(), s_none, cli_style_option::style(), type::target_type(), field::type(), TYPE_FIELD_PRIVATE, TYPE_FIELD_PROTECTED, 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_N_BASECLASSES, TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_TYPE, TYPE_NFN_FIELDS, TYPE_TYPEDEF_FIELD_COUNT, TYPE_TYPEDEF_FIELD_NAME, TYPE_TYPEDEF_FIELD_PRIVATE, TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_TYPE, and print_offset_data::update().

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,
enum language language  )
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,
enum language language )
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,
enum language language ,
const struct type_print_options * flags,
struct print_offset_data * podata )
static

◆ c_type_print_varspec_suffix()

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

◆ 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,
enum language language,
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 73 of file c-typeprint.c.

References typedef_hash_table::find_typedef().

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 590 of file c-typeprint.c.

References CP_OPERATOR_STR, name, 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 const char * remove_qualifiers ( const char * qid)
static

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

References scan().

Referenced by c_type_print_base_struct_union().