aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-06-05 14:26:58 +0000
committerDaniel Jacobowitz <drow@false.org>2003-06-05 14:26:58 +0000
commite5379b03cf80d6b0bd9a8d7dd03e2220a61956a2 (patch)
tree8af8826fb577e84036d89c410cebe502dac302ce /gdb/gdbserver/linux-low.c
parentc82b20e4573561011a801e436bcca84cfa999113 (diff)
downloadgdb-e5379b03cf80d6b0bd9a8d7dd03e2220a61956a2.zip
gdb-e5379b03cf80d6b0bd9a8d7dd03e2220a61956a2.tar.gz
gdb-e5379b03cf80d6b0bd9a8d7dd03e2220a61956a2.tar.bz2
* linux-low.c (linux_wait_for_event): Correct comment typos.
(linux_resume_one_process): Call check_removed_breakpoint. (linux_send_signal): New function. (linux_target_ops): Add linux_send_signal. * remote-utils.c (putpkt, input_interrupt): Use send_signal instead of kill. * target.h (struct target_ops): Add send_signal.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r--gdb/gdbserver/linux-low.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index aad2ecd..4ad204e 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -399,7 +399,7 @@ linux_wait_for_event (struct thread_info *child)
/* Check for a process with a pending status. */
/* It is possible that the user changed the pending task's registers since
it stopped. We correctly handle the change of PC if we hit a breakpoint
- (in check_removed_breakpoints); signals should be reported anyway. */
+ (in check_removed_breakpoint); signals should be reported anyway. */
if (child == NULL)
{
event_child = (struct process_info *)
@@ -541,7 +541,7 @@ linux_wait_for_event (struct thread_info *child)
if (check_breakpoints (stop_pc) != 0)
{
/* We hit one of our own breakpoints. We mark it as a pending
- breakpoint, so that check_removed_breakpoints () will do the PC
+ breakpoint, so that check_removed_breakpoint () will do the PC
adjustment for us at the appropriate time. */
event_child->pending_is_breakpoint = 1;
event_child->pending_stop_pc = stop_pc;
@@ -587,7 +587,7 @@ linux_wait_for_event (struct thread_info *child)
will give us a new action for this thread, but clear it for
consistency anyway. It's safe to clear the stepping flag
because the only consumer of get_stop_pc () after this point
- is check_removed_breakpoints, and pending_is_breakpoint is not
+ is check_removed_breakpoint, and pending_is_breakpoint is not
set. It might be wiser to use a step_completed flag instead. */
if (event_child->stepping)
{
@@ -786,7 +786,7 @@ linux_resume_one_process (struct inferior_list_entry *entry,
process->pending_signals = p_sig;
}
- if (process->status_pending_p)
+ if (process->status_pending_p && !check_removed_breakpoint (process))
return;
saved_inferior = current_inferior;
@@ -1228,6 +1228,22 @@ linux_look_up_symbols (void)
#endif
}
+static void
+linux_send_signal (int signum)
+{
+ extern int signal_pid;
+
+ if (cont_thread > 0)
+ {
+ struct process_info *process;
+
+ process = get_thread_process (current_inferior);
+ kill (process->lwpid, signum);
+ }
+ else
+ kill (signal_pid, signum);
+}
+
static struct target_ops linux_target_ops = {
linux_create_inferior,
@@ -1241,6 +1257,7 @@ static struct target_ops linux_target_ops = {
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
+ linux_send_signal,
};
static void