From 9b224c5e1a3d2a2d753affc760de2984b382617a Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 7 Mar 2012 19:25:39 +0000 Subject: 2012-03-07 Pedro Alves gdb/doc/ * gdb.texinfo (General Query Packets): Document new QProgramSignals packet. * gdb.texinfo (Remote configuration): Mention "program-signals-packet". gdb/gdbserver/ * linux-low.c (get_detach_signal): New. (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT. Pass on pending signals to PTRACE_DETACH. Check the result of the ptrace call. * server.c (program_signals, program_signals_p): New. (handle_general_set): Handle QProgramSignals. * server.h (program_signals, program_signals_p): Declare. gdb/ * NEWS: Mention QProgramSignals. * inferior.h (update_signals_program_target): Declare. * infrun.c: (update_signals_program_target): New. (handle_command): Update the target of the new program signals array changes. * remote.c (PACKET_QProgramSignals): New enum. (last_program_signals_packet): New global. (remote_program_signals): New. (remote_start_remote): Update the target with the program signals list. (remote_protocol_features): Add entry for QPassSignals. (remote_open_1): Free anc clear last_program_signals_packet. (init_remote_ops): Install remote_program_signals. * target.c (update_current_target): Adjust. (target_program_signals): New. * target.h (struct target_ops) : New field. (target_program_signals): Declare. --- gdb/infrun.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/infrun.c') diff --git a/gdb/infrun.c b/gdb/infrun.c index e383d77..103ef30 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -335,6 +335,15 @@ static unsigned char *signal_pass; (flags)[signum] = 0; \ } while (0) +/* Update the target's copy of SIGNAL_PROGRAM. The sole purpose of + this function is to avoid exporting `signal_program'. */ + +void +update_signals_program_target (void) +{ + target_program_signals ((int) TARGET_SIGNAL_LAST, signal_program); +} + /* Value to pass to target_resume() to cause all threads to resume. */ #define RESUME_ALL minus_one_ptid @@ -6363,6 +6372,7 @@ Are you sure you want to change it? "), { signal_cache_update (-1); target_pass_signals ((int) TARGET_SIGNAL_LAST, signal_pass); + target_program_signals ((int) TARGET_SIGNAL_LAST, signal_program); if (from_tty) { -- cgit v1.1