]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/gdb.base/async.exp
[gdb/testsuite] Fix gdb.base/async.exp with gcc-8
authorTom de Vries <tdevries@suse.de>
Mon, 4 May 2020 06:40:38 +0000 (08:40 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 4 May 2020 06:40:38 +0000 (08:40 +0200)
commit6015a0674901be2c3fd24867e1a610d2abf8c1a0
tree831469c3b59d364fe9687b8a04452ceee3fa767b
parent9c7b8e9b92696f38ff29efeeb12eb166994c0a23
[gdb/testsuite] Fix gdb.base/async.exp with gcc-8

When running test-case gdb.base/async.exp with gcc-8, we run into:
...
FAIL: gdb.base/async.exp: stepi&
...

The problem is that with gcc-8, the instruction address is no longer printed:
...
 stepi&
-(gdb) 0x00000000004004b2       9        x = 5; x = 5; x = 5;
+(gdb) 9         x = 5; x = 5; x = 5;
 completed.
-PASS: gdb.base/async.exp: stepi&
+FAIL: gdb.base/async.exp: stepi&
...

This is due to the fact that gcc-8 contains more precise line info, making the
address being stepped to a "recommended breakpoint location", and consequently
gdb doesn't print the address prefix anymore.

Given that:
- we step through statements on the same line, and
- there's no addres prefix anymore,
this gives the impression of lack of progress, which could be improved upon,
filed as enhancement PR25911 - "Show column when stepping through line".

Fix the FAIL by checking in the test-case whether addresses are at
"recommended breakpoint location" or not.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-05-04  Tom de Vries  <tdevries@suse.de>

* gdb.base/async.exp: Check whether instruction addresses are a
"recommended breakpoint location".
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/async.exp