From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from confino.investici.org (confino.investici.org [212.103.72.250]) by sourceware.org (Postfix) with ESMTPS id 9E7AD3858030 for ; Wed, 3 Nov 2021 06:40:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E7AD3858030 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4HkcbY1tHMz114K; Wed, 3 Nov 2021 06:40:41 +0000 (UTC) Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: andrea.monaco@autistici.org) by localhost (Postfix) with ESMTPSA id 4HkcbY0rmhz114H; Wed, 3 Nov 2021 06:40:41 +0000 (UTC) From: Andrea Monaco To: simon.marchi@polymtl.ca Cc: gdb@sourceware.org Subject: Re: [PATCH] gdb 11.1: struct inf lacks two members Date: Wed, 03 Nov 2021 07:40:40 +0100 Message-ID: <87lf25kahj.fsf@autistici.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2021 06:40:47 -0000 Thanks, that fixes those errors. I'd propose a more descriptive comment on struct inf, like this diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 54838347f94..67a1345e08c 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -149,7 +149,7 @@ struct inf_wait int suppress; /* Something trivial happened. */ }; -/* The state of an inferior. */ +/* Further Hurd-specific state of an inferior. */ struct inf { /* Fields describing the current inferior. */ As I said, there are other syntax errors, so I'll paste them all: CXX gnu-nat.o gnu-nat.c: In function 'void add_task_commands()': gnu-nat.c:3204:17: error: no matching function for call to 'add_cmd(const char [8], command_class, cmd_list_element*&, char*, cmd_list_element**)' 3204 | &setlist); | ^ In file included from completer.h:21, from symtab.h:36, from infrun.h:21, from target.h:42, from inf-child.h:23, from gnu-nat.h:38, from gnu-nat.c:24: command.h:160:33: note: candidate: 'cmd_list_element* add_cmd(const char*, command_class, void (*)(const char*, int), const char*, cmd_list_element**)' 160 | extern struct cmd_list_element *add_cmd (const char *, enum command_class, | ^~~~~~~ command.h:161:30: note: no known conversion for argument 3 from 'cmd_list_element*' to 'void (*)(const char*, int)' 161 | cmd_const_cfunc_ftype *fun, | ~~~~~~~~~~~~~~~~~~~~~~~^~~ command.h:167:33: note: candidate: 'cmd_list_element* add_cmd(const char*, command_class, const char*, cmd_list_element**)' 167 | extern struct cmd_list_element *add_cmd (const char *, enum command_class, | ^~~~~~~ command.h:167:33: note: candidate expects 4 arguments, 5 provided gnu-nat.c:3210:18: error: no matching function for call to 'add_cmd(const char [8], command_class, cmd_list_element*&, char*, cmd_list_element**)' 3210 | &showlist); | ^ In file included from completer.h:21, from symtab.h:36, from infrun.h:21, from target.h:42, from inf-child.h:23, from gnu-nat.h:38, from gnu-nat.c:24: command.h:160:33: note: candidate: 'cmd_list_element* add_cmd(const char*, command_class, void (*)(const char*, int), const char*, cmd_list_element**)' 160 | extern struct cmd_list_element *add_cmd (const char *, enum command_class, | ^~~~~~~ command.h:161:30: note: no known conversion for argument 3 from 'cmd_list_element*' to 'void (*)(const char*, int)' 161 | cmd_const_cfunc_ftype *fun, | ~~~~~~~~~~~~~~~~~~~~~~~^~~ command.h:167:33: note: candidate: 'cmd_list_element* add_cmd(const char*, command_class, const char*, cmd_list_element**)' 167 | extern struct cmd_list_element *add_cmd (const char *, enum command_class, | ^~~~~~~ command.h:167:33: note: candidate expects 4 arguments, 5 provided gnu-nat.c:3238:23: error: no matching function for call to 'add_cmd(const char [11], command_class, cmd_list_element*&, char*, cmd_list_element**)' 3238 | will work."), &setlist); | ^ In file included from completer.h:21, from symtab.h:36, from infrun.h:21, from target.h:42, from inf-child.h:23, from gnu-nat.h:38, from gnu-nat.c:24: command.h:160:33: note: candidate: 'cmd_list_element* add_cmd(const char*, command_class, void (*)(const char*, int), const char*, cmd_list_element**)' 160 | extern struct cmd_list_element *add_cmd (const char *, enum command_class, | ^~~~~~~ command.h:161:30: note: no known conversion for argument 3 from 'cmd_list_element*' to 'void (*)(const char*, int)' 161 | cmd_const_cfunc_ftype *fun, | ~~~~~~~~~~~~~~~~~~~~~~~^~~ command.h:167:33: note: candidate: 'cmd_list_element* add_cmd(const char*, command_class, const char*, cmd_list_element**)' 167 | extern struct cmd_list_element *add_cmd (const char *, enum command_class, | ^~~~~~~ command.h:167:33: note: candidate expects 4 arguments, 5 provided gnu-nat.c:3301:28: error: cannot convert 'const char*' to 'cmd_list_element*' 3301 | add_info_alias ("ports", "port-rights", 1); | ^~~~~~~~~~~~~ | | | const char* In file included from completer.h:21, from symtab.h:36, from infrun.h:21, from target.h:42, from inf-child.h:23, from gnu-nat.h:38, from gnu-nat.c:24: command.h:367:25: note: initializing argument 2 of 'cmd_list_element* add_info_alias(const char*, cmd_list_element*, int)' 367 | cmd_list_element *target, | ~~~~~~~~~~~~~~~~~~^~~~~~ gnu-nat.c:3302:27: error: cannot convert 'const char*' to 'cmd_list_element*' 3302 | add_info_alias ("port", "port-rights", 1); | ^~~~~~~~~~~~~ | | | const char* In file included from completer.h:21, from symtab.h:36, from infrun.h:21, from target.h:42, from inf-child.h:23, from gnu-nat.h:38, from gnu-nat.c:24: command.h:367:25: note: initializing argument 2 of 'cmd_list_element* add_info_alias(const char*, cmd_list_element*, int)' 367 | cmd_list_element *target, | ~~~~~~~~~~~~~~~~~~^~~~~~ gnu-nat.c:3303:28: error: cannot convert 'const char*' to 'cmd_list_element*' 3303 | add_info_alias ("psets", "port-sets", 1); | ^~~~~~~~~~~ | | | const char* In file included from completer.h:21, from symtab.h:36, from infrun.h:21, from target.h:42, from inf-child.h:23, from gnu-nat.h:38, from gnu-nat.c:24: command.h:367:25: note: initializing argument 2 of 'cmd_list_element* add_info_alias(const char*, cmd_list_element*, int)' 367 | cmd_list_element *target, | ~~~~~~~~~~~~~~~~~~^~~~~~ gnu-nat.c: In function 'void add_thread_commands()': gnu-nat.c:3470:26: error: 'set_thread_exception_port_cmd' was not declared in this scope; did you mean 'set_thread_exc_port_cmd'? 3470 | add_alias_cmd ("excp", set_thread_exception_port_cmd, no_class, 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | set_thread_exc_port_cmd