Introduce var_value_operation
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:24 +0000 (07:28 -0700)
commite82a5afcedd98a2ca9c1915bef2938c77e967959
tree3fd2cb49eba253dec29d7ae3ace902c11d831cb2
parentd9ad79d8800c18b70e90e9672b5085246e4fd537
Introduce var_value_operation

This adds class var_value_operation, which implements OP_VAR_VALUE.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

* expop.h (class var_value_operation): New.
* eval.c (var_value_operation::evaluate)
(var_value_operation::evaluate_for_address)
(var_value_operation::evaluate_with_coercion)
(var_value_operation::evaluate_for_sizeof)
(var_value_operation::evaluate_for_cast): New methods.
* ax-gdb.c (var_value_operation::do_generate_ax): New method.
gdb/ChangeLog
gdb/ax-gdb.c
gdb/eval.c
gdb/expop.h