mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
gdb: add type::is_stub / type::set_is_stub
Add the `is_stub` and `set_is_stub` methods on `struct type`, in order to remove the `TYPE_STUB` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. gdb/ChangeLog: * gdbtypes.h (struct type) <is_stub, set_is_stub>: New methods. (TYPE_STUB): Use type::is_stub, change all write call sites to use type::set_is_stub. Change-Id: Ie935e8fe72c908afd8718411e83f4ff00c386bf3
This commit is contained in:
@ -867,7 +867,7 @@ allocate_stub_method (struct type *type)
|
||||
mtype = alloc_type_copy (type);
|
||||
mtype->set_code (TYPE_CODE_METHOD);
|
||||
TYPE_LENGTH (mtype) = 1;
|
||||
TYPE_STUB (mtype) = 1;
|
||||
mtype->set_is_stub (true);
|
||||
TYPE_TARGET_TYPE (mtype) = type;
|
||||
/* TYPE_SELF_TYPE (mtype) = unknown yet */
|
||||
return mtype;
|
||||
@ -3033,7 +3033,7 @@ check_stub_method (struct type *type, int method_id, int signature_id)
|
||||
We want a method (TYPE_CODE_METHOD). */
|
||||
smash_to_method_type (mtype, type, TYPE_TARGET_TYPE (mtype),
|
||||
argtypes, argcount, p[-2] == '.');
|
||||
TYPE_STUB (mtype) = 0;
|
||||
mtype->set_is_stub (false);
|
||||
TYPE_FN_FIELD_STUB (f, signature_id) = 0;
|
||||
|
||||
xfree (demangled_name);
|
||||
|
Reference in New Issue
Block a user