From 27e69b7aedcfee8af8fc6ee4f2e99aca2d41daca Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 14 Sep 2020 11:08:00 -0400 Subject: 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) : New methods. (TYPE_PROTOTYPED): Use type::is_prototyped, change all write call sites to use type::set_is_prototyped. Change-Id: I6ba285250fae413f7c1bf2ffcb5a2cedc8e743da --- gdb/mdebugread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/mdebugread.c') diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index f68f4ef..480b67b 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -786,7 +786,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, /* All functions in C++ have prototypes. For C we don't have enough information in the debug info. */ if (s->language () == language_cplus) - TYPE_PROTOTYPED (SYMBOL_TYPE (s)) = 1; + SYMBOL_TYPE (s)->set_is_prototyped (true); /* Create and enter a new lexical context. */ b = new_block (FUNCTION_BLOCK, s->language ()); -- cgit v1.1