diff options
author | Doug Evans <xdje42@gmail.com> | 2015-02-10 21:18:59 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2015-02-10 21:18:59 -0800 |
commit | eaaf76abdc6444e07860067e01c8135303a429ca (patch) | |
tree | 6744ab2a437c0dad7991a8b4858718311f49f228 | |
parent | d319a098bca9372e7d1840cd31c47d05b0c7540e (diff) | |
download | fsf-binutils-gdb-eaaf76abdc6444e07860067e01c8135303a429ca.zip fsf-binutils-gdb-eaaf76abdc6444e07860067e01c8135303a429ca.tar.gz fsf-binutils-gdb-eaaf76abdc6444e07860067e01c8135303a429ca.tar.bz2 |
internal_type_self_type: Handle TYPE_SPECIFIC_NONE.
gdb/ChangeLog:
* gdbtypes.c (internal_type_self_type): If TYPE_SPECIFIC_FIELD hasn't
been initialized yet, return NULL.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7de64c5..36889aa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-02-11 Doug Evans <xdje42@gmail.com> + + * gdbtypes.c (internal_type_self_type): If TYPE_SPECIFIC_FIELD hasn't + been initialized yet, return NULL. + 2015-02-11 Doug Evans <dje@google.com> * symfile.h (new_symfile_objfile): Delete. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 2abaffe..a80151c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1209,9 +1209,13 @@ internal_type_self_type (struct type *type) { case TYPE_CODE_METHODPTR: case TYPE_CODE_MEMBERPTR: + if (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_NONE) + return NULL; gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_SELF_TYPE); return TYPE_MAIN_TYPE (type)->type_specific.self_type; case TYPE_CODE_METHOD: + if (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_NONE) + return NULL; gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_FUNC); return TYPE_MAIN_TYPE (type)->type_specific.func_stuff->self_type; default: |