+2019-01-14 Tom Tromey <tom@tromey.com>
+
+ * target-debug.h (target_debug_print_signals): Constify.
+ * nto-procfs.c (nto_procfs_target::pass_signals): Update.
+ * procfs.c (procfs_target::pass_signals): Update.
+ * linux-nat.c (linux_nat_target::pass_signals): Update.
+ * linux-nat.h (class linux_nat_target) <pass_signals>: Update.
+ * target-delegates.c: Rebuild.
+ * remote.c (remote_target::program_signals): Update.
+ (remote_target::pass_signals): Update.
+ * target.c (target_pass_signals): Constify argument.
+ (target_program_signals): Likewise.
+ * target.h (struct target_ops) <pass_signals, program_signals>:
+ Constify argument.
+ (target_pass_signals, target_program_signals): Constify argument.
+
2019-01-14 Tom Tromey <tom@tromey.com>
PR tui/28819:
/* Update signals to pass to the inferior. */
void
-linux_nat_target::pass_signals (int numsigs, unsigned char *pass_signals)
+linux_nat_target::pass_signals (int numsigs, const unsigned char *pass_signals)
{
int signo;
ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
- void pass_signals (int, unsigned char *) override;
+ void pass_signals (int, const unsigned char *) override;
enum target_xfer_status xfer_partial (enum target_object object,
const char *annex,
void mourn_inferior () override;
- void pass_signals (int, unsigned char *) override;
+ void pass_signals (int, const unsigned char *) override;
bool thread_alive (ptid_t ptid) override;
/* Set list of signals to be handled in the target. */
void
-nto_procfs_target::pass_signals (int numsigs, unsigned char *pass_signals)
+nto_procfs_target::pass_signals (int numsigs,
+ const unsigned char *pass_signals)
{
int signo;
ULONGEST offset, ULONGEST len,
ULONGEST *xfered_len) override;
- void pass_signals (int, unsigned char *) override;
+ void pass_signals (int, const unsigned char *) override;
void files_info () override;
/* Set up to trace signals in the child process. */
void
-procfs_target::pass_signals (int numsigs, unsigned char *pass_signals)
+procfs_target::pass_signals (int numsigs, const unsigned char *pass_signals)
{
sigset_t signals;
procinfo *pi = find_procinfo_or_die (inferior_ptid.pid (), 0);
void mourn_inferior () override;
- void pass_signals (int, unsigned char *) override;
+ void pass_signals (int, const unsigned char *) override;
int set_syscall_catchpoint (int, bool, int,
gdb::array_view<const int>) override;
- void program_signals (int, unsigned char *) override;
+ void program_signals (int, const unsigned char *) override;
bool thread_alive (ptid_t ptid) override;
it can simply pass through to the inferior without reporting. */
void
-remote_target::pass_signals (int numsigs, unsigned char *pass_signals)
+remote_target::pass_signals (int numsigs, const unsigned char *pass_signals)
{
if (packet_support (PACKET_QPassSignals) != PACKET_DISABLE)
{
signals it should pass through to the inferior when detaching. */
void
-remote_target::program_signals (int numsigs, unsigned char *signals)
+remote_target::program_signals (int numsigs, const unsigned char *signals)
{
if (packet_support (PACKET_QProgramSignals) != PACKET_DISABLE)
{
}
static void
-target_debug_print_signals (unsigned char *sigs)
+target_debug_print_signals (const unsigned char *sigs)
{
fputs_unfiltered ("{", gdb_stdlog);
if (sigs != NULL)
void follow_exec (struct inferior *arg0, char *arg1) override;
int set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) override;
void mourn_inferior () override;
- void pass_signals (int arg0, unsigned char * arg1) override;
- void program_signals (int arg0, unsigned char * arg1) override;
+ void pass_signals (int arg0, const unsigned char * arg1) override;
+ void program_signals (int arg0, const unsigned char * arg1) override;
bool thread_alive (ptid_t arg0) override;
void update_thread_list () override;
const char *pid_to_str (ptid_t arg0) override;
void follow_exec (struct inferior *arg0, char *arg1) override;
int set_syscall_catchpoint (int arg0, bool arg1, int arg2, gdb::array_view<const int> arg3) override;
void mourn_inferior () override;
- void pass_signals (int arg0, unsigned char * arg1) override;
- void program_signals (int arg0, unsigned char * arg1) override;
+ void pass_signals (int arg0, const unsigned char * arg1) override;
+ void program_signals (int arg0, const unsigned char * arg1) override;
bool thread_alive (ptid_t arg0) override;
void update_thread_list () override;
const char *pid_to_str (ptid_t arg0) override;
}
void
-target_ops::pass_signals (int arg0, unsigned char * arg1)
+target_ops::pass_signals (int arg0, const unsigned char * arg1)
{
this->beneath ()->pass_signals (arg0, arg1);
}
void
-dummy_target::pass_signals (int arg0, unsigned char * arg1)
+dummy_target::pass_signals (int arg0, const unsigned char * arg1)
{
}
void
-debug_target::pass_signals (int arg0, unsigned char * arg1)
+debug_target::pass_signals (int arg0, const unsigned char * arg1)
{
fprintf_unfiltered (gdb_stdlog, "-> %s->pass_signals (...)\n", this->beneath ()->shortname ());
this->beneath ()->pass_signals (arg0, arg1);
}
void
-target_ops::program_signals (int arg0, unsigned char * arg1)
+target_ops::program_signals (int arg0, const unsigned char * arg1)
{
this->beneath ()->program_signals (arg0, arg1);
}
void
-dummy_target::program_signals (int arg0, unsigned char * arg1)
+dummy_target::program_signals (int arg0, const unsigned char * arg1)
{
}
void
-debug_target::program_signals (int arg0, unsigned char * arg1)
+debug_target::program_signals (int arg0, const unsigned char * arg1)
{
fprintf_unfiltered (gdb_stdlog, "-> %s->program_signals (...)\n", this->beneath ()->shortname ());
this->beneath ()->program_signals (arg0, arg1);
}
void
-target_pass_signals (int numsigs, unsigned char *pass_signals)
+target_pass_signals (int numsigs, const unsigned char *pass_signals)
{
current_top_target ()->pass_signals (numsigs, pass_signals);
}
void
-target_program_signals (int numsigs, unsigned char *program_signals)
+target_program_signals (int numsigs, const unsigned char *program_signals)
{
current_top_target ()->program_signals (numsigs, program_signals);
}
/* Documentation of this routine is provided with the corresponding
target_* macro. */
virtual void pass_signals (int,
- unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
+ const unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
TARGET_DEFAULT_IGNORE ();
/* Documentation of this routine is provided with the
corresponding target_* function. */
virtual void program_signals (int,
- unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
+ const unsigned char * TARGET_DEBUG_PRINTER (target_debug_print_signals))
TARGET_DEFAULT_IGNORE ();
virtual bool thread_alive (ptid_t ptid)
about to receive a signal, it needs to be reported in any case, even
if mentioned in a previous target_pass_signals call. */
-extern void target_pass_signals (int nsig, unsigned char *pass_signals);
+extern void target_pass_signals (int nsig, const unsigned char *pass_signals);
/* Set list of signals the target may pass to the inferior. This
directly maps to the "handle SIGNAL pass/nopass" setting.
example, when detaching (as threads may have been suspended with
pending signals not reported to GDB). */
-extern void target_program_signals (int nsig, unsigned char *program_signals);
+extern void target_program_signals (int nsig,
+ const unsigned char *program_signals);
/* Check to see if a thread is still alive. */