mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
Introduce rust_unop_ind_operation
This adds class rust_unop_ind_operation, which implements UNOP_IND for Rust. Rust requires a special case here to handle trait objects. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * rust-lang.c (eval_op_rust_ind): No longer static. Add "opcode" parameter. (rust_evaluate_subexp): Update. * rust-exp.h (class rust_unop_ind_operation): New.
This commit is contained in:
@ -1325,9 +1325,10 @@ rust_subscript (struct type *expect_type, struct expression *exp,
|
||||
|
||||
/* A helper function for UNOP_IND. */
|
||||
|
||||
static struct value *
|
||||
struct value *
|
||||
eval_op_rust_ind (struct type *expect_type, struct expression *exp,
|
||||
enum noside noside,
|
||||
enum exp_opcode opcode,
|
||||
struct value *value)
|
||||
{
|
||||
gdb_assert (noside == EVAL_NORMAL);
|
||||
@ -1521,7 +1522,7 @@ rust_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
||||
++*pos;
|
||||
struct value *value = evaluate_subexp (expect_type, exp, pos,
|
||||
noside);
|
||||
result = eval_op_rust_ind (expect_type, exp, noside, value);
|
||||
result = eval_op_rust_ind (expect_type, exp, noside, op, value);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user