gdb: more compile fixes for gnu-nat.c
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>
Mon, 22 Nov 2021 07:30:57 +0000 (08:30 +0100)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 23 Nov 2021 02:35:24 +0000 (21:35 -0500)
commit9f6148cb8538a11f39eb938d4d8bf1eaba31f6af
treed48ba51083eb5a5a4e6b2712fde1e77a933070a1
parente1fbfba5a58a76c4f99925149e2d5fe8f487d191
gdb: more compile fixes for gnu-nat.c

This fixes compile errors like

    ../../gdb-11.1/gdb/gnu-nat.c: In function void add_task_commands():
    ../../gdb-11.1/gdb/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 ../../gdb-11.1/gdb/completer.h:21,
                     from ../../gdb-11.1/gdb/symtab.h:36,
                     from ../../gdb-11.1/gdb/infrun.h:21,
                     from ../../gdb-11.1/gdb/target.h:42,
                     from ../../gdb-11.1/gdb/inf-child.h:23,
                     from ../../gdb-11.1/gdb/gnu-nat.h:38,
                     from ../../gdb-11.1/gdb/gnu-nat.c:24:
    ../../gdb-11.1/gdb/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,
          |                                 ^~~~~~~
    ../../gdb-11.1/gdb/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,
          |       ~~~~~~~~~~~~~~~~~~~~~~~^~~
    ../../gdb-11.1/gdb/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,
          |                                 ^~~~~~~
    ../../gdb-11.1/gdb/command.h:167:33: note:   candidate expects 4 arguments, 5 provided
    ../../gdb-11.1/gdb/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);
          |                  ^

Change-Id: Ie9029363d3fb40e34e8f5b1ab503745bc44bfe3f
gdb/gnu-nat.c