aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>2021-11-22 08:30:57 +0100
committerSimon Marchi <simon.marchi@polymtl.ca>2021-11-22 21:35:24 -0500
commit9f6148cb8538a11f39eb938d4d8bf1eaba31f6af (patch)
treed48ba51083eb5a5a4e6b2712fde1e77a933070a1
parente1fbfba5a58a76c4f99925149e2d5fe8f487d191 (diff)
downloadgdb-9f6148cb8538a11f39eb938d4d8bf1eaba31f6af.zip
gdb-9f6148cb8538a11f39eb938d4d8bf1eaba31f6af.tar.gz
gdb-9f6148cb8538a11f39eb938d4d8bf1eaba31f6af.tar.bz2
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
-rw-r--r--gdb/gnu-nat.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 9ceaad7..13127cd 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -3191,31 +3191,31 @@ Show whether new threads are allowed to run (once gdb has noticed them)."),
_("Show the default detach-suspend-count value for new threads."),
&show_thread_default_cmd_list);
- cmd_list_element *set_signals_cmd
+ cmd_list_element *set_signals_cmd_
= add_cmd ("signals", class_run, set_signals_cmd, _("\
Set whether the inferior process's signals will be intercepted.\n\
Mach exceptions (such as breakpoint traps) are not affected."),
&setlist);
- add_alias_cmd ("sigs", set_signals_cmd, class_run, 1, &setlist);
+ add_alias_cmd ("sigs", set_signals_cmd_, class_run, 1, &setlist);
- cmd_list_element *show_signals_cmd
+ cmd_list_element *show_signals_cmd_
= add_cmd ("signals", no_class, show_signals_cmd, _("\
Show whether the inferior process's signals will be intercepted."),
&showlist);
- add_alias_cmd ("sigs", show_signals_cmd, no_class, 1, &showlist);
+ add_alias_cmd ("sigs", show_signals_cmd_, no_class, 1, &showlist);
- cmd_list_element *set_signal_thread_cmd
+ cmd_list_element *set_signal_thread_cmd_
= add_cmd ("signal-thread", class_run, set_sig_thread_cmd, _("\
Set the thread that gdb thinks is the libc signal thread.\n\
This thread is run when delivering a signal to a non-stopped process."),
&setlist);
- add_alias_cmd ("sigthread", set_signal_thread_cmd, class_run, 1, &setlist);
+ add_alias_cmd ("sigthread", set_signal_thread_cmd_, class_run, 1, &setlist);
- cmd_list_element *show_signal_thread_cmd
+ cmd_list_element *show_signal_thread_cmd_
= add_cmd ("signal-thread", no_class, show_sig_thread_cmd, _("\
Set the thread that gdb thinks is the libc signal thread."),
&showlist);
- add_alias_cmd ("sigthread", show_signal_thread_cmd, no_class, 1, &showlist);
+ add_alias_cmd ("sigthread", show_signal_thread_cmd_, no_class, 1, &showlist);
add_cmd ("stopped", class_run, set_stopped_cmd, _("\
Set whether gdb thinks the inferior process is stopped as with SIGSTOP.\n\
@@ -3225,13 +3225,13 @@ Stopped process will be continued by sending them a signal."),
Show whether gdb thinks the inferior process is stopped as with SIGSTOP."),
&showlist);
- cmd_list_element *set_exceptions_cmd
+ cmd_list_element *set_exceptions_cmd_
= add_cmd ("exceptions", class_run, set_exceptions_cmd, _("\
Set whether exceptions in the inferior process will be trapped.\n\
When exceptions are turned off, neither breakpoints nor single-stepping\n\
will work."), &setlist);
/* Allow `set exc' despite conflict with `set exception-port'. */
- add_alias_cmd ("exc", set_exceptions_cmd, class_run, 1, &setlist);
+ add_alias_cmd ("exc", set_exceptions_cmd_, class_run, 1, &setlist);
add_cmd ("exceptions", no_class, show_exceptions_cmd, _("\
Show whether exceptions in the inferior process will be trapped."),
@@ -3263,14 +3263,14 @@ used to pause individual threads by default instead."),
"on the thread when detaching."),
&show_task_cmd_list);
- cmd_list_element *set_task_exception_port_cmd
+ cmd_list_element *set_task_exception_port_cmd_
= add_cmd ("exception-port", no_class, set_task_exc_port_cmd, _("\
Set the task exception port to which we forward exceptions.\n\
The argument should be the value of the send right in the task."),
&set_task_cmd_list);
- add_alias_cmd ("excp", set_task_exception_port_cmd, no_class, 1,
+ add_alias_cmd ("excp", set_task_exception_port_cmd_, no_class, 1,
&set_task_cmd_list);
- add_alias_cmd ("exc-port", set_task_exception_port_cmd, no_class, 1,
+ add_alias_cmd ("exc-port", set_task_exception_port_cmd_, no_class, 1,
&set_task_cmd_list);
/* A convenient way of turning on all options require to noninvasively
@@ -3458,14 +3458,15 @@ Note that this is relative to suspend count when gdb noticed the thread;\n\
use the `thread takeover-suspend-count' to force it to an absolute value."),
&show_thread_cmd_list);
- add_cmd ("exception-port", no_class, set_thread_exc_port_cmd, _("\
+ cmd_list_element *set_thread_exception_port_cmd_
+ = add_cmd ("exception-port", no_class, set_thread_exc_port_cmd, _("\
Set the thread exception port to which we forward exceptions.\n\
This overrides the task exception port.\n\
The argument should be the value of the send right in the task."),
&set_thread_cmd_list);
- add_alias_cmd ("excp", set_thread_exception_port_cmd, no_class, 1,
+ add_alias_cmd ("excp", set_thread_exception_port_cmd_, no_class, 1,
&set_thread_cmd_list);
- add_alias_cmd ("exc-port", set_thread_exception_port_cmd, no_class, 1,
+ add_alias_cmd ("exc-port", set_thread_exception_port_cmd_, no_class, 1,
&set_thread_cmd_list);
add_cmd ("takeover-suspend-count", no_class, thread_takeover_sc_cmd, _("\