aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.h
AgeCommit message (Collapse)AuthorFilesLines
2023-02-13Turn value_type into methodTom Tromey1-1/+1
This changes value_type to be a method of value. Much of this patch was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-03-08Remove EVAL_SKIPTom Tromey1-4/+0
EVAL_SKIP was needed in the old expression implementation due to its linearized tree structure. This is not needed in the new implementation, because it is trivial to not evaluate a subexpression. This patch removes the last vestiges of EVAL_SKIP. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * value.h (eval_skip_value): Don't declare. * opencl-lang.c (eval_opencl_assign): Update. * m2-lang.c (eval_op_m2_high, eval_op_m2_subscript): Update. * f-lang.c (eval_op_f_abs, eval_op_f_mod, eval_op_f_ceil) (eval_op_f_floor, eval_op_f_modulo, eval_op_f_cmplx): Remove. * expression.h (enum noside) <EVAL_SKIP>: Remove. * expop.h (typeof_operation::evaluate) (decltype_operation::evaluate, unop_addr_operation::evaluate) (unop_sizeof_operation::evaluate, assign_operation::evaluate) (cxx_cast_operation::evaluate): Update. * eval.c (eval_skip_value): Remove. (eval_op_scope, eval_op_var_entry_value) (eval_op_func_static_var, eval_op_string, eval_op_objc_selector) (eval_op_concat, eval_op_ternop, eval_op_structop_struct) (eval_op_structop_ptr, eval_op_member, eval_op_add, eval_op_sub) (eval_op_binary, eval_op_subscript, eval_op_equal) (eval_op_notequal, eval_op_less, eval_op_gtr, eval_op_geq) (eval_op_leq, eval_op_repeat, eval_op_plus, eval_op_neg) (eval_op_complement, eval_op_lognot, eval_op_ind) (eval_op_memval, eval_op_preinc, eval_op_predec) (eval_op_postinc, eval_op_postdec, eval_op_type) (eval_binop_assign_modify, eval_op_objc_msgcall) (eval_multi_subscript, logical_and_operation::evaluate) (logical_or_operation::evaluate, array_operation::evaluate) (operation::evaluate_for_cast) (var_msym_value_operation::evaluate_for_cast) (var_value_operation::evaluate_for_cast): Update. * c-lang.c (c_string_operation::evaluate): Update. * c-exp.h (objc_nsstring_operation::evaluate) (objc_selector_operation::evaluate): Update. * ada-lang.c (ada_assign_operation::evaluate) (eval_ternop_in_range, ada_unop_neg, ada_unop_in_range) (ada_atr_size): Update.
2021-03-08Implement OpenCL ternary conditional operatorTom Tromey1-0/+16
This implements the ?: ternary conditional operator for OpenCL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_ternop_cond_operation::evaluate): New method. * c-exp.h (class opencl_ternop_cond_operation): New.
2021-03-08Implement OpenCL logical binary operationsTom Tromey1-0/+17
This implements "&&" and "||" for OpenCL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_logical_binop_operation::evaluate): New method. * c-exp.h (class opencl_logical_binop_operation): New.
2021-03-08Introduce opencl_structop_operationTom Tromey1-0/+16
This adds class opencl_structop_operation, which implements STRUCTOP_STRUCT for OpenCL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_structop_operation::evaluate): New method. * c-exp.h (class opencl_structop_operation): New.
2021-03-08Introduce opencl_notequal_operationTom Tromey1-0/+8
This adds the opencl_notequal_operation typedef, implementing "!=" for OpenCL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_logical_not): No longer static. Change parameters. (evaluate_subexp_opencl): Update. * c-exp.h (opencl_notequal_operation): New typedef.
2021-03-08Implement OpenCL binary operationsTom Tromey1-0/+52
This implements various OpenCL binary operations, adding a new template class to do so. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_relop, eval_opencl_assign): No longer static. Change parameters. (eval_opencl_assign): No longer static. Add "op" parameter. (evaluate_subexp_opencl): Update. * c-exp.h (opencl_binop_operation): New template class. (opencl_assign_operation, opencl_equal_operation) (opencl_notequal_operation, opencl_less_operation) (opencl_gtr_operation, opencl_geq_operation) (opencl_leq_operation): New typedefs.
2021-03-08Introduce opencl_cast_type_operationTom Tromey1-0/+5
This adds class opencl_cast_type_operation, which implements UNOP_CAST_TYPE for OpenCL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * opencl-lang.c (opencl_value_cast): No longer static. * c-exp.h (opencl_cast_type_operation): New typedef.
2021-03-08Introduce objc_msgcall_operationTom Tromey1-0/+17
This adds class objc_msgcall_operation, which implements OP_OBJC_MSGCALL. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * eval.c (objc_msgcall_operation::evaluate): New method. * c-exp.h (class objc_msgcall_operation): New.
2021-03-08Introduce objc_selector_operationTom Tromey1-0/+25
This adds class objc_selector_operation, which implements OP_OBJC_SELECTOR. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * eval.c (eval_op_objc_selector): No longer static. * c-exp.h (class objc_selector_operation): New.
2021-03-08Introduce objc_nsstring_operationTom Tromey1-0/+22
This adds class objc_nsstring_operation, which implements OP_OBJC_NSSTRING. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * eval.c: Include c-exp.h. * c-exp.h (class objc_nsstring_operation): New.
2021-03-08Add c-exp.h and c_string_operationTom Tromey1-0/+46
This adds the new file c-exp.h, where C operation classes will be declared. The first such class, c_string_operation, is also added here. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * c-lang.c (c_string_operation::evaluate): New method. * c-exp.h: New file.