From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5996 invoked by alias); 30 Sep 2009 16:25:25 -0000 Received: (qmail 5970 invoked by uid 22791); 30 Sep 2009 16:25:21 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Sep 2009 16:25:16 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AFFA910EC9; Wed, 30 Sep 2009 16:25:53 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 9901210E94; Wed, 30 Sep 2009 16:25:53 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Mt1zN-0003Et-7z; Wed, 30 Sep 2009 12:25:13 -0400 Date: Wed, 30 Sep 2009 16:25:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [PATCH/RFC] Signals & single-stepping Message-ID: <20090930162513.GA10304@caradoc.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sourceware.org References: <200909301440.n8UEevPb017814@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909301440.n8UEevPb017814@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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/msg00952.txt.bz2 On Wed, Sep 30, 2009 at 04:40:57PM +0200, Mark Kettenis wrote: > 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? Your patch doesn't reintroduce the problem from the PR, and the new tests in interrupt.exp pass on x86_64-linux. I would really love someone else to volunteer to review it though - trap_expected confuses me horribly. I'd guess this change could lead to hitting (and displaying) the breakpoint at the current PC a second time, which is undesirable. On the other hand it might fix some of the signal tests on software single-step targets... > > > 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 > -- Daniel Jacobowitz CodeSourcery