public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrea Monaco <andrea.monaco@autistici.org>
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	[thread overview]
Message-ID: <87lf25kahj.fsf@autistici.org> (raw)


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

                 reply	other threads:[~2021-11-03  6:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf25kahj.fsf@autistici.org \
    --to=andrea.monaco@autistici.org \
    --cc=gdb@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).