GDB (xrefs)
|
#include "defs.h"
#include "gdbtypes.h"
#include "symtab.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "varobj.h"
#include "c-lang.h"
Go to the source code of this file.
Classes | |
struct | lval_closure |
Macros | |
#define | OCL_P_TYPE(TYPE) |
#define | HEXCHAR_TO_INT(C) |
#define | OCL_STRING(S) #S |
#define | BUILD_OCL_VTYPES(TYPE) |
Enumerations | |
enum | opencl_primitive_types { OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), OCL_P_TYPE =(char), opencl_primitive_type_bool, opencl_primitive_type_unsigned_char, opencl_primitive_type_unsigned_short, opencl_primitive_type_unsigned_int, opencl_primitive_type_unsigned_long, opencl_primitive_type_size_t, opencl_primitive_type_ptrdiff_t, opencl_primitive_type_intptr_t, opencl_primitive_type_uintptr_t, opencl_primitive_type_void, nr_opencl_primitive_types } |
Functions | |
void | _initialize_opencl_language (void) |
static struct type ** | builtin_opencl_type (struct gdbarch *gdbarch) |
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 int | array_has_dups (int *arr, int n) |
static struct lval_closure * | allocate_lval_closure (int *indices, int n, struct value *val) |
static void | lval_func_read (struct value *v) |
static void | lval_func_write (struct value *v, struct value *fromval) |
static int | lval_func_check_synthetic_pointer (const struct value *v, int offset, int length) |
static void * | lval_func_copy_closure (const struct value *v) |
static void | lval_func_free_closure (struct value *v) |
static struct value * | create_value (struct gdbarch *gdbarch, struct value *val, enum noside noside, int *indices, int n) |
static struct value * | opencl_component_ref (struct expression *exp, struct value *val, char *comps, enum noside noside) |
static struct value * | opencl_logical_not (struct expression *exp, struct value *arg) |
static int | scalar_relop (struct value *val1, struct value *val2, enum exp_opcode op) |
static struct value * | vector_relop (struct expression *exp, struct value *val1, struct value *val2, enum exp_opcode op) |
static struct value * | opencl_value_cast (struct type *type, struct value *arg) |
static struct value * | opencl_relop (struct expression *exp, struct value *arg1, struct value *arg2, enum exp_opcode op) |
static struct value * | evaluate_subexp_opencl (struct type *expect_type, struct expression *exp, int *pos, enum noside noside) |
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 void | opencl_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai) |
static void * | build_opencl_types (struct gdbarch *gdbarch) |
Variables | |
static struct gdbarch_data * | opencl_type_data |
static const struct lval_funcs | opencl_value_funcs |
const struct exp_descriptor | exp_descriptor_opencl |
const struct language_defn | opencl_language_defn |
initialize_file_ftype | _initialize_opencl_language |
#define BUILD_OCL_VTYPES | ( | TYPE | ) |
Referenced by build_opencl_types().
#define HEXCHAR_TO_INT | ( | C | ) |
Referenced by opencl_component_ref().
#define OCL_P_TYPE | ( | TYPE | ) |
Definition at line 34 of file opencl-lang.c.
Definition at line 42 of file opencl-lang.c.
void _initialize_opencl_language | ( | void | ) |
Definition at line 1182 of file opencl-lang.c.
References add_language(), build_opencl_types(), and gdbarch_data_register_post_init().
|
static |
Definition at line 155 of file opencl-lang.c.
References lval_closure::indices, lval_closure::n, lval_closure::refc, lval_closure::val, and value_incref().
Referenced by create_value().
Definition at line 120 of file opencl-lang.c.
Referenced by create_value().
|
static |
Definition at line 1092 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.
Referenced by _initialize_opencl_language().
Definition at line 70 of file opencl-lang.c.
References gdbarch_data().
Referenced by lookup_opencl_vector_type(), and opencl_language_arch_info().
|
static |
Definition at line 319 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(), 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 |
Definition at line 729 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_to_int(), lval_internalvar, 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 |
Definition at line 80 of file opencl-lang.c.
References _, builtin_opencl_type(), error(), get_array_bounds(), type::length, 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 |
Definition at line 245 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 279 of file opencl-lang.c.
References lval_closure::refc, and value_computed_closure().
|
static |
Definition at line 289 of file opencl-lang.c.
References lval_closure::indices, lval_closure::refc, lval_closure::val, value_computed_closure(), value_free(), and xfree().
|
static |
Definition at line 170 of file opencl-lang.c.
References _, check_typedef(), error(), gdb_assert, get_array_bounds(), lval_closure::indices, 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().
Definition at line 198 of file opencl-lang.c.
References _, allocate_value(), check_typedef(), error(), gdb_assert, get_array_bounds(), lval_closure::indices, 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 |
Definition at line 381 of file opencl-lang.c.
References _, check_typedef(), create_value(), error(), expression::gdbarch, get_array_bounds(), HEXCHAR_TO_INT, and value_type().
Referenced by evaluate_subexp_opencl().
|
static |
Definition at line 1020 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 |
Definition at line 495 of file opencl-lang.c.
References _, allocate_value(), check_typedef(), error(), expression::gdbarch, get_array_bounds(), language_bool_type(), expression::language_defn, lookup_opencl_vector_type(), 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 |
Definition at line 1001 of file opencl-lang.c.
References c_print_type(), CHECK_TYPEDEF, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_NAME, and TYPE_VECTOR.
|
static |
Definition at line 685 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().
Definition at line 636 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 |
Definition at line 539 of file opencl-lang.c.
References _, error(), value_equal(), value_less(), and value_logical_not().
Referenced by opencl_relop(), and vector_relop().
|
static |
Definition at line 579 of file opencl-lang.c.
References _, allocate_value(), check_typedef(), error(), expression::gdbarch, get_array_bounds(), lookup_opencl_vector_type(), 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().
initialize_file_ftype _initialize_opencl_language |
const struct exp_descriptor exp_descriptor_opencl |
Definition at line 1036 of file opencl-lang.c.
const struct language_defn opencl_language_defn |
Definition at line 1046 of file opencl-lang.c.
|
static |
Definition at line 67 of file opencl-lang.c.
|
static |
Definition at line 303 of file opencl-lang.c.