From patchwork Wed Mar 30 16:28:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 11567 Received: (qmail 27858 invoked by alias); 30 Mar 2016 16:29:10 -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 27791 invoked by uid 89); 30 Mar 2016 16:29: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*r:sk:10.2016 X-HELO: mail-pf0-f175.google.com Received: from mail-pf0-f175.google.com (HELO mail-pf0-f175.google.com) (209.85.192.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 30 Mar 2016 16:28:59 +0000 Received: by mail-pf0-f175.google.com with SMTP id x3so46961856pfb.1 for ; Wed, 30 Mar 2016 09:28:59 -0700 (PDT) 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; bh=/4T8Grtd3qD2mlwJrDGYW6yJMEEc2x4oen7mdM1puKY=; b=cdXt0ffKNVT7lI/T3o4v0ER3fg55xoBx5lT2PKYlgKoZcor4RptYGuRJHRa2jw6c7v Zu91LgDazsxnd/ruBifqaMRo42HRyAg9ufJJQUjN46EexbfrOJQSF17tWLFOOI7emO+f 1Q0WoZTbv7jZzEpmQ5G65ugJgwBPgmr2hi2383u+Tc5MBt3m4vjwlxFGcepeeyRn/J6b rjzIlIfA1+WLU5fFkEMb2UomvI6B/343doYABleAXR/riLcZiUU6s+w3+02r6caRsAgc hcEYf6eNTUZ4h3GJepID65MCS1zpejMDZqPUBFCex6QahXnW1hMUpu/z7A2doWZWcEBY tyTg== X-Gm-Message-State: AD7BkJLWVYkAqVq8+gyMi1IhMWj+Wf/rbdq52ari9rTg6o9ZaM7husriQaafFb5u2J2W4A== X-Received: by 10.98.66.75 with SMTP id p72mr14854913pfa.50.1459355337443; Wed, 30 Mar 2016 09:28:57 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (power-aix.osuosl.org. [140.211.15.154]) by smtp.gmail.com with ESMTPSA id v14sm7128232pas.10.2016.03.30.09.28.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Mar 2016 09:28:56 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Fix gdb.reverse/next-reverse-bkpt-over-sr.exp Date: Wed, 30 Mar 2016 17:28:52 +0100 Message-Id: <1459355332-19988-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes I see the fail on aarch64-linux, (gdb) reverse-next Breakpoint 2, callee () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/step-reverse.c:26^M 26 myglob++; return 0; /* ARRIVED IN CALLEE */ (gdb) FAIL: gdb.reverse/next-reverse-bkpt-over-sr.exp: reverse-next over call trips user breakpoint at function entry The test expects program stops at line 25, but program stops at line 26. (gdb) maintenance info line-table objfile: /scratch/yao/gdb/build-git/aarch64-linux-gnu/gdb/testsuite/outputs/gdb.reverse/next-reverse-bkpt-over-sr/next-reverse-bkpt-over-sr ((struct objfile *) 0x613000002880) compunit_symtab: ((struct compunit_symtab *) 0x621000121760) symtab: /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.reverse/step-reverse.c ((struct symtab *) 0x6210001217e0) linetable: ((struct linetable *) 0x6210001520d0): INDEX LINE ADDRESS 0 25 0x0000000000400890 1 26 0x0000000000400890 2 27 0x00000000004008b0 (gdb) disassemble callee Dump of assembler code for function callee: 0x0000000000400890 <+0>: adrp x0, 0x410000 0x0000000000400894 <+4>: add x0, x0, #0xcac the line-table show that the first instruction of function callee is mapped line 25 and 26. I am not sure the line-table is correct, but it is not the point of this test. The goal of this test is to test program hits the breakpoint on the first instruction of function after 'reverse-next', so I change this test to expect the breakpoint number the program hits. gdb/testsuite: 2016-03-30 Yao Qi * gdb.reverse/next-reverse-bkpt-over-sr.exp: Match the breakpoint number instead of the comments on some line. --- gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp b/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp index 4a381a4..e06eb7e 100644 --- a/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp +++ b/gdb/testsuite/gdb.reverse/next-reverse-bkpt-over-sr.exp @@ -48,8 +48,9 @@ gdb_test "advance $lineno" ".*STEP INTO THIS CALL.*" "get past callee call" gdb_test "b \*callee" "" "set breakpoint at callee's entry" +set bpnum [get_integer_valueof "\$bpnum" 0] gdb_test "reverse-next" \ - "Breakpoint.*, callee.*ENTER CALLEE.*" \ + "Breakpoint $bpnum, callee.*" \ "reverse-next over call trips user breakpoint at function entry" gdb_test "up" \