* Re: [PATCH] gdb 11.1: struct inf lacks two members
@ 2021-11-03 6:40 Andrea Monaco
0 siblings, 0 replies; only message in thread
From: Andrea Monaco @ 2021-11-03 6:40 UTC (permalink / raw)
To: simon.marchi; +Cc: gdb
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-03 6:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 6:40 [PATCH] gdb 11.1: struct inf lacks two members Andrea Monaco
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).