[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".