From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109647 invoked by alias); 19 Feb 2016 14:36:58 -0000 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 Received: (qmail 109427 invoked by uid 89); 19 Feb 2016 14:36:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hit, Format, displaced X-HELO: mail-pf0-f177.google.com Received: from mail-pf0-f177.google.com (HELO mail-pf0-f177.google.com) (209.85.192.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 19 Feb 2016 14:36:49 +0000 Received: by mail-pf0-f177.google.com with SMTP id x65so52165164pfb.1 for ; Fri, 19 Feb 2016 06:36:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=C2Bhy//64Nnq3iJjQ6b9G1H1z969KDdp7szmOiYmuyA=; b=MgCaXExFphEoR6sphr7udDh2/T89bdn4tPgf/+U1ar9i50bZUWnPluv+3QPFJDQrzE HYZHksUSmTM14lyYEJZ7WNvyFEuvHfRXlTM+qyze5FWO0kVOtb248Uh47+eahgc/nPvn Uldhz/nHhk7OF6D3Dz2E+MEwOlwP90zOwwbHzefLJXTfrhFWhIB9Nda9KmLHzlJ5bl7/ zYSpvtt6Wztz/UlNP9iyyAhOvSFhI63qIaxBcvc8shkHMFkmCW+4p0K/cp6ezPAXRRtW NKdEZgysFG1nFNtOSyqjjJuagb3Zx5FSE7xbyJ5LtuVslrLQxKZXaT0xTOvK5cDjzpPI LT8g== X-Gm-Message-State: AG10YOSWM6RQ7qy/MccD4q51DmZVxKtFPqz1IWa4mM8mFNiR2kY/sF3aIcRbbWFWnXVbeQ== X-Received: by 10.98.69.1 with SMTP id s1mr18151230pfa.120.1455892607801; Fri, 19 Feb 2016 06:36:47 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id kq3sm18452546pab.24.2016.02.19.06.36.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Feb 2016 06:36:47 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 6/8] Reformat disp-step-syscall.exp Date: Fri, 19 Feb 2016 14:37:00 -0000 Message-Id: <1455892594-2294-7-git-send-email-yao.qi@linaro.org> In-Reply-To: <1455892594-2294-1-git-send-email-yao.qi@linaro.org> References: <1455892594-2294-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00598.txt.bz2 Make the format of disp-step-syscall.exp correct. gdb/testsuite: 2016-02-19 Yao Qi * gdb.base/disp-step-syscall.exp: Format the code. --- gdb/testsuite/gdb.base/disp-step-syscall.exp | 50 ++++++++++++++++------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/gdb/testsuite/gdb.base/disp-step-syscall.exp b/gdb/testsuite/gdb.base/disp-step-syscall.exp index 53ac1e1..128bb78 100644 --- a/gdb/testsuite/gdb.base/disp-step-syscall.exp +++ b/gdb/testsuite/gdb.base/disp-step-syscall.exp @@ -122,35 +122,41 @@ proc disp_step_cross_syscall { syscall } { foreach displaced $disp_step_opts { with_test_prefix "displaced $displaced" { - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \ - "continue to $syscall (3rd time)" + gdb_test "continue" \ + "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \ + "continue to $syscall (3rd time)" - # Hit the breakpoint on $syscall for the third time. In this time, we'll set - # breakpoint on the syscall insn we recorded previously, and single step over it. + # Hit the breakpoint on $syscall for the third time. + # In this time, we'll set breakpoint on the syscall insn + # we recorded previously, and single step over it. - set syscall_insn_bp 0 - gdb_test_multiple "break \*$syscall_insn_addr" "break on syscall insn" { - -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" { - set syscall_insn_bp $expect_out(1,string) - pass "break on syscall insns" - } - } + set syscall_insn_bp 0 + gdb_test_multiple "break \*$syscall_insn_addr" \ + "break on syscall insn" { + -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" { + set syscall_insn_bp $expect_out(1,string) + pass "break on syscall insns" + } + } - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \ - "continue to syscall insn $syscall" + gdb_test "continue" \ + "Continuing\\..*Breakpoint \[0-9\]+, .*" \ + "continue to syscall insn $syscall" - gdb_test_no_output "set displaced-stepping $displaced" + gdb_test_no_output "set displaced-stepping $displaced" - # Check the address of next instruction of syscall. - if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} { - return -1 - } + # Check the address of next instruction of syscall. + if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} { + return -1 + } - check_pc_after_cross_syscall $syscall $syscall_insn_next_addr + check_pc_after_cross_syscall $syscall $syscall_insn_next_addr - # Delete breakpoint syscall insns to avoid interference to other syscalls. - gdb_test_no_output "delete $syscall_insn_bp" "delete break $syscall insn" - } + # Delete breakpoint syscall insns to avoid interference + # to other syscalls. + gdb_test_no_output "delete $syscall_insn_bp" \ + "delete break $syscall insn" + } } with_test_prefix "break cond on target" { -- 1.9.1