From patchwork Fri Mar 13 14:41:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 45779 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 79841214CB for ; Fri, 13 Mar 2015 14:42:01 +0000 (UTC) Received: by wivz2 with SMTP id z2sf3961634wiv.1 for ; Fri, 13 Mar 2015 07:42:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=TrVLIP9cu69Qxb4rK2MgY8Ou8oTTXMxFTQcYbdKx9gM=; b=eQ2aADVDD4xq7/Fb/c7rpjV92CjAtQCMyW2je4hI8PWLGZzqsaatS9RZTkGkn2mxJP wg5MeZGWwyr4OfDWwXoj2LFTkGG7aGbX0C1ITHHfOhn94vy5tGwIMfLD3H7qi8EZg01D Jih0y8NMgQdEf2X4a5nOuhTm4vkSy2SKnUE6GD8KnennqRa9JrYoFsmjDewpQ09ueiew aOpWSMg7NkLQcyzN2wO2RGD+TicAmAlI+UDB1OWYZ/XqDdIIjeDd+ktfdeHTYazS6v1E DdxV/0TTmpiRGl+9CAFsxKoZgYRTeGyFwx/JMhOaB6b3AQslBF6rfrLReY2ZAviZfAAp 2zFQ== X-Gm-Message-State: ALoCoQkA5q/vS7FpBbPgJWk3C0OWL/XuEfmOw3/Me32T/jRE/jw/tHFN0b6ETvkrNmXD5aOUogOk X-Received: by 10.180.211.199 with SMTP id ne7mr4035090wic.5.1426257720809; Fri, 13 Mar 2015 07:42:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.103 with SMTP id s7ls351324lag.105.gmail; Fri, 13 Mar 2015 07:42:00 -0700 (PDT) X-Received: by 10.152.5.170 with SMTP id t10mr43424293lat.43.1426257720577; Fri, 13 Mar 2015 07:42:00 -0700 (PDT) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com. [2a00:1450:4010:c04::22a]) by mx.google.com with ESMTPS id 4si1531594lar.20.2015.03.13.07.42.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Mar 2015 07:42:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) client-ip=2a00:1450:4010:c04::22a; Received: by lbjf15 with SMTP id f15so23212747lbj.2 for ; Fri, 13 Mar 2015 07:42:00 -0700 (PDT) X-Received: by 10.112.147.229 with SMTP id tn5mr10097311lbb.106.1426257720354; Fri, 13 Mar 2015 07:42:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp958702lbj; Fri, 13 Mar 2015 07:41:59 -0700 (PDT) X-Received: by 10.42.90.133 with SMTP id k5mr57223773icm.91.1426257718897; Fri, 13 Mar 2015 07:41:58 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id am9si4447093pad.8.2015.03.13.07.41.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Mar 2015 07:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-120728-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 129455 invoked by alias); 13 Mar 2015 14:41:44 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 129417 invoked by uid 89); 13 Mar 2015 14:41:41 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 13 Mar 2015 14:41:39 +0000 Received: by padfa1 with SMTP id fa1so30032089pad.3 for ; Fri, 13 Mar 2015 07:41:38 -0700 (PDT) X-Received: by 10.70.118.38 with SMTP id kj6mr37125653pdb.156.1426257698297; Fri, 13 Mar 2015 07:41:38 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id i6sm3924861pdm.4.2015.03.13.07.41.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Mar 2015 07:41:37 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 2/2] watchpoint-reuse-slot.exp: skip when requesting two breakpoints in one slot on aarch64 Date: Fri, 13 Mar 2015 14:41:32 +0000 Message-Id: <1426257692-30461-2-git-send-email-qiyaoltc@gmail.com> In-Reply-To: <1426257692-30461-1-git-send-email-qiyaoltc@gmail.com> References: <1426257692-30461-1-git-send-email-qiyaoltc@gmail.com> X-IsSubscribed: yes X-Original-Sender: qiyaoltc@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com X-Google-Group-Id: 836684582541 From: Yao Qi watchpoint-reuse-slot.exp sets two hardware breakpoints in contiguous address to reuse one debug register. However, requested address for breakpoint should be 4-byte aligned on aarch64, so it is impossible to request two hardware breakpoints and use one debug register. This patch is to skip the test in the case on aarch64-linux. Since arm has Thumb mode, in which instruction address can be 2-byte aligned, more thoughts are needed for arm in my next step. gdb/testsuite: 2015-03-13 Yao Qi * gdb.base/watchpoint-reuse-slot.exp: Skip tests when two breakpoints are requested on aarch64-linux. --- gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp index df6eeb6..c646f22 100644 --- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp +++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp @@ -178,10 +178,18 @@ foreach always_inserted {"off" "on" } { foreach cmd2 $cmds { for {set width 1} {$width < 4} {incr width} { - if {$cmd1 == "hbreak" && $cmd2 == "hbreak" && $width > 1} { - # hbreak ignores WIDTH, no use testing more than - # once. - continue + if {$cmd1 == "hbreak" && $cmd2 == "hbreak"} { + if {$width > 1} { + # hbreak ignores WIDTH, no use testing more than + # once. + continue + } + + if { [istarget "aarch64*-*-linux*"] } { + # The address for breakpoint should be 4-byte + # aligned, so can't reuse slot. + continue + } } if {($cmd1 == "hbreak" && $cmd2 != "hbreak"