diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ada-exp.h | 16 | ||||
-rw-r--r-- | gdb/ada-lang.c | 9 |
3 files changed, 30 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 816f5a8..337813d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2021-03-08 Tom Tromey <tom@tromey.com> + * ada-lang.c (ada_qual_operation::evaluate): New method. + * ada-exp.h (class ada_qual_operation): New. + +2021-03-08 Tom Tromey <tom@tromey.com> + * ada-lang.c (ada_string_operation::evaluate): New method. * ada-exp.h (class ada_string_operation): New. diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h index 88ed0c5..9a8c8df 100644 --- a/gdb/ada-exp.h +++ b/gdb/ada-exp.h @@ -55,6 +55,22 @@ public: enum noside noside) override; }; +/* The Ada TYPE'(EXP) construct. */ +class ada_qual_operation + : public tuple_holding_operation<operation_up, struct type *> +{ +public: + + using tuple_holding_operation::tuple_holding_operation; + + value *evaluate (struct type *expect_type, + struct expression *exp, + enum noside noside) override; + + enum exp_opcode opcode () const override + { return UNOP_QUAL; } +}; + } /* namespace expr */ #endif /* ADA_EXP_H */ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 0666302..409ffb9 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10427,6 +10427,15 @@ ada_string_operation::evaluate (struct type *expect_type, return result; } +value * +ada_qual_operation::evaluate (struct type *expect_type, + struct expression *exp, + enum noside noside) +{ + struct type *type = std::get<1> (m_storage); + return std::get<0> (m_storage)->evaluate (type, exp, noside); +} + } /* Implement the evaluate_exp routine in the exp_descriptor structure |