summaryrefslogtreecommitdiff
path: root/gdb/ada-exp.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-03-09 14:34:22 -0700
committerTom Tromey <tromey@adacore.com>2022-03-16 09:28:13 -0600
commitb1b9c4115ed04876813a40c0051636c0ad916993 (patch)
tree8f03d73466e7988072b42d9342e08001753675ef /gdb/ada-exp.h
parenta73c128df6e149c36940240f2b2198f9732ab6c7 (diff)
downloadbinutils-gdb-b1b9c4115ed04876813a40c0051636c0ad916993.tar.gz
Reimplement array concatenation for Ada and D
This started as a patch to implement string concatenation for Ada. However, while working on this, I looked at how this code could possibly be called. It turns out there are only two users of concat_operation: Ada and D. So, in addition to implementing this for Ada, this patch rewrites value_concat, removing the odd "concatenate or repeat" semantics, which were completely unused. As Ada and D both seem to represent strings using TYPE_CODE_ARRAY, this removes the TYPE_CODE_STRING code from there as well.
Diffstat (limited to 'gdb/ada-exp.h')
-rw-r--r--gdb/ada-exp.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h
index 765f0dca3c5..44ca2545670 100644
--- a/gdb/ada-exp.h
+++ b/gdb/ada-exp.h
@@ -769,6 +769,21 @@ public:
bool parse_completion,
innermost_block_tracker *tracker,
struct type *context_type) override;
+
+ value *evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside) override;
+};
+
+class ada_concat_operation : public concat_operation
+{
+public:
+
+ using concat_operation::concat_operation;
+
+ value *evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside) override;
};
} /* namespace expr */