forked from Imagelibrary/binutils-gdb
gdb: add type::target_is_stub / type::set_target_is_stub
Add the `target_is_stub` and `set_target_is_stub` methods on `struct type`, in order to remove the `TYPE_TARGET_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) <target_is_stub, set_target_is_stub>: New methods. (TYPE_TARGET_STUB): Use type::is_stub, change all write call sites to use type::set_target_is_stub. Change-Id: I9c71a89adc7ae8d018db9ee156f41c623be0484a
This commit is contained in:
@@ -1866,7 +1866,7 @@ upgrade_type (int fd, struct type **tpp, int tq, union aux_ext *ax, int bigend,
|
||||
|
||||
/* TYPE_TARGET_STUB now takes care of the zero TYPE_LENGTH problem. */
|
||||
if (TYPE_LENGTH (*tpp) == 0)
|
||||
TYPE_TARGET_STUB (t) = 1;
|
||||
t->set_target_is_stub (true);
|
||||
|
||||
*tpp = t;
|
||||
return 4 + off;
|
||||
|
||||
Reference in New Issue
Block a user