From patchwork Fri Feb 26 14:03:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 11113 Received: (qmail 88490 invoked by alias); 26 Feb 2016 14:04:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk 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 88371 invoked by uid 89); 26 Feb 2016 14:04:10 -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=H*RU:209.85.192.195, Hx-spam-relays-external:209.85.192.195, Hx-languages-length:3346, sk:stepov X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 26 Feb 2016 14:04:06 +0000 Received: by mail-pf0-f195.google.com with SMTP id t66so470511pfb.0 for ; Fri, 26 Feb 2016 06:04:05 -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=92jbgQyCOsQPczkLPedjiZeo+8CFHANSabUtdaA/DJE=; b=jnFpcz9p8QzUEIDpdc7FtL/GAXELY68Auqst8DD1qPrT92LFSle2S7V5Iyxyu/uyTy QFq1zkMz9KAU6LSLKDwErPn9QJPA9fjkIjrdFMN5ezEL9K8VgvolRecfi8TBX30hAxZH FhWJqVitjAQViLWIHTIjuwHDuMSxPgFWi1HT/KVHLy44+0GxkYu/K9qvjHW23/0OBqpk SVPiaNCGzcpgrDjdw/FGIXy2Wp8JQ6t60Bs8pCdPEz0XnyMzRjHQCofUOcJGxXWr+p68 wXOV4dMDAwcOfk2C3xYGfJVyTMLOYChPuY6f5/CUuOHRqQQtC2/v7IXJWJbFygYwO5xP MI4w== X-Gm-Message-State: AD7BkJLwaAf5LHT8qzqMkN3ECUZM7NaxRJgeIIm2CAuPvK/p6JJ94sec54NQv1ysrDyfAw== X-Received: by 10.98.8.74 with SMTP id c71mr2272340pfd.155.1456495444068; Fri, 26 Feb 2016 06:04:04 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id d81sm19745089pfj.77.2016.02.26.06.04.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Feb 2016 06:04:03 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 6/7] Reformat gdb.base/step-over-syscall.exp Date: Fri, 26 Feb 2016 14:03:45 +0000 Message-Id: <1456495426-7520-7-git-send-email-yao.qi@linaro.org> In-Reply-To: <1456495426-7520-1-git-send-email-yao.qi@linaro.org> References: <1455892594-2294-1-git-send-email-yao.qi@linaro.org> <1456495426-7520-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes gdb/testsuite: 2016-02-26 Yao Qi * gdb.base/step-over-syscall.exp (disp_step_cross_syscall): Fix code format. --- gdb/testsuite/gdb.base/step-over-syscall.exp | 59 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp index 6146f64..5d2b296 100644 --- a/gdb/testsuite/gdb.base/step-over-syscall.exp +++ b/gdb/testsuite/gdb.base/step-over-syscall.exp @@ -124,46 +124,45 @@ proc step_over_syscall { syscall } { continue } - set ret [setup $syscall] + set ret [setup $syscall] - set syscall_insn_addr [lindex $ret 0] - set syscall_insn_next_addr [lindex $ret 1] - if { $syscall_insn_addr == -1 } { - return -1 - } + set syscall_insn_addr [lindex $ret 0] + set syscall_insn_next_addr [lindex $ret 1] + if { $syscall_insn_addr == -1 } { + return -1 + } - 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. + delete_breakpoints - # Delete breakpoint syscall insns to avoid interference to other syscalls. - delete_breakpoints - - gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*" - gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \ - "continue to marker ($syscall)" + gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*" + gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \ + "continue to marker ($syscall)" } } }