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.
This commit is contained in:
parent
d319a098bc
commit
eaaf76abdc
|
@ -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.
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue