GDB (xrefs)

Classes | Functions
compile-c-types.c File Reference
`#include "defs.h"`
`#include "gdbtypes.h"`
`#include "compile-internal.h"`
`#include "objfiles.h"`

Go to the source code of this file.

## Classes
struct | type_map_instance

## Functions
static hashval_t | hash_type_map_instance (const void *p)
static int | eq_type_map_instance (const void *a, const void *b)
static void | insert_type (struct compile_c_instance *context, struct type *type, gcc_type gcc_type)
static gcc_type | convert_pointer (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_array (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_struct_or_union (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_enum (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_func (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_int (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_float (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_void (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_bool (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_qualified (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_complex (struct compile_c_instance *context, struct type *type)
static gcc_type | convert_type_basic (struct compile_c_instance *context, struct type *type)
gcc_type | convert_type (struct compile_c_instance *context, struct type *type)
static void | delete_instance (struct compile_instance *c)
struct compile_instance * | new_compile_instance (struct gcc_c_context *fe)

## Function Documentation

## ◆ convert_array()

static gcc_type convert_array | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 108 of file compile-c-types.c.

References _, C_CTX, c_get_range_decl_name(), convert_type(), gdb_assert, get_array_bounds(), PROP_CONST, PROP_LOCEXPR, PROP_LOCLIST, string, TYPE_HIGH_BOUND_KIND, TYPE_INDEX_TYPE, TYPE_LOW_BOUND, TYPE_LOW_BOUND_KIND, TYPE_RANGE_DATA, TYPE_TARGET_TYPE, and TYPE_VECTOR.

Referenced by convert_type_basic().

## ◆ convert_bool()

static gcc_type convert_bool | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 301 of file compile-c-types.c.

References C_CTX.

Referenced by convert_type_basic().

## ◆ convert_complex()

static gcc_type convert_complex | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 332 of file compile-c-types.c.

References C_CTX, convert_type(), and TYPE_TARGET_TYPE.

Referenced by convert_type_basic().

## ◆ convert_enum()

static gcc_type convert_enum | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 204 of file compile-c-types.c.

References C_CTX, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_LENGTH, TYPE_NFIELDS, and TYPE_UNSIGNED.

Referenced by convert_type_basic().

## ◆ convert_float()

static gcc_type convert_float | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 284 of file compile-c-types.c.

References C_CTX, and TYPE_LENGTH.

Referenced by convert_type_basic().

## ◆ convert_func()

static gcc_type convert_func | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 231 of file compile-c-types.c.

References _, builtin_type::builtin_int, objfile_type::builtin_int, builtin_type(), C_CTX, convert_type(), objfile_type(), TYPE_FIELD_TYPE, TYPE_NFIELDS, TYPE_OBJFILE_OWNED, TYPE_OWNER, TYPE_PROTOTYPED, TYPE_TARGET_TYPE, TYPE_VARARGS, warning(), xfree(), and XNEWVEC.

Referenced by convert_type_basic().

## ◆ convert_int()

static gcc_type convert_int | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 274 of file compile-c-types.c.

References C_CTX, TYPE_LENGTH, and TYPE_UNSIGNED.

Referenced by convert_type_basic().

## ◆ convert_pointer()

static gcc_type convert_pointer | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 97 of file compile-c-types.c.

References C_CTX, convert_type(), and TYPE_TARGET_TYPE.

Referenced by convert_type_basic().

## ◆ convert_qualified()

static gcc_type convert_qualified | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 309 of file compile-c-types.c.

References C_CTX, convert_type(), make_unqualified_type(), TYPE_CONST, TYPE_RESTRICT, and TYPE_VOLATILE.

Referenced by convert_type_basic().

## ◆ convert_struct_or_union()

static gcc_type convert_struct_or_union | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 165 of file compile-c-types.c.

References C_CTX, convert_type(), gdb_assert, insert_type(), TYPE_CODE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD_BITPOS, TYPE_FIELD_BITSIZE, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_LENGTH, and TYPE_NFIELDS.

Referenced by convert_type_basic().

## ◆ convert_type()

gcc_type convert_type | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |

Definition at line 411 of file compile-c-types.c.

References check_typedef(), convert_type_basic(), type_map_instance::gcc_type_handle, insert_type(), type_map_instance::type, type, and compile_c_instance::type_map.

Referenced by convert_array(), convert_complex(), convert_func(), convert_one_symbol(), convert_pointer(), convert_qualified(), convert_struct_or_union(), and convert_symbol_bmsym().

## ◆ convert_type_basic()

static gcc_type convert_type_basic | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 345 of file compile-c-types.c.

References _, builtin_type::builtin_int, objfile_type::builtin_int, builtin_type(), C_CTX, convert_array(), convert_bool(), convert_complex(), convert_enum(), convert_float(), convert_func(), convert_int(), convert_pointer(), convert_qualified(), convert_struct_or_union(), convert_void(), objfile_type(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_COMPLEX, TYPE_CODE_ENUM, TYPE_CODE_ERROR, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_RESTRICT, TYPE_INSTANCE_FLAG_VOLATILE, TYPE_INSTANCE_FLAGS, TYPE_OBJFILE_OWNED, TYPE_OWNER, and warning().

Referenced by convert_type().

## ◆ convert_void()

static gcc_type convert_void | ( | struct compile_c_instance * | context,
|  | struct type * | type
| ) |  |
| static

Definition at line 293 of file compile-c-types.c.

References C_CTX.

Referenced by convert_type_basic().

## ◆ delete_instance()

static void delete_instance | ( | struct compile_instance * | c | ) |
| static

Definition at line 435 of file compile-c-types.c.

References compile_c_instance::base, compile_instance::fe, compile_c_instance::symbol_err_map, compile_c_instance::type_map, and xfree().

Referenced by new_compile_instance().

## ◆ eq_type_map_instance()

static int eq_type_map_instance | ( | const void * | a,
|  | const void * | b
| ) |  |
| static

Definition at line 52 of file compile-c-types.c.

References type_map_instance::type.

Referenced by new_compile_instance().

## ◆ hash_type_map_instance()

static hashval_t hash_type_map_instance | ( | const void * | p | ) |
| static

Definition at line 42 of file compile-c-types.c.

References type_map_instance::type.

Referenced by new_compile_instance().

## ◆ insert_type()

static void insert_type | ( | struct compile_c_instance * | context,
|  | struct type * | type,
|  | gcc_type | gcc_type
| ) |  |
| static

Definition at line 70 of file compile-c-types.c.

References _, error(), type_map_instance::gcc_type_handle, type_map_instance::type, type, compile_c_instance::type_map, and XNEW.

Referenced by convert_struct_or_union(), convert_type(), and yyparse().

## ◆ new_compile_instance()

struct compile_instance* new_compile_instance | ( | struct gcc_c_context * | fe | ) |

Definition at line 449 of file compile-c-types.c.

References compile_c_instance::base, delete_instance(), compile_instance::destroy, eq_type_map_instance(), compile_instance::fe, gcc_convert_symbol, gcc_symbol_address, compile_instance::gcc_target_options, hash_type_map_instance(), compile_c_instance::type_map, xcalloc(), XCNEW, and xfree().

Referenced by c_get_compile_context().