From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14370 invoked by alias); 30 Sep 2009 14:41:08 -0000 Received: (qmail 14356 invoked by uid 22791); 30 Sep 2009 14:41:07 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Sep 2009 14:41:01 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n8UEevra025355 for ; Wed, 30 Sep 2009 16:40:57 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n8UEevPb017814; Wed, 30 Sep 2009 16:40:57 +0200 (CEST) Date: Wed, 30 Sep 2009 14:41:00 -0000 Message-Id: <200909301440.n8UEevPb017814@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: gdb-patches@sourceware.org Subject: [PATCH/RFC] Signals & single-stepping Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00947.txt.bz2 A while ago Daniel made a change to infcmd.c which broke hitting breakpoints in signal handlers while single-stepping on OpenBSD (and probably other ptrace-based native targets): 2009-01-20 Daniel Jacobowitz PR gdb/9346 * infcmd.c (signal_command): Do not specify a resume PC. The problem is that breakpoints are removed for single-stepping. So the diff below fixes things. Now it isn't clear to me if this approach doesn't reintroduce the problem from the PR that Daniel tried to fix. Comments? Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.410 diff -u -p -r1.410 infrun.c --- infrun.c 29 Sep 2009 00:53:04 -0000 1.410 +++ infrun.c 30 Sep 2009 12:55:46 -0000 @@ -1604,6 +1604,11 @@ proceed (CORE_ADDR addr, enum target_sig else if (!signal_program[tp->stop_signal]) tp->stop_signal = TARGET_SIGNAL_0; + if (tp->stop_signal != TARGET_SIGNAL_0) { + tp->trap_expected = 0; + insert_breakpoints (); + } + annotate_starting (); /* Make sure that output from GDB appears before output from the