summaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-30 02:38:43 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-30 02:38:43 +0000
commit3e14aa3804d3ea58f84b646cde8b85c4ec391185 (patch)
treec86dc6969fd82952537e402e6e79204e43f4aa63 /gcc/dbxout.c
parentfe72aa5f3a462cce8d85238c631c66c012e1e9d3 (diff)
downloadgcc-3e14aa3804d3ea58f84b646cde8b85c4ec391185.tar.gz
* dwarf2out.c (add_data_member_location_attribute): Do the
right thing for virtual bases. * dbxout.c (dbxout_type): For a virtual base, print the offset within the vtable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47469 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 344ebbefeae..8b14f5d2efe 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -1492,8 +1492,15 @@ dbxout_type (type, full)
putc (TREE_VIA_VIRTUAL (child) ? '1' : '0', asmfile);
putc (TREE_VIA_PUBLIC (child) ? '2' : '0', asmfile);
CHARS (2);
- print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0)
- * BITS_PER_UNIT);
+ if (TREE_VIA_VIRTUAL (child))
+ /* For a virtual base, print the (negative) offset within
+ the vtable where we must look to find the necessary
+ adjustment. */
+ print_wide_int (tree_low_cst (BINFO_VPTR_FIELD (child), 0)
+ * BITS_PER_UNIT);
+ else
+ print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0)
+ * BITS_PER_UNIT);
putc (',', asmfile);
CHARS (1);
dbxout_type (BINFO_TYPE (child), 0);