summaryrefslogtreecommitdiff
path: root/gdb/ada-exp.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:35 -0700
commitebc06ad8f4365b8881ac40760fbb8cc71b490edd (patch)
tree91145aac4d52025b624e6bbca2f3d53da95762f9 /gdb/ada-exp.h
parente8c33fa16a85801af1812bc9e6120cdf0538b401 (diff)
downloadbinutils-gdb-ebc06ad8f4365b8881ac40760fbb8cc71b490edd.tar.gz
Introduce ada_structop_operation
This adds class ada_structop_operation, which implements STRUCTOP_STRUCT for Ada. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * ada-lang.c (ada_structop_operation::evaluate): New method. * ada-exp.h (class ada_structop_operation): New.
Diffstat (limited to 'gdb/ada-exp.h')
-rw-r--r--gdb/ada-exp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h
index c87036e2d19..34b9c1d166d 100644
--- a/gdb/ada-exp.h
+++ b/gdb/ada-exp.h
@@ -371,6 +371,22 @@ public:
enum noside noside) override;
};
+/* Implement STRUCTOP_STRUCT for Ada. */
+class ada_structop_operation
+ : public structop_base_operation
+{
+public:
+
+ using structop_base_operation::structop_base_operation;
+
+ value *evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside) override;
+
+ enum exp_opcode opcode () const override
+ { return STRUCTOP_STRUCT; }
+};
+
} /* namespace expr */
#endif /* ADA_EXP_H */