This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix sigrepeat.exp and sigstep.exp for gdbserver
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 4 Sep 2007 17:39:25 -0400
- Subject: [commit] Fix sigrepeat.exp and sigstep.exp for gdbserver
The signals tests were pretty badly off on my test system when I was
testing QPassSignals; I must not have noticed that I'd broken
sigrepeat.exp :-(
The equivalent fix is already in linux-nat.c. If we're stepping and
encounter a signal, we need to let infrun.c know. Otherwise, it won't
realize we have entered a signal handler.
Tested on x86_64-linux and powerpc-linux, and checked in.
--
Daniel Jacobowitz
CodeSourcery
2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
* linux-low.c (linux_wait_for_event): Do not pass signals while
single-stepping.
Index: gdb/gdbserver/linux-low.c
===================================================================
--- gdb/gdbserver/linux-low.c (revision 180562)
+++ gdb/gdbserver/linux-low.c (working copy)
@@ -564,12 +564,14 @@ linux_wait_for_event (struct thread_info
/* If GDB is not interested in this signal, don't stop other
threads, and don't report it to GDB. Just resume the
inferior right away. We do this for threading-related
- signals as well as any that GDB specifically requested
- we ignore. But never ignore SIGSTOP if we sent it
- ourselves. */
+ signals as well as any that GDB specifically requested we
+ ignore. But never ignore SIGSTOP if we sent it ourselves,
+ and do not ignore signals when stepping - they may require
+ special handling to skip the signal handler. */
/* FIXME drow/2002-06-09: Get signal numbers from the inferior's
thread library? */
if (WIFSTOPPED (wstat)
+ && !event_child->stepping
&& ((using_threads && (WSTOPSIG (wstat) == __SIGRTMIN
|| WSTOPSIG (wstat) == __SIGRTMIN + 1))
|| (pass_signals[target_signal_from_host (WSTOPSIG (wstat))]