From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24119 invoked by alias); 23 Jul 2011 22:12:04 -0000 Received: (qmail 24111 invoked by uid 22791); 23 Jul 2011 22:12:04 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Jul 2011 22:11:48 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p6NMARI4009284; Sun, 24 Jul 2011 00:10:27 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p6NMAPQm012108; Sun, 24 Jul 2011 00:10:25 +0200 (CEST) Date: Sat, 23 Jul 2011 23:28:00 -0000 Message-Id: <201107232210.p6NMAPQm012108@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: yao@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <4E259815.8080001@codesourcery.com> (message from Yao Qi on Tue, 19 Jul 2011 22:43:33 +0800) Subject: Re: [patch] Skip kill-after-signal.exp if hw single-step is not supported References: <4E259815.8080001@codesourcery.com> 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: 2011-07/txt/msg00660.txt.bz2 > Date: Tue, 19 Jul 2011 22:43:33 +0800 > From: Yao Qi > > This test `gdb_test "stepi" "\r\nhandler .*"' in kill-after-signal.exp > performs a single-step, and deliver a signal (SIGUSR1) to inferior. > Software single step can not do that, because the next instruction > (start of handler) is unable to be determined. > > This patch is to allow running this case only on x86 and x86_64, on > which hardware single step is supported. > > OK? Certainly not. For one thing you only allow to run this on Linux. But there are other architectures that that have hardware single step. And there are Operating Systems that implement software single step in the kernel where this "problem" should not occur. And even when GDB does the software single stepping, it should be possible to do this correctly with appropriate OS support. Proper approach is probably to XFAIL this for the particular targets that you're dealing with. > 2011-07-19 Yao Qi > > gdb/testsuite/ > * gdb.base/kill-after-signal.exp: Skip if target doesn't support hardware > single step. > > diff --git a/gdb/testsuite/gdb.base/kill-after-signal.exp b/gdb/testsuite/gdb.base/kill-after-signal.exp > index eecad2e..df0afe7 100644 > --- a/gdb/testsuite/gdb.base/kill-after-signal.exp > +++ b/gdb/testsuite/gdb.base/kill-after-signal.exp > @@ -14,6 +14,17 @@ > # along with this program. If not, see . > > set testfile "kill-after-signal" > + > +if { ! [istarget "i?86-*-linux*"] > + && ! [istarget "x86_64-*-linux*"] } { > + # skip it if target doesn't support hardware single-step. In following tests, > + # in "stepi", a signal is delivered along with single-step. In software single > + # step, gdb is unable to determine the next instruction addresses, because start > + # of signal handler is one of them. > + untested ${testfile}.exp > + return > +} > + > if [prepare_for_testing ${testfile}.exp ${testfile}] { > return -1 > }