From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16489 invoked by alias); 20 Jul 2011 15:06:27 -0000 Received: (qmail 16472 invoked by uid 22791); 20 Jul 2011 15:06:25 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Jul 2011 15:05:46 +0000 Received: (qmail 19444 invoked from network); 20 Jul 2011 15:05:46 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jul 2011 15:05:46 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] Skip kill-after-signal.exp if hw single-step is not supported Date: Wed, 20 Jul 2011 15:12:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) Cc: Yao Qi References: <4E259815.8080001@codesourcery.com> In-Reply-To: <4E259815.8080001@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201107201605.43767.pedro@codesourcery.com> 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: 2011-07/txt/msg00533.txt.bz2 On Tuesday 19 July 2011 15:43:33, Yao Qi wrote: > 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. >=20 > This patch is to allow running this case only on x86 and x86_64, on > which hardware single step is supported. >=20 > OK? >=20 > --=20 > Yao (=E9=BD=90=E5=B0=A7) > skip_kill_after_signal.patch > 2011-07-19 Yao Qi >=20 > gdb/testsuite/ > * gdb.base/kill-after-signal.exp: Skip if target doesn't support = hardware > single step. >=20 > 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 . >=20=20 > set testfile "kill-after-signal" > + > +if { ! [istarget "i?86-*-linux*"] > + && ! [istarget "x86_64-*-linux*"] } { Other archs !x86, and other kernels/stubs/servers !Linux that can do hardware stepping. If we're going to have a list, invert the logic of the check, defaulting to running the test, and leaving out archs were we know software stepping is used. Some targets, like x86/OpenBSD and MacOS, although can hardware step, can't step into a handler. I think there are a couple more tests that rely on stepping into a handler. Maybe a predicate in gdb.exp for that would be good. > + # skip it if target doesn't support hardware single-step. In follow= ing tests, > + # in "stepi", a signal is delivered along with single-step. In soft= ware single > + # step, gdb is unable to determine the next instruction addresses, b= ecause start > + # of signal handler is one of them. > + untested ${testfile}.exp > + return > +} > + > if [prepare_for_testing ${testfile}.exp ${testfile}] { > return -1 > } --=20 Pedro Alves