diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-04-07 17:06:14 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-04-07 17:06:14 +0100 |
commit | c8064e7e9b4d7d9cc29a613af899a7739df60be6 (patch) | |
tree | bca6538337d39ec2f7b27c13112bd8a54c6f27d2 /gdb/testsuite/gdb.python/py-arch.exp | |
parent | bde475616e3fdb6d41c047956aaf627fbf34a85d (diff) | |
download | gdb-c8064e7e9b4d7d9cc29a613af899a7739df60be6.zip gdb-c8064e7e9b4d7d9cc29a613af899a7739df60be6.tar.gz gdb-c8064e7e9b4d7d9cc29a613af899a7739df60be6.tar.bz2 |
Fix gdb.reverse/finish-reverse-bkpt.exp
I see the following fail on aarch64-linux
break void_func
Breakpoint 2 at 0x4007a0: file gdb/testsuite/gdb.reverse/finish-reverse.c, line 44.
(gdb) PASS: gdb.reverse/finish-reverse-bkpt.exp: set breakpoint on void_func
continue
Continuing.
Breakpoint 2, void_func () at gdb/testsuite/gdb.reverse/finish-reverse.c:44^M
44 void_test = 1; /* VOID FUNC */^M
(gdb) PASS: gdb.reverse/finish-reverse-bkpt.exp: continue to breakpoint: void_func
break *void_func^M
Note: breakpoint 2 also set at pc 0x4007a0.^M
Breakpoint 3 at 0x4007a0: file gdb/testsuite/gdb.reverse/finish-reverse.c, line 44.
(gdb) PASS: gdb.reverse/finish-reverse-bkpt.exp: set breakpoint at void_func's entry
reverse-finish^M
Run back to call of #0 void_func () at gdb/testsuite/gdb.reverse/finish-reverse.c:44
main (argc=1, argv=0x7ffffffb78) at gdb/testsuite/gdb.reverse/finish-reverse.c:98
98 void_func (); /* call to void_func */^M
(gdb) FAIL: gdb.reverse/finish-reverse-bkpt.exp: reverse-finish from void_func trips breakpoint at entry
The test assumes that brekapoints on "void_func" and "*void_func" are
set on different places because of function prologue. However, on
aarch64-linux, there is no prologue in void_func, so two breakpoints
are set at the same place (0x4007a0).
(gdb) disassemble void_func
Dump of assembler code for function void_func:
0x00000000004007a0 <+0>: adrp x0, 0x410000
0x00000000004007a4 <+4>: add x0, x0, #0xc14
0x00000000004007a8 <+8>: mov w1, #0x1
0x00000000004007ac <+12>: str w1, [x0]
0x00000000004007b0 <+16>: ret
The fix to this problem is to single step forward before setting
breakpoint on *void_func.
gdb/testsuite:
2016-04-07 Yao Qi <yao.qi@linaro.org>
* gdb.reverse/finish-reverse-bkpt.exp: Use temporary breakpoint.
Execute "si" command.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-arch.exp')
0 files changed, 0 insertions, 0 deletions