From 80fc5e77f07557830aaac90723dc599e6d047922 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 22 May 2020 16:55:17 -0400 Subject: gdb: remove TYPE_FIELDS macro Remove all uses of the `TYPE_FIELDS` macro. Replace them with either: 1) type::fields, to obtain a pointer to the fields array (same as TYPE_FIELDS yields) 2) type::field, a new convenience method that obtains a reference to one of the type's field by index. It is meant to replace TYPE_FIELDS (type)[idx] with type->field (idx) gdb/ChangeLog: * gdbtypes.h (struct type) : New method. (TYPE_FIELDS): Remove, replace all uses with either type::fields or type::field. Change-Id: I49fba10114417deb502060c6156aa5f7fc62462f --- 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 aeecb14..20fdd40 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -1233,8 +1233,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, case stMember: /* member of struct or union */ { - struct field *f - = &TYPE_FIELDS (top_stack->cur_type)[top_stack->cur_field++]; + struct field *f = &top_stack->cur_type->field (top_stack->cur_field); + top_stack->cur_field++; FIELD_NAME (*f) = name; SET_FIELD_BITPOS (*f, sh->value); bitsize = 0; -- cgit v1.1