diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:07:58 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:07:58 -0400 |
commit | b4b73759537ae830d8b48834b419b095561d4d4a (patch) | |
tree | 75c131b31fe269d8878e8fba12d2b58bfd668ac5 /gdb/dwarf2 | |
parent | 20ce41238d912c3ced2870501f0c45cf7a03de92 (diff) | |
download | gdb-b4b73759537ae830d8b48834b419b095561d4d4a.zip gdb-b4b73759537ae830d8b48834b419b095561d4d4a.tar.gz gdb-b4b73759537ae830d8b48834b419b095561d4d4a.tar.bz2 |
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
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 267cf0f..f17401e 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -16081,18 +16081,18 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) { /* ICC<14 does not output the required DW_AT_declaration on incomplete types, but gives them a size of zero. */ - TYPE_STUB (type) = 1; + type->set_is_stub (true); } else TYPE_STUB_SUPPORTED (type) = 1; if (die_is_declaration (die, cu)) - TYPE_STUB (type) = 1; + type->set_is_stub (true); else if (attr == NULL && die->child == NULL && producer_is_realview (cu->producer)) /* RealView does not output the required DW_AT_declaration on incomplete types. */ - TYPE_STUB (type) = 1; + type->set_is_stub (true); /* We need to add the type field to the die immediately so we don't infinitely recurse when dealing with pointers to the structure @@ -16631,7 +16631,7 @@ read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) Types. When another package uses such a type, an incomplete DIE may be generated by the compiler. */ if (die_is_declaration (die, cu)) - TYPE_STUB (type) = 1; + type->set_is_stub (true); /* If this type has an underlying type that is not a stub, then we may use its attributes. We always use the "unsigned" attribute @@ -18444,7 +18444,7 @@ read_unspecified_type (struct die_info *die, struct dwarf2_cu *cu) such a type, we treat it as a stub, and try to resolve it later on, when needed. */ if (cu->language == language_ada) - TYPE_STUB (type) = 1; + type->set_is_stub (true); return set_die_type (die, type, cu); } |