diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2005-11-04 02:50:30 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2005-11-04 02:50:30 +0000 |
commit | f6235d4cfac03962a505970ef92f231860c58517 (patch) | |
tree | 231f407d896285c7378bda06405d2884d7526049 /gdb | |
parent | e2126a1475df032f8cd9b0b97aa6ce3832541a60 (diff) | |
download | gdb-f6235d4cfac03962a505970ef92f231860c58517.zip gdb-f6235d4cfac03962a505970ef92f231860c58517.tar.gz gdb-f6235d4cfac03962a505970ef92f231860c58517.tar.bz2 |
2005-11-03 Wu Zhou <woodzltc@cn.ibm.com>
Checked in by Elena Zannoni <ezannoni@redhat.com>
* dwarf2read.c (read_structure_type): Add IBM XL C++
specific code to set TYPE_VPTR_FIELDNO and TYPE_VPTR_BASETYPE
of a virtual class if a field named "__vfp" is found.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 22 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12a67ff..9be144f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2005-11-03 Wu Zhou <woodzltc@cn.ibm.com> + + Checked in by Elena Zannoni <ezannoni@redhat.com> + + * dwarf2read.c (read_structure_type): Add IBM XL C++ + specific code to set TYPE_VPTR_FIELDNO and TYPE_VPTR_BASETYPE + of a virtual class if a field named "__vfp" is found. + 2005-11-03 Jim Blandy <jimb@redhat.com> Checked in by Elena Zannoni <ezannoni@redhat.com> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index e7a423f..0a59a8c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3855,6 +3855,28 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t); } } + else if (cu->producer + && strncmp (cu->producer, + "IBM(R) XL C/C++ Advanced Edition", 32) == 0) + { + /* The IBM XLC compiler does not provide direct indication + of the containing type, but the vtable pointer is + always named __vfp. */ + + int i; + + for (i = TYPE_NFIELDS (type) - 1; + i >= TYPE_N_BASECLASSES (type); + --i) + { + if (strcmp (TYPE_FIELD_NAME (type, i), "__vfp") == 0) + { + TYPE_VPTR_FIELDNO (type) = i; + TYPE_VPTR_BASETYPE (type) = type; + break; + } + } + } } do_cleanups (back_to); |