diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:00 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:00 -0400 |
commit | 27e69b7aedcfee8af8fc6ee4f2e99aca2d41daca (patch) | |
tree | d092d44a3e9cba662112047179bb295e5c5b3154 /gdb/stabsread.c | |
parent | d21839680655c071a811de1d7b41f8d7de4fc462 (diff) | |
download | binutils-gdb-27e69b7aedcfee8af8fc6ee4f2e99aca2d41daca.tar.gz |
gdb: add type::is_prototyped / type::set_is_prototyped
Add the `is_prototyped` and `set_is_prototyped` methods on `struct
type`, in order to remove the `TYPE_PROTOTYPED` 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_prototyped, set_is_prototyped>:
New methods.
(TYPE_PROTOTYPED): Use type::is_prototyped, change all write
call sites to use type::set_is_prototyped.
Change-Id: I6ba285250fae413f7c1bf2ffcb5a2cedc8e743da
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 752612f14e8..2f9458ce186 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -958,7 +958,7 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type, than the "declared-as" type for unprototyped functions, so we treat all functions as if they were prototyped. This is used primarily for promotion when calling the function from GDB. */ - TYPE_PROTOTYPED (SYMBOL_TYPE (sym)) = 1; + SYMBOL_TYPE (sym)->set_is_prototyped (true); /* fall into process_prototype_types. */ @@ -1005,7 +1005,7 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type, TYPE_FIELD_ARTIFICIAL (ftype, nparams++) = 0; } ftype->set_num_fields (nparams); - TYPE_PROTOTYPED (ftype) = 1; + ftype->set_is_prototyped (true); } break; @@ -1813,7 +1813,7 @@ again: func_type->field (i).set_type (t->type); } func_type->set_num_fields (num_args); - TYPE_PROTOTYPED (func_type) = 1; + func_type->set_is_prototyped (true); type = func_type; break; |