From patchwork Tue Jul 7 09:39:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 7553 Received: (qmail 6875 invoked by alias); 7 Jul 2015 09:39:58 -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 6858 invoked by uid 89); 7 Jul 2015 09:39:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f180.google.com Received: from mail-pd0-f180.google.com (HELO mail-pd0-f180.google.com) (209.85.192.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 07 Jul 2015 09:39:56 +0000 Received: by pddu5 with SMTP id u5so35388259pdd.3 for ; Tue, 07 Jul 2015 02:39:54 -0700 (PDT) X-Received: by 10.68.131.65 with SMTP id ok1mr7318777pbb.16.1436261994653; Tue, 07 Jul 2015 02:39:54 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id mt1sm21116145pbb.70.2015.07.07.02.39.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jul 2015 02:39:53 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] [arm] Fix regression by Do not skip prologue for asm (.S) files Date: Tue, 7 Jul 2015 10:39:50 +0100 Message-Id: <1436261990-20094-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes Patch "Do not skip prologue for asm (.S) files" [1] changes GDB's behaviour on which test gdb.arch/thumb-singlestep.exp depends, so it causes the fail below: (gdb) si^M 37 blx foo^M (gdb) FAIL: gdb.arch/thumb-singlestep.exp: step into foo the test assumes the program will stop at the instruction after "push" but it doesn't. The fix to this fail is to do one more single step. I'll push it in. [1] https://sourceware.org/ml/gdb-patches/2015-06/msg00561.html gdb/testsuite: 2015-07-07 Yao Qi * gdb.arch/thumb-singlestep.exp: Do one more single step. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.arch/thumb-singlestep.exp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0a90fa9..2a63301 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-07-07 Yao Qi + + * gdb.arch/thumb-singlestep.exp: Do one more single step. + 2015-06-30 Martin Galvan * lib/gdb.exp (test_class_help): Remove the unneeded escaping of diff --git a/gdb/testsuite/gdb.arch/thumb-singlestep.exp b/gdb/testsuite/gdb.arch/thumb-singlestep.exp index 07adaaf..e7a865f 100644 --- a/gdb/testsuite/gdb.arch/thumb-singlestep.exp +++ b/gdb/testsuite/gdb.arch/thumb-singlestep.exp @@ -34,5 +34,8 @@ if ![runto_main] then { return -1 } +# GDB doesn't skip prologue for asm files, so do one single step to +# pass instruction "push". +gdb_test "si" "blx foo.*" "single step" gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo"