diff options
author | Pedro Alves <palves@redhat.com> | 2012-03-07 19:25:39 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-03-07 19:25:39 +0000 |
commit | 9b224c5e1a3d2a2d753affc760de2984b382617a (patch) | |
tree | b9c52226128c098ead038f4690ba10ef24922ef9 /gdb/target.h | |
parent | 74c48cbbffd1812b819a0d1ddf1ff6eff282549c (diff) | |
download | gdb-9b224c5e1a3d2a2d753affc760de2984b382617a.zip gdb-9b224c5e1a3d2a2d753affc760de2984b382617a.tar.gz gdb-9b224c5e1a3d2a2d753affc760de2984b382617a.tar.bz2 |
2012-03-07 Pedro Alves <palves@redhat.com>
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) <to_program_signals>: New field.
(target_program_signals): Declare.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index ed2bcdd..50a0ea6 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -511,6 +511,10 @@ struct target_ops target_* macro. */ void (*to_pass_signals) (int, unsigned char *); + /* Documentation of this routine is provided with the + corresponding target_* function. */ + void (*to_program_signals) (int, unsigned char *); + int (*to_thread_alive) (struct target_ops *, ptid_t ptid); void (*to_find_new_threads) (struct target_ops *); char *(*to_pid_to_str) (struct target_ops *, ptid_t); @@ -1261,6 +1265,22 @@ void target_mourn_inferior (void); extern void target_pass_signals (int nsig, 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. + + PROGRAM_SIGNALS is an array of size NSIG, indexed by target signal + number (enum target_signal). For every signal whose entry in this + array is non-zero, the target is allowed to pass the signal to the + inferior. Signals not present in the array shall be silently + discarded. This does not influence whether to pass signals to the + inferior as a result of a target_resume call. This is useful in + scenarios where the target needs to decide whether to pass or not a + signal to the inferior without GDB core involvement, such as for + 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); + /* Check to see if a thread is still alive. */ extern int target_thread_alive (ptid_t ptid); |