From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8219 invoked by alias); 18 Sep 2011 00:11:25 -0000 Received: (qmail 8211 invoked by uid 22791); 18 Sep 2011 00:11:23 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 18 Sep 2011 00:11:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 355812BB171; Sat, 17 Sep 2011 20:11:09 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HkxBiufAbzYd; Sat, 17 Sep 2011 20:11:09 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 09CA22BB16D; Sat, 17 Sep 2011 20:11:08 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id DC3CF145615; Sat, 17 Sep 2011 20:10:57 -0400 (EDT) Date: Sun, 18 Sep 2011 02:42:00 -0000 From: Joel Brobecker To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [patch] Skip kill-after-signal.exp if hw single-step is not supported Message-ID: <20110918001057.GA11805@adacore.com> References: <4E259815.8080001@codesourcery.com> <201107201605.43767.pedro@codesourcery.com> <201107232247.p6NMlwVx029216@glazunov.sibelius.xs4all.nl> <4E414503.7080201@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E414503.7080201@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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-09/txt/msg00346.txt.bz2 > gdb/testsuite/ > > * lib/gdb.exp (single_step_to_signal_handler_p): New. > * gdb.base/kill-after-signal.exp: Skip if target supports single step > to signal handler. No one commented on this patch. I only have minor comments, so pre-approved with those changes. > +# Return 1 if target hardware or OS supports single stepping to single handler, > +# otherwise, return 0. > + > +proc single_step_to_signal_handler_p {} { > + > + # Targets don't have hardware single step. On these targets, when a signal > + # is delivered during software single step, gdb is unable to determine the > + # next instruction addresses, because start of signal handler is one of them. > + if { [istarget "arm*-*-*"] || [istarget "mips*-*-*"] } { > + return 0 > + } Can you name the function "can_single_step_to_signal_handler" instead? I think it will be a little clearer what this function is about. Also, your comments, both in the function description as well as inside the function itself, are a little two wide. We have a soft-limit of 70 chars, which can be exceeded if it helps readability. -- Joel