public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix gdb.reverse/next-reverse-bkpt-over-sr.exp
@ 2016-03-30 16:29 Yao Qi
  2016-04-07 15:58 ` Yao Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Yao Qi @ 2016-03-30 16:29 UTC (permalink / raw)
  To: gdb-patches

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  <yao.qi@linaro.org>

	* 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" \
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix gdb.reverse/next-reverse-bkpt-over-sr.exp
  2016-03-30 16:29 [PATCH] Fix gdb.reverse/next-reverse-bkpt-over-sr.exp Yao Qi
@ 2016-04-07 15:58 ` Yao Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Yao Qi @ 2016-04-07 15:58 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

Yao Qi <qiyaoltc@gmail.com> writes:

> gdb/testsuite:
>
> 2016-03-30  Yao Qi  <yao.qi@linaro.org>
>
> 	* gdb.reverse/next-reverse-bkpt-over-sr.exp: Match the breakpoint
> 	number instead of the comments on some line.

I pushed it in.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-07 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30 16:29 [PATCH] Fix gdb.reverse/next-reverse-bkpt-over-sr.exp Yao Qi
2016-04-07 15:58 ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).