Message ID | 1426849255-9664-1-git-send-email-qiyaoltc@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDKYLT662AOBB7H3V6UAKGQEVPX2A5Q@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EB890214BC for <linaro@patches.linaro.org>; Fri, 20 Mar 2015 11:01:17 +0000 (UTC) Received: by labgm9 with SMTP id gm9sf16871871lab.1 for <linaro@patches.linaro.org>; Fri, 20 Mar 2015 04:01:16 -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:x-original-sender:x-original-authentication-results; bh=cqbmEQe2uqBmo5+tn22vX1PejOzwT6/i4FvmDkjJVSw=; b=m6++ttAVYT9NSDrWaBtBKhAY1D42Z/Vo0Kdg/oCKqxf7UCRf1XvgUrgp7a+wHw1ECf KpLuIGTCIYaWHI6Yer9G9I9TNWCMTUXe33BSdyUJodYfyfkQIkQPknzBNhaL6rrDDnZq lqcjZ8S/dAjbh3G4M4W6RG1fHxbHSv+HRSUnYpvDx/S4COwRD62lAbuEsceMFWTs8AhL w5ntuYM11QfKJDp27Xdu1GzfUY7bIeJH6lRYFhY3Q/SZp1YaV3UnbJEL7H2nmjWrON5o S2ISE32nfKuWQKKS2G0B1t3HskRXGSICej1Sm4wXrq15h/3qZuWE8wMkRVM2LOSEDL1l 04+w== X-Gm-Message-State: ALoCoQnqY56fCJubkzd+YC1bMiCaRdLlJVTY+yLhDIJEux8Sxe1c6izcvAawucbnY4Qs/TAp4hbT X-Received: by 10.112.148.10 with SMTP id to10mr8028022lbb.18.1426849276928; Fri, 20 Mar 2015 04:01:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.225 with SMTP id z1ls415308lad.109.gmail; Fri, 20 Mar 2015 04:01:16 -0700 (PDT) X-Received: by 10.112.26.134 with SMTP id l6mr64190732lbg.23.1426849276788; Fri, 20 Mar 2015 04:01:16 -0700 (PDT) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com. [2a00:1450:4010:c03::236]) by mx.google.com with ESMTPS id y5si2959826lag.88.2015.03.20.04.01.16 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2015 04:01:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236; Received: by labe2 with SMTP id e2so8707959lab.3 for <patchwork-forward@linaro.org>; Fri, 20 Mar 2015 04:01:16 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr6091113lbb.41.1426849276496; Fri, 20 Mar 2015 04:01:16 -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 h5csp945629lbj; Fri, 20 Mar 2015 04:01:15 -0700 (PDT) X-Received: by 10.70.49.98 with SMTP id t2mr71234654pdn.106.1426849274504; Fri, 20 Mar 2015 04:01:14 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id h4si8816244pdr.77.2015.03.20.04.01.13 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2015 04:01:14 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-120960-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 32844 invoked by alias); 20 Mar 2015 11:01:07 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 32823 invoked by uid 89); 20 Mar 2015 11:01:06 -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-f44.google.com Received: from mail-pa0-f44.google.com (HELO mail-pa0-f44.google.com) (209.85.220.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 20 Mar 2015 11:01:01 +0000 Received: by pagj4 with SMTP id j4so14642902pag.2 for <gdb-patches@sourceware.org>; Fri, 20 Mar 2015 04:00:59 -0700 (PDT) X-Received: by 10.66.146.100 with SMTP id tb4mr155042633pab.104.1426849259868; Fri, 20 Mar 2015 04:00:59 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id ba12sm7610773pac.23.2015.03.20.04.00.58 for <gdb-patches@sourceware.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 04:00:59 -0700 (PDT) From: Yao Qi <qiyaoltc@gmail.com> To: gdb-patches@sourceware.org Subject: [PATCH] Relax pattern to match the output of "info frame" in gdb.base/savedregs.exp Date: Fri, 20 Mar 2015 11:00:55 +0000 Message-Id: <1426849255-9664-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:c03::236 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 |
diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp index da8d90f..33df407 100644 --- a/gdb/testsuite/gdb.base/savedregs.exp +++ b/gdb/testsuite/gdb.base/savedregs.exp @@ -77,7 +77,7 @@ proc process_saved_regs { current inner outer } { set pat "Stack frame at .* Saved registers:.*" } default { - set pat "Stack frame at .* in $func .* Saved registers:.*" + set pat "Stack frame at .* in $func .*( Saved registers:.*)?" } } # If the "info frame" barf, capture the output anyway so that
From: Yao Qi <yao.qi@linaro.org> Hi, I see the following two fails in gdb.base/savedregs.exp on aarch64-linux, info frame 2^M Stack frame at 0x7ffffffa60:^M pc = 0x40085c in thrower (gdb/testsuite/gdb.base/savedregs.c:49); saved pc = 0x400898^M called by frame at 0x7ffffffa70, caller of frame at 0x7fffffe800^M source language c.^M Arglist at 0x7ffffffa60, args: ^M Locals at 0x7ffffffa60, Previous frame's sp is 0x7ffffffa60^M (gdb) FAIL: gdb.base/savedregs.exp: Get thrower info frame info frame 2^M Stack frame at 0x7fffffe800:^M pc = 0x400840 in catcher (gdb/testsuite/gdb.base/savedregs.c:42); saved pc = 0x7fb7ffc350^M called by frame at 0x7fffffe800, caller of frame at 0x7fffffe7e0^M source language c.^M Arglist at 0x7fffffe7f0, args: sig=11^M Locals at 0x7fffffe7f0, Previous frame's sp is 0x7fffffe800 (gdb) FAIL: gdb.base/savedregs.exp: Get catcher info frame looks the test expects to match "Saved registers:" from the output of "info frame", but no registers are saved on these two frames, because thrower and catcher are simple and leaf functions. (gdb) disassemble thrower Dump of assembler code for function thrower: 0x0000000000400858 <+0>: mov x0, #0x0 // #0 0x000000000040085c <+4>: strb wzr, [x0] 0x0000000000400860 <+8>: ret End of assembler dump. (gdb) disassemble catcher Dump of assembler code for function catcher: 0x0000000000400838 <+0>: sub sp, sp, #0x10 0x000000000040083c <+4>: str w0, [sp,#12] 0x0000000000400840 <+8>: adrp x0, 0x410000 0x0000000000400844 <+12>: add x0, x0, #0xb9c 0x0000000000400848 <+16>: mov w1, #0x1 // #1 0x000000000040084c <+20>: str w1, [x0] 0x0000000000400850 <+24>: add sp, sp, #0x10 0x0000000000400854 <+28>: ret There are two ways to fix these fails, one is to modify functions to force some registers saved (for example, doing function call in them), and the other one is to relax the pattern to optionally match "Saved registers:". I did both, and feel that the latter is simple, so here is it. gdb/testsuite: 2015-03-20 Yao Qi <yao.qi@linaro.org> * gdb.base/savedregs.exp (process_saved_regs): Make "Saved registers:" optional in the pattern. --- gdb/testsuite/gdb.base/savedregs.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)