aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-01-02 11:18:03 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-01-02 11:18:03 +0000
commitf58b38bf6a319bb88f01acfafe5f5e6eb614f79b (patch)
tree401394a32dcb3a3e1a6ea0f2f915b615229bd0c7 /gdb
parent3fe15143a898e68b8468e42bb838a689071eba0b (diff)
downloadgdb-f58b38bf6a319bb88f01acfafe5f5e6eb614f79b.zip
gdb-f58b38bf6a319bb88f01acfafe5f5e6eb614f79b.tar.gz
gdb-f58b38bf6a319bb88f01acfafe5f5e6eb614f79b.tar.bz2
* ada-lang.c (ada_value_equal): Dereference reference types when
comparing arrays.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ada-lang.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 823082e..e2784e8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-02 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-lang.c (ada_value_equal): Dereference reference types when
+ comparing arrays.
+
2008-01-01 Daniel Jacobowitz <dan@codesourcery.com>
Updated copyright notices for most files.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 58a2f57..b3090a3 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -7744,6 +7744,11 @@ ada_value_equal (struct value *arg1, struct value *arg2)
if (ada_is_direct_array_type (value_type (arg1))
|| ada_is_direct_array_type (value_type (arg2)))
{
+ /* Automatically dereference any array reference before
+ we attempt to perform the comparison. */
+ arg1 = ada_coerce_ref (arg1);
+ arg2 = ada_coerce_ref (arg2);
+
arg1 = ada_coerce_to_simple_array (arg1);
arg2 = ada_coerce_to_simple_array (arg2);
if (TYPE_CODE (value_type (arg1)) != TYPE_CODE_ARRAY