From b4b73759537ae830d8b48834b419b095561d4d4a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 14 Sep 2020 11:07:58 -0400 Subject: 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) : New methods. (TYPE_STUB): Use type::is_stub, change all write call sites to use type::set_is_stub. Change-Id: Ie935e8fe72c908afd8718411e83f4ff00c386bf3 --- gdb/mdebugread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/mdebugread.c') diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 4fd3de1..735f008 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -1086,7 +1086,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, do not create a symbol for it either. */ if (t->num_fields () == 0) { - TYPE_STUB (t) = 1; + t->set_is_stub (true); break; } @@ -4274,7 +4274,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp, { *pname = ""; *tpp = init_type (mdebugread_objfile, type_code, 0, NULL); - TYPE_STUB (*tpp) = 1; + (*tpp)->set_is_stub (true); return result; } -- cgit v1.1