* [RFA/Ada 1/4] Full view of interface-wide types
@ 2012-11-29 13:37 Jerome Guitton
2012-11-29 13:37 ` [RFA/testsuite 4/4] update ptype_tagged_param.exp Jerome Guitton
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Jerome Guitton @ 2012-11-29 13:37 UTC (permalink / raw)
To: gdb-patches; +Cc: Jerome Guitton
For displaying the full view of a class-wide object, GDB relies on
the assumption that this view will have the same address as the
address of the object. In the case of simple inheritance, this
assumption is correct; the proper type is deduced by decoding
the tag of the object and converting the result to this full-view
type.
Consider for example an abstract class Shape, a child Circle
which implements an interface Drawable, and the corresponding
following objects:
My_Circle : Circle := ((1, 2), 3);
My_Shape : Shape'Class := Shape'Class (My_Circle);
My_Drawable : Drawable'Class := Drawable'Class (My_Circle);
To display My_Shape, the debugger first extracts the tag (an internal
field, usually the first one of the record):
(gdb) p my_shape'address
$2 = (system.address) 0x8063e28
(gdb) x/x my_shape'address
0x8063e28 <classes__my_shape>: 0x08059ec4
Then the type specific data and the expanded name of the tag is read
from there:
(gdb) p my_shape'tag
$3 = (access ada.tags.dispatch_table) 0x8059ec4 (classes.circle)
To get the full view, the debugger converts to the corresponding type:
(gdb) p {classes.circle}0x8063e28
$4 = (center => (x => 1, y => 2), radius => 3)
Now, in the case of multiple inheritance, the assumption does not hold
anymore. The address that we have usually points to some
place lower. The offset to the original address is saved in the field
Offset_To_Top of the metadata that are above the tag, at address
obj'tag - 8. In the case of my_shape, this offset is 0:
(gdb) x/x my_shape'tag - 8
0x8059ebc <classes__circleT+12>: 0x00000000
...but in the case of an interface-wide object, it is not null:
(gdb) x/x my_drawable'tag - 8
0x8063b28 <classes__classes__circle_classes__drawable1T56s+12>: 0x00000004
(gdb) p {classes.circle}(my_drawable'address - 4)
$7 = (center => (x => 1, y => 2), radius => 3)
The following change handles this relocation in the most common cases.
Remaining cases that are still to be investigated are signaled by
comments.
gdb/ChangeLog:
* ada-lang.h (ada_tag_value_at_base_address): New function
declaration.
* ada-lang.c (is_ada95_tag, ada_tag_value_at_base_address):
New functions.
(ada_to_fixed_type_1, ada_evaluate_subexp): Let ada_tag_base_address
relocate the class-wide value if need be.
* (ada_value_struct_elt, ada_value_ind, ada_coerce_ref):
Let ada_tag_value_at_base_address relocate the class-wide access/ref
before dereferencing it.
* ada-valprint.c (ada_val_print_1): Relocate to base address
before displaying the content of a interface-wide ref.
OK to apply?
---
gdb/ada-lang.c | 158 +++++++++++++++++++++++++++++++++++++++++++++-------
gdb/ada-lang.h | 2 +
gdb/ada-valprint.c | 6 ++
3 files changed, 145 insertions(+), 21 deletions(-)
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index ee2f765..a34ba29 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -6009,6 +6009,15 @@ ada_tag_type (struct value *val)
return ada_lookup_struct_elt_type (value_type (val), "_tag", 1, 0, NULL);
}
+/* Return 1 if TAG follows the old scheme for Ada tags (used for Ada 95,
+ retired at Ada 05). */
+
+static int
+is_ada95_tag (struct value *tag)
+{
+ return ada_value_struct_elt (tag, "tsd", 1) != NULL;
+}
+
/* The value of the tag on VAL. */
struct value *
@@ -6052,6 +6061,88 @@ type_from_tag (struct value *tag)
return NULL;
}
+/* Given a value OBJ of a tagged type, return a value of this
+ type at the base address of the object. The base address, as
+ defined in Ada.Tags, it is the address of the primary tag of
+ the object, and therefore where the field values of its full
+ view can be fetched. */
+
+struct value *
+ada_tag_value_at_base_address (struct value *obj)
+{
+ volatile struct gdb_exception e;
+ struct value *val;
+ LONGEST offset_to_top = 0;
+ struct type *ptr_type, *obj_type;
+ struct value *tag;
+ CORE_ADDR base_address;
+
+ obj_type = value_type (obj);
+
+ /* It is the responsability of the caller to deref pointers. */
+
+ if (TYPE_CODE (obj_type) == TYPE_CODE_PTR
+ || TYPE_CODE (obj_type) == TYPE_CODE_REF)
+ return obj;
+
+ tag = ada_value_tag (obj);
+ if (!tag)
+ return obj;
+
+ /* Base addresses only appeared with Ada 05 and multiple inheritance. */
+
+ if (is_ada95_tag (tag))
+ return obj;
+
+ ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
+ ptr_type = lookup_pointer_type (ptr_type);
+ val = value_cast (ptr_type, tag);
+ if (!val)
+ return obj;
+
+ /* It is perfectly possible that an exception be raised while
+ trying to determine the base address, just like for the tag;
+ see ada_tag_name for more details. We do not print the error
+ message for the same reason. */
+
+ TRY_CATCH (e, RETURN_MASK_ERROR)
+ {
+ offset_to_top = value_as_long (value_ind (value_ptradd (val, -2)));
+ }
+
+ if (e.reason < 0)
+ return obj;
+
+ /* If offset is null, nothing to do. */
+
+ if (offset_to_top == 0)
+ return obj;
+
+ /* -1 is a special case in Ada.Tags; however, what should be done
+ is not quite clear from the documentation. So do nothing for
+ now. */
+
+ if (offset_to_top == -1)
+ return obj;
+
+ base_address = value_address (obj) - offset_to_top;
+ tag = value_tag_from_contents_and_address (obj_type, NULL, base_address);
+
+ /* Make sure that we have a proper tag at the new address.
+ Otherwise, offset_to_top is bogus (which can happen when
+ the object is not initialized yet). */
+
+ if (!tag)
+ return obj;
+
+ obj_type = type_from_tag (tag);
+
+ if (!obj_type)
+ return obj;
+
+ return value_from_contents_and_address (obj_type, NULL, base_address);
+}
+
/* Return the "ada__tags__type_specific_data" type. */
static struct type *
@@ -6707,9 +6798,9 @@ ada_value_struct_elt (struct value *arg, char *name, int no_err)
CORE_ADDR address;
if (TYPE_CODE (t) == TYPE_CODE_PTR)
- address = value_as_address (arg);
+ address = value_address (ada_value_ind (arg));
else
- address = unpack_pointer (t, value_contents (arg));
+ address = value_address (ada_coerce_ref (arg));
t1 = ada_to_fixed_type (ada_get_base_type (t1), NULL, address, NULL, 1);
if (find_struct_field (name, t1, 0,
@@ -6985,6 +7076,9 @@ ada_value_ind (struct value *val0)
{
struct value *val = value_ind (val0);
+ if (ada_is_tagged_type (value_type (val), 0))
+ val = ada_tag_value_at_base_address (val);
+
return ada_to_fixed_value (val);
}
@@ -6999,6 +7093,10 @@ ada_coerce_ref (struct value *val0)
struct value *val = val0;
val = coerce_ref (val);
+
+ if (ada_is_tagged_type (value_type (val), 0))
+ val = ada_tag_value_at_base_address (val);
+
return ada_to_fixed_value (val);
}
else
@@ -7982,14 +8080,20 @@ ada_to_fixed_type_1 (struct type *type, const gdb_byte *valaddr,
if (check_tag && address != 0 && ada_is_tagged_type (static_type, 0))
{
- struct type *real_type =
- type_from_tag (value_tag_from_contents_and_address
- (fixed_record_type,
- valaddr,
- address));
-
+ struct value *tag =
+ value_tag_from_contents_and_address
+ (fixed_record_type,
+ valaddr,
+ address);
+ struct type *real_type = type_from_tag (tag);
+ struct value *obj =
+ value_from_contents_and_address (fixed_record_type,
+ valaddr,
+ address);
if (real_type != NULL)
- return to_fixed_record_type (real_type, valaddr, address, NULL);
+ return to_fixed_record_type
+ (real_type, NULL,
+ value_address (ada_tag_value_at_base_address (obj)), NULL);
}
/* Check to see if there is a parallel ___XVZ variable.
@@ -9692,19 +9796,31 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
a fixed type would result in the loss of that type name,
thus preventing us from printing the name of the ancestor
type in the type description. */
- struct type *actual_type;
-
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_NORMAL);
- actual_type = type_from_tag (ada_value_tag (arg1));
- if (actual_type == NULL)
- /* If, for some reason, we were unable to determine
- the actual type from the tag, then use the static
- approximation that we just computed as a fallback.
- This can happen if the debugging information is
- incomplete, for instance. */
- actual_type = type;
-
- return value_zero (actual_type, not_lval);
+
+ if (TYPE_CODE (type) != TYPE_CODE_REF)
+ {
+ struct type *actual_type;
+
+ actual_type = type_from_tag (ada_value_tag (arg1));
+ if (actual_type == NULL)
+ /* If, for some reason, we were unable to determine
+ the actual type from the tag, then use the static
+ approximation that we just computed as a fallback.
+ This can happen if the debugging information is
+ incomplete, for instance. */
+ actual_type = type;
+ return value_zero (actual_type, not_lval);
+ }
+ else
+ {
+ /* In the case of a ref, ada_coerce_ref takes care
+ of determining the actual type. But the evaluation
+ should return a ref as it should be valid to ask
+ for its address; so rebuild a ref after coerce. */
+ arg1 = ada_coerce_ref (arg1);
+ return value_ref (arg1);
+ }
}
*pos += 4;
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index fa6934b..f6154fd 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -278,6 +278,8 @@ extern struct value *ada_value_tag (struct value *);
extern const char *ada_tag_name (struct value *);
+extern struct value *ada_tag_value_at_base_address (struct value *obj);
+
extern int ada_is_parent_field (struct type *, int);
extern int ada_is_wrapper_field (struct type *, int);
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index ca30e42..20bb12e 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -891,6 +891,9 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
deref_val = coerce_ref_if_computed (original_value);
if (deref_val)
{
+ if (ada_is_tagged_type (value_type (deref_val), 1))
+ deref_val = ada_tag_value_at_base_address (deref_val);
+
common_val_print (deref_val, stream, recurse + 1, options,
current_language);
break;
@@ -904,6 +907,9 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
(lookup_pointer_type (elttype),
deref_val_int));
+ if (ada_is_tagged_type (value_type (deref_val), 1))
+ deref_val = ada_tag_value_at_base_address (deref_val);
+
val_print (value_type (deref_val),
value_contents_for_printing (deref_val),
value_embedded_offset (deref_val),
--
1.7.10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFA/Ada 2/4] Strip interface tags from visible fields
2012-11-29 13:37 [RFA/Ada 1/4] Full view of interface-wide types Jerome Guitton
2012-11-29 13:37 ` [RFA/testsuite 4/4] update ptype_tagged_param.exp Jerome Guitton
@ 2012-11-29 13:37 ` Jerome Guitton
2012-11-29 14:20 ` Joel Brobecker
2012-11-29 13:37 ` [RFA/testsuite 3/4] New testcase for interface type printing Jerome Guitton
2012-11-29 14:20 ` [RFA/Ada 1/4] Full view of interface-wide types Joel Brobecker
3 siblings, 1 reply; 9+ messages in thread
From: Jerome Guitton @ 2012-11-29 13:37 UTC (permalink / raw)
To: gdb-patches; +Cc: Jerome Guitton
The following Ada type:
type Circle is new Shape and Drawable with record
Center : Point;
Radius : Natural;
end record;
...is displayed as follow in GDB:
(gdb) ptype circle
type = new classes.shape with record
V51s: ada.tags.interface_tag;
center: classes.point;
radius: natural;
end record
V51s is an internal field that is of no interest for the user. It should
not be displayed.
gdb/ChangeLog:
* ada-lang.c (ada_is_interface_tag): New function.
(ada_is_ignored_field): Add interface tags to the list
of ignored fields.
OK to apply?
---
gdb/ada-lang.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index a34ba29..deefcfb 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5937,6 +5937,19 @@ ada_is_dispatch_table_ptr_type (struct type *type)
return (strcmp (name, "ada__tags__dispatch_table") == 0);
}
+/* Return non-zero if TYPE is an interface tag. */
+
+static int
+ada_is_interface_tag (struct type *type)
+{
+ const char *name = TYPE_NAME (type);
+
+ if (name == NULL)
+ return 0;
+
+ return (strcmp (name, "ada__tags__interface_tag") == 0);
+}
+
/* True if field number FIELD_NUM in struct or union type TYPE is supposed
to be invisible to users. */
@@ -5967,9 +5980,11 @@ ada_is_ignored_field (struct type *type, int field_num)
return 1;
}
- /* If this is the dispatch table of a tagged type, then ignore. */
+ /* If this is the dispatch table of a tagged type or an interface tag,
+ then ignore. */
if (ada_is_tagged_type (type, 1)
- && ada_is_dispatch_table_ptr_type (TYPE_FIELD_TYPE (type, field_num)))
+ && (ada_is_dispatch_table_ptr_type (TYPE_FIELD_TYPE (type, field_num))
+ || ada_is_interface_tag (TYPE_FIELD_TYPE (type, field_num))))
return 1;
/* Not a special field, so it should not be ignored. */
--
1.7.10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFA/testsuite 3/4] New testcase for interface type printing
2012-11-29 13:37 [RFA/Ada 1/4] Full view of interface-wide types Jerome Guitton
2012-11-29 13:37 ` [RFA/testsuite 4/4] update ptype_tagged_param.exp Jerome Guitton
2012-11-29 13:37 ` [RFA/Ada 2/4] Strip interface tags from visible fields Jerome Guitton
@ 2012-11-29 13:37 ` Jerome Guitton
2012-11-29 14:20 ` Joel Brobecker
2012-11-29 14:20 ` [RFA/Ada 1/4] Full view of interface-wide types Joel Brobecker
3 siblings, 1 reply; 9+ messages in thread
From: Jerome Guitton @ 2012-11-29 13:37 UTC (permalink / raw)
To: gdb-patches; +Cc: Joel Brobecker
From: Joel Brobecker <brobecker@adacore.com>
gdb/testsuite/ChangeLog:
* gdb.ada/iwide: New testcase.
OK to apply?
---
gdb/testsuite/gdb.ada/iwide.exp | 42 ++++++++++++++++++++++
gdb/testsuite/gdb.ada/iwide/classes.adb | 23 ++++++++++++
gdb/testsuite/gdb.ada/iwide/classes.ads | 59 +++++++++++++++++++++++++++++++
gdb/testsuite/gdb.ada/iwide/p.adb | 25 +++++++++++++
4 files changed, 149 insertions(+)
create mode 100644 gdb/testsuite/gdb.ada/iwide.exp
create mode 100644 gdb/testsuite/gdb.ada/iwide/classes.adb
create mode 100644 gdb/testsuite/gdb.ada/iwide/classes.ads
create mode 100644 gdb/testsuite/gdb.ada/iwide/p.adb
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
new file mode 100644
index 0000000..836b551
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -0,0 +1,42 @@
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+standard_ada_testfile p
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
+ return -1
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "BREAK" ${testdir}/p.adb]
+runto "p.adb:$bp_location"
+
+gdb_test "print My_Drawable" \
+ "= \\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+
+gdb_test "print s_access.all" \
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+
+gdb_test "print sp_access.all" \
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+
+gdb_test "print d_access.all" \
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+
+gdb_test "print dp_access.all" \
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
diff --git a/gdb/testsuite/gdb.ada/iwide/classes.adb b/gdb/testsuite/gdb.ada/iwide/classes.adb
new file mode 100644
index 0000000..5af1114
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/iwide/classes.adb
@@ -0,0 +1,23 @@
+-- Copyright 2012 Free Software Foundation, Inc.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package body Classes is
+
+ procedure Draw (R : Circle) is
+ begin
+ null;
+ end Draw;
+
+end Classes;
diff --git a/gdb/testsuite/gdb.ada/iwide/classes.ads b/gdb/testsuite/gdb.ada/iwide/classes.ads
new file mode 100644
index 0000000..f305ed2
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/iwide/classes.ads
@@ -0,0 +1,59 @@
+-- Copyright 2012 Free Software Foundation, Inc.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package Classes is
+
+ type Point is record
+ X : Integer;
+ Y : Integer;
+ end record;
+
+ type Shape is abstract tagged null record;
+
+ type Shape_Access is access all Shape'Class;
+
+ type Drawable is interface;
+
+ type Drawable_Access is access all Drawable'Class;
+
+ procedure Draw (D : Drawable) is abstract;
+
+ type Circle is new Shape and Drawable with record
+ Center : Point;
+ Radius : Natural;
+ end record;
+
+ procedure Draw (R : Circle);
+
+ My_Circle : Circle := ((1, 2), 3);
+ My_Shape : Shape'Class := Shape'Class (My_Circle);
+ My_Drawable : Drawable'Class := Drawable'Class (My_Circle);
+
+ S_Access : Shape_Access := new Circle'(My_Circle);
+ D_Access : Drawable_Access := new Circle'(My_Circle);
+
+ type R (MS : Shape_Access; MD : Drawable_Access) is record
+ E : Integer;
+ end record;
+
+ MR : R := (MS => S_Access, MD => D_Access, E => 42);
+
+ type Shape_Array is array (1 .. 4) of Shape_Access;
+ type Drawable_Array is array (1 .. 4) of Drawable_Access;
+
+ S_Array : Shape_Array := (others => S_Access);
+ D_Array : Drawable_Array := (others => D_Access);
+
+end Classes;
diff --git a/gdb/testsuite/gdb.ada/iwide/p.adb b/gdb/testsuite/gdb.ada/iwide/p.adb
new file mode 100644
index 0000000..a4f2a5a
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/iwide/p.adb
@@ -0,0 +1,25 @@
+-- Copyright 2012 Free Software Foundation, Inc.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+With Classes; use Classes;
+
+procedure P is
+ SP_Access : Shape_Access := new Circle'(My_Circle);
+ DP_Access : Drawable_Access := new Circle'(My_Circle);
+ SP_Array : Shape_Array := (others => S_Access);
+ DP_Array : Drawable_Array := (others => D_Access);
+begin
+ null; -- BREAK
+end P;
--
1.7.10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFA/testsuite 4/4] update ptype_tagged_param.exp
2012-11-29 13:37 [RFA/Ada 1/4] Full view of interface-wide types Jerome Guitton
@ 2012-11-29 13:37 ` Jerome Guitton
2012-11-29 14:22 ` Joel Brobecker
2012-11-29 13:37 ` [RFA/Ada 2/4] Strip interface tags from visible fields Jerome Guitton
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Jerome Guitton @ 2012-11-29 13:37 UTC (permalink / raw)
To: gdb-patches; +Cc: Joel Brobecker
From: Joel Brobecker <brobecker@adacore.com>
The implementation of interface support brought about some more
precise results for other tagged types: ptype is now able to tell if a
class-wide object is a ref.
gdb/testsuite/ChangeLog:
* gdb.ada/ptype_tagged_param.exp: Adjust expected output in
ptype test.
OK to apply?
---
gdb/testsuite/gdb.ada/ptype_tagged_param.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
index e538b98..98ee548 100644
--- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
@@ -31,6 +31,6 @@ set eol "\[\r\n\]+"
set sp "\[ \t\]*"
gdb_test "ptype s" \
- "type = new pck.shape with record${eol}${sp}r: integer;${eol}end record" \
+ "type = <ref> new pck.shape with record${eol}${sp}r: integer;${eol}end record" \
"ptype s"
--
1.7.10.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/Ada 1/4] Full view of interface-wide types
2012-11-29 13:37 [RFA/Ada 1/4] Full view of interface-wide types Jerome Guitton
` (2 preceding siblings ...)
2012-11-29 13:37 ` [RFA/testsuite 3/4] New testcase for interface type printing Jerome Guitton
@ 2012-11-29 14:20 ` Joel Brobecker
3 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2012-11-29 14:20 UTC (permalink / raw)
To: Jerome Guitton; +Cc: gdb-patches
> gdb/ChangeLog:
>
> * ada-lang.h (ada_tag_value_at_base_address): New function
> declaration.
> * ada-lang.c (is_ada95_tag, ada_tag_value_at_base_address):
> New functions.
> (ada_to_fixed_type_1, ada_evaluate_subexp): Let ada_tag_base_address
> relocate the class-wide value if need be.
> * (ada_value_struct_elt, ada_value_ind, ada_coerce_ref):
> Let ada_tag_value_at_base_address relocate the class-wide access/ref
> before dereferencing it.
> * ada-valprint.c (ada_val_print_1): Relocate to base address
> before displaying the content of a interface-wide ref.
OK! Small nit: "an interface-wide ref" (instead of "a" - last line
of the ChangeLog entry).
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/Ada 2/4] Strip interface tags from visible fields
2012-11-29 13:37 ` [RFA/Ada 2/4] Strip interface tags from visible fields Jerome Guitton
@ 2012-11-29 14:20 ` Joel Brobecker
0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2012-11-29 14:20 UTC (permalink / raw)
To: Jerome Guitton; +Cc: gdb-patches
> gdb/ChangeLog:
>
> * ada-lang.c (ada_is_interface_tag): New function.
> (ada_is_ignored_field): Add interface tags to the list
> of ignored fields.
OK!
Thank you,
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/testsuite 3/4] New testcase for interface type printing
2012-11-29 13:37 ` [RFA/testsuite 3/4] New testcase for interface type printing Jerome Guitton
@ 2012-11-29 14:20 ` Joel Brobecker
0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2012-11-29 14:20 UTC (permalink / raw)
To: Jerome Guitton; +Cc: gdb-patches
> gdb/testsuite/ChangeLog:
>
> * gdb.ada/iwide: New testcase.
Looks good, go ahead and commit.
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/testsuite 4/4] update ptype_tagged_param.exp
2012-11-29 13:37 ` [RFA/testsuite 4/4] update ptype_tagged_param.exp Jerome Guitton
@ 2012-11-29 14:22 ` Joel Brobecker
2012-11-29 16:36 ` Jerome Guitton
0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2012-11-29 14:22 UTC (permalink / raw)
To: Jerome Guitton; +Cc: gdb-patches
> gdb/testsuite/ChangeLog:
>
> * gdb.ada/ptype_tagged_param.exp: Adjust expected output in
> ptype test.
>
> OK to apply?
Yes please. As discussed live, please merge this patch with patch #1
when you commit, as they should go in together.
Thanks,
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/testsuite 4/4] update ptype_tagged_param.exp
2012-11-29 14:22 ` Joel Brobecker
@ 2012-11-29 16:36 ` Jerome Guitton
0 siblings, 0 replies; 9+ messages in thread
From: Jerome Guitton @ 2012-11-29 16:36 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
Joel Brobecker (brobecker@adacore.com):
> Yes please. As discussed live, please merge this patch with patch #1
> when you commit, as they should go in together.
Done. Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-11-29 16:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 13:37 [RFA/Ada 1/4] Full view of interface-wide types Jerome Guitton
2012-11-29 13:37 ` [RFA/testsuite 4/4] update ptype_tagged_param.exp Jerome Guitton
2012-11-29 14:22 ` Joel Brobecker
2012-11-29 16:36 ` Jerome Guitton
2012-11-29 13:37 ` [RFA/Ada 2/4] Strip interface tags from visible fields Jerome Guitton
2012-11-29 14:20 ` Joel Brobecker
2012-11-29 13:37 ` [RFA/testsuite 3/4] New testcase for interface type printing Jerome Guitton
2012-11-29 14:20 ` Joel Brobecker
2012-11-29 14:20 ` [RFA/Ada 1/4] Full view of interface-wide types Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox