diff options
author | Doug Evans <xdje42@gmail.com> | 2015-01-31 21:13:02 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2015-01-31 21:13:02 -0800 |
commit | f6b3afbf2fce69c31bd738e0543c55fbd848e74a (patch) | |
tree | 7d00af7a5d68cf14ea88bf42c02416d05ca99526 | |
parent | 6779e036f5249881d6fc511b99e047c7033a9313 (diff) | |
download | gdb-f6b3afbf2fce69c31bd738e0543c55fbd848e74a.zip gdb-f6b3afbf2fce69c31bd738e0543c55fbd848e74a.tar.gz gdb-f6b3afbf2fce69c31bd738e0543c55fbd848e74a.tar.bz2 |
gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD kinds.
gdb/ChangeLog:
* gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD
kinds.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 29 |
2 files changed, 28 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e88cd57..46b94c3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-01-31 Doug Evans <xdje42@gmail.com> + + * gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD + kinds. + 2015-01-31 Gary Benson <gbenson@redhat.com> Doug Evans <dje@google.com> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index e6e402e..0c34e62 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4217,18 +4217,35 @@ copy_type_recursive (struct objfile *objfile, copy_type_recursive (objfile, TYPE_VPTR_BASETYPE (type), copied_types); + /* Maybe copy the type_specific bits. NOTE drow/2005-12-09: We do not copy the C++-specific bits like base classes and methods. There's no fundamental reason why we can't, but at the moment it is not needed. */ - if (TYPE_CODE (type) == TYPE_CODE_FLT) - TYPE_FLOATFORMAT (new_type) = TYPE_FLOATFORMAT (type); - else if (TYPE_CODE (type) == TYPE_CODE_STRUCT - || TYPE_CODE (type) == TYPE_CODE_UNION - || TYPE_CODE (type) == TYPE_CODE_NAMESPACE) - INIT_CPLUS_SPECIFIC (new_type); + switch (TYPE_SPECIFIC_FIELD (type)) + { + case TYPE_SPECIFIC_NONE: + break; + case TYPE_SPECIFIC_FUNC: + INIT_FUNC_SPECIFIC (new_type); + TYPE_CALLING_CONVENTION (new_type) = TYPE_CALLING_CONVENTION (type); + TYPE_NO_RETURN (new_type) = TYPE_NO_RETURN (type); + TYPE_TAIL_CALL_LIST (new_type) = NULL; + break; + case TYPE_SPECIFIC_FLOATFORMAT: + TYPE_FLOATFORMAT (new_type) = TYPE_FLOATFORMAT (type); + break; + case TYPE_SPECIFIC_CPLUS_STUFF: + INIT_CPLUS_SPECIFIC (new_type); + break; + case TYPE_SPECIFIC_GNAT_STUFF: + INIT_GNAT_SPECIFIC (new_type); + break; + default: + gdb_assert_not_reached ("bad type_specific_kind"); + } return new_type; } |