|
GDB (xrefs)
|
#include "defs.h"#include "gdb_string.h"#include "gdbtypes.h"#include "symtab.h"#include "expression.h"#include "parser-defs.h"#include "language.h"#include "c-lang.h"#include "gdb_assert.h"Go to the source code of this file.
| #define BUILD_OCL_VTYPES | ( | TYPE | ) |
types[opencl_primitive_type_##TYPE##2] \
= init_vector_type (types[opencl_primitive_type_##TYPE], 2); \
TYPE_NAME (types[opencl_primitive_type_##TYPE##2]) = OCL_STRING(TYPE ## 2); \
types[opencl_primitive_type_##TYPE##3] \
= init_vector_type (types[opencl_primitive_type_##TYPE], 3); \
TYPE_NAME (types[opencl_primitive_type_##TYPE##3]) = OCL_STRING(TYPE ## 3); \
TYPE_LENGTH (types[opencl_primitive_type_##TYPE##3]) \
= 4 * TYPE_LENGTH (types[opencl_primitive_type_##TYPE]); \
types[opencl_primitive_type_##TYPE##4] \
= init_vector_type (types[opencl_primitive_type_##TYPE], 4); \
TYPE_NAME (types[opencl_primitive_type_##TYPE##4]) = OCL_STRING(TYPE ## 4); \
types[opencl_primitive_type_##TYPE##8] \
= init_vector_type (types[opencl_primitive_type_##TYPE], 8); \
TYPE_NAME (types[opencl_primitive_type_##TYPE##8]) = OCL_STRING(TYPE ## 8); \
types[opencl_primitive_type_##TYPE##16] \
= init_vector_type (types[opencl_primitive_type_##TYPE], 16); \
TYPE_NAME (types[opencl_primitive_type_##TYPE##16]) = OCL_STRING(TYPE ## 16)
Referenced by build_opencl_types().
| #define HEXCHAR_TO_INT | ( | C | ) |
((C >= '0' && C <= '9') ? \ C-'0' : ((C >= 'A' && C <= 'F') ? \ C-'A'+10 : ((C >= 'a' && C <= 'f') ? \ C-'a'+10 : -1)))
Referenced by opencl_component_ref().
| #define OCL_P_TYPE | ( | TYPE | ) |
opencl_primitive_type_##TYPE,\ opencl_primitive_type_##TYPE##2,\ opencl_primitive_type_##TYPE##3,\ opencl_primitive_type_##TYPE##4,\ opencl_primitive_type_##TYPE##8,\ opencl_primitive_type_##TYPE##16
Definition at line 36 of file opencl-lang.c.
| #define OCL_STRING | ( | S | ) | #S |
Definition at line 44 of file opencl-lang.c.
| void _initialize_opencl_language | ( | void | ) |
| static struct lval_closure* allocate_lval_closure | ( | int * | indices, |
| int | n, | ||
| struct value * | val | ||
| ) | [static, read] |
Definition at line 157 of file opencl-lang.c.
References lval_closure::indices, memcpy(), lval_closure::n, lval_closure::refc, lval_closure::val, value_incref(), XCALLOC, and XZALLOC.
Referenced by create_value().
| static int array_has_dups | ( | int * | arr, |
| int | n | ||
| ) | [static] |
Definition at line 122 of file opencl-lang.c.
Referenced by create_value().
| static void* build_opencl_types | ( | struct gdbarch * | gdbarch | ) | [static] |
Definition at line 1144 of file opencl-lang.c.
References arch_boolean_type(), arch_float_type(), arch_integer_type(), arch_type(), BUILD_OCL_VTYPES, floatformats_ieee_double, floatformats_ieee_half, floatformats_ieee_single, GDBARCH_OBSTACK_CALLOC, gdbarch_ptr_bit(), nr_opencl_primitive_types, opencl_primitive_type_bool, opencl_primitive_type_intptr_t, opencl_primitive_type_ptrdiff_t, opencl_primitive_type_size_t, opencl_primitive_type_uintptr_t, opencl_primitive_type_unsigned_char, opencl_primitive_type_unsigned_int, opencl_primitive_type_unsigned_long, opencl_primitive_type_unsigned_short, opencl_primitive_type_void, and TYPE_CODE_VOID.
| static struct type** builtin_opencl_type | ( | struct gdbarch * | gdbarch | ) | [static, read] |
Definition at line 72 of file opencl-lang.c.
References gdbarch_data().
Referenced by lookup_opencl_vector_type(), and opencl_language_arch_info().
| static struct value* create_value | ( | struct gdbarch * | gdbarch, |
| struct value * | val, | ||
| enum noside | noside, | ||
| int * | indices, | ||
| int | n | ||
| ) | [static, read] |
Definition at line 375 of file opencl-lang.c.
References allocate_computed_value(), allocate_lval_closure(), allocate_value(), array_has_dups(), check_typedef(), EVAL_AVOID_SIDE_EFFECTS, init_vector_type(), lookup_opencl_vector_type(), make_cv_type(), memcpy(), lval_closure::n, not_lval, TYPE_CODE, TYPE_CONST, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_UNSIGNED, TYPE_VOLATILE, value_contents(), value_contents_writeable(), VALUE_LVAL, value_subscript(), value_type(), and value_zero().
Referenced by opencl_component_ref().
| static struct value* evaluate_subexp_opencl | ( | struct type * | expect_type, |
| struct expression * | exp, | ||
| int * | pos, | ||
| enum noside | noside | ||
| ) | [static, read] |
Definition at line 785 of file opencl-lang.c.
References _, allocate_value(), BYTES_TO_EXP_ELEM, check_typedef(), deprecated_value_modifiable(), expression::elts, error(), EVAL_AVOID_SIDE_EFFECTS, EVAL_SKIP, evaluate_subexp(), evaluate_subexp_c(), expression::gdbarch, get_array_bounds(), language_bool_type(), expression::language_defn, exp_element::longconst, LONGEST, longest_to_int(), lval_internalvar, memcpy(), not_lval, NULL_TYPE, exp_element::opcode, opencl_component_ref(), opencl_logical_not(), opencl_relop(), opencl_value_cast(), exp_element::string, exp_element::type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_UNSIGNED, TYPE_VECTOR, value_assign(), value_contents_all(), value_contents_writeable(), value_from_longest(), value_logical_not(), VALUE_LVAL, value_struct_elt(), value_subscript(), value_type(), and value_zero().
| static struct type* lookup_opencl_vector_type | ( | struct gdbarch * | gdbarch, |
| enum type_code | code, | ||
| unsigned int | el_length, | ||
| unsigned int | flag_unsigned, | ||
| int | n | ||
| ) | [static, read] |
Definition at line 82 of file opencl-lang.c.
References _, builtin_opencl_type(), error(), get_array_bounds(), type::length, LONGEST, nr_opencl_primitive_types, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_UNSIGNED, and TYPE_VECTOR.
Referenced by create_value(), opencl_logical_not(), and vector_relop().
| static int lval_func_check_any_valid | ( | const struct value * | v | ) | [static] |
Definition at line 280 of file opencl-lang.c.
References check_typedef(), lval_closure::indices, lval_closure::n, TYPE_LENGTH, TYPE_TARGET_TYPE, lval_closure::val, value_bits_valid(), value_computed_closure(), and value_type().
| static int lval_func_check_synthetic_pointer | ( | const struct value * | v, |
| int | offset, | ||
| int | length | ||
| ) | [static] |
Definition at line 299 of file opencl-lang.c.
References check_typedef(), lval_closure::indices, lval_closure::n, TYPE_LENGTH, TYPE_TARGET_TYPE, lval_closure::val, value_bits_synthetic_pointer(), value_computed_closure(), and value_type().
Definition at line 246 of file opencl-lang.c.
References check_typedef(), lval_closure::indices, lval_closure::n, TYPE_LENGTH, TYPE_TARGET_TYPE, lval_closure::val, value_bits_valid(), value_computed_closure(), and value_type().
| static void* lval_func_copy_closure | ( | const struct value * | v | ) | [static] |
Definition at line 333 of file opencl-lang.c.
References lval_closure::refc, and value_computed_closure().
| static void lval_func_free_closure | ( | struct value * | v | ) | [static] |
Definition at line 343 of file opencl-lang.c.
References lval_closure::indices, lval_closure::refc, lval_closure::val, value_computed_closure(), value_free(), and xfree().
| static void lval_func_read | ( | struct value * | v | ) | [static] |
Definition at line 172 of file opencl-lang.c.
References _, check_typedef(), error(), gdb_assert, get_array_bounds(), lval_closure::indices, LONGEST, memcpy(), offset, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, lval_closure::val, value_computed_closure(), value_contents(), value_contents_raw(), value_offset(), and value_type().
| static void lval_func_write | ( | struct value * | v, |
| struct value * | fromval | ||
| ) | [static] |
Definition at line 200 of file opencl-lang.c.
References _, allocate_value(), check_typedef(), error(), gdb_assert, get_array_bounds(), lval_closure::indices, LONGEST, memcpy(), lval_closure::n, offset, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_LENGTH, TYPE_TARGET_TYPE, lval_closure::val, value_assign(), value_computed_closure(), value_contents(), value_contents_writeable(), value_free_to_mark(), value_mark(), value_offset(), value_subscript(), and value_type().
| static struct value* opencl_component_ref | ( | struct expression * | exp, |
| struct value * | val, | ||
| char * | comps, | ||
| enum noside | noside | ||
| ) | [static, read] |
Definition at line 437 of file opencl-lang.c.
References _, check_typedef(), create_value(), error(), expression::gdbarch, get_array_bounds(), HEXCHAR_TO_INT, LONGEST, and value_type().
Referenced by evaluate_subexp_opencl().
| static void opencl_language_arch_info | ( | struct gdbarch * | gdbarch, |
| struct language_arch_info * | lai | ||
| ) | [static] |
Definition at line 1076 of file opencl-lang.c.
References language_arch_info::bool_type_default, language_arch_info::bool_type_symbol, builtin_opencl_type(), language_arch_info::primitive_type_vector, and language_arch_info::string_char_type.
| static struct value* opencl_logical_not | ( | struct expression * | exp, |
| struct value * | arg | ||
| ) | [static, read] |
Definition at line 551 of file opencl-lang.c.
References _, allocate_value(), check_typedef(), error(), expression::gdbarch, get_array_bounds(), language_bool_type(), expression::language_defn, LONGEST, lookup_opencl_vector_type(), memset(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_INT, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_VECTOR, value_contents_writeable(), value_from_longest(), value_logical_not(), value_subscript(), and value_type().
Referenced by evaluate_subexp_opencl().
| static void opencl_print_type | ( | struct type * | type, |
| const char * | varstring, | ||
| struct ui_file * | stream, | ||
| int | show, | ||
| int | level, | ||
| const struct type_print_options * | flags | ||
| ) | [static] |
Definition at line 1057 of file opencl-lang.c.
References c_print_type(), CHECK_TYPEDEF, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_NAME, and TYPE_VECTOR.
| static struct value* opencl_relop | ( | struct expression * | exp, |
| struct value * | arg1, | ||
| struct value * | arg2, | ||
| enum exp_opcode | op | ||
| ) | [static, read] |
Definition at line 741 of file opencl-lang.c.
References _, check_typedef(), error(), expression::gdbarch, is_integral_type(), language_bool_type(), expression::language_defn, opencl_value_cast(), scalar_relop(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_FLT, TYPE_VECTOR, value_from_longest(), value_type(), and vector_relop().
Referenced by evaluate_subexp_opencl().
| static struct value* opencl_value_cast | ( | struct type * | type, |
| struct value * | arg | ||
| ) | [static, read] |
Definition at line 692 of file opencl-lang.c.
References check_typedef(), coerce_ref(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_DECFLOAT, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_TARGET_TYPE, TYPE_VECTOR, value_cast(), value_type(), and value_vector_widen().
Referenced by evaluate_subexp_opencl(), and opencl_relop().
| static int scalar_relop | ( | struct value * | val1, |
| struct value * | val2, | ||
| enum exp_opcode | op | ||
| ) | [static] |
Definition at line 595 of file opencl-lang.c.
References _, error(), value_equal(), value_less(), and value_logical_not().
Referenced by opencl_relop(), and vector_relop().
| static struct value* vector_relop | ( | struct expression * | exp, |
| struct value * | val1, | ||
| struct value * | val2, | ||
| enum exp_opcode | op | ||
| ) | [static, read] |
Definition at line 635 of file opencl-lang.c.
References _, allocate_value(), check_typedef(), error(), expression::gdbarch, get_array_bounds(), LONGEST, lookup_opencl_vector_type(), memset(), scalar_relop(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_INT, TYPE_LENGTH, TYPE_TARGET_TYPE, TYPE_UNSIGNED, TYPE_VECTOR, value_contents_writeable(), value_subscript(), and value_type().
Referenced by opencl_relop().
Definition at line 1234 of file opencl-lang.c.
Referenced by initialize_all_files().
{
print_subexp_standard,
operator_length_standard,
operator_check_standard,
op_name_standard,
dump_subexp_body_standard,
evaluate_subexp_opencl
}
Definition at line 1092 of file opencl-lang.c.
Definition at line 1102 of file opencl-lang.c.
struct gdbarch_data* opencl_type_data [static] |
Definition at line 69 of file opencl-lang.c.
struct lval_funcs opencl_value_funcs [static] |
{
lval_func_read,
lval_func_write,
lval_func_check_validity,
lval_func_check_any_valid,
NULL,
NULL,
lval_func_check_synthetic_pointer,
lval_func_copy_closure,
lval_func_free_closure
}
Definition at line 357 of file opencl-lang.c.
1.7.6.1