aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2018-01-29 23:03:09 -0500
committerJoel Brobecker <brobecker@adacore.com>2018-01-29 23:04:51 -0500
commitfc413dc467e4c46013f6e5a60dc5db24d63f72ea (patch)
tree295a4c65c626ba769044b32506583c843c9ef916 /bfd/elf.c
parentaf667f2218ecf772ac2f8882ceba6a16ddc18ddc (diff)
downloadbinutils-fc413dc467e4c46013f6e5a60dc5db24d63f72ea.zip
binutils-fc413dc467e4c46013f6e5a60dc5db24d63f72ea.tar.gz
binutils-fc413dc467e4c46013f6e5a60dc5db24d63f72ea.tar.bz2
gdb.base/break.exp: fix last "info break" test failure on Ubuntu 16.04
The last test of this testcase fails when run on Ubuntu 16.04 using the system compiler (16.04): FAIL: gdb.base/break.exp: verify that they were cleared This is because the testcase expected that a breakpoint on line 47 of break.c... printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */ ... would actually be inserted on an instruction belonging to that line. However, what actually happens is that system GCC on that version of Ubuntu ends up inlining everything, including the call to printf, thus reporting every instruction of generated for this line of code as belonging to a different function. As a result, GDB ends up insering the breakpoint on the next line of code, which is line 49: (gdb) break break.c:$l Breakpoint 3 at 0x4005c1: file /[...]/gdb.base/break.c, line 49. This causes a spurious failure in the "info break" test later on, as it assumed that the breakpoint above is inserted on line 47: gdb_test "info break" "$srcfile:$line" "verify that they were cleared" This patch fixes the issue by saving the actual source location where the breakpoint was inserted. gdb/testsuite/ChangeLog: * gdb.base/break.exp: Save the location where the breakpoint on break.c:47 was actually inserted when debugging the version compiled at -O2 and use it in the expected output of the "info break" test performed soon after. tested on x86_64-linux, with two configurations: - Ubuntu 16.04 with the system compiler (breakpoint lands on line 49) - Ubuntu 16.04 with GCC 7.3.1 (breakpoint lands on line 47)
Diffstat (limited to 'bfd/elf.c')
0 files changed, 0 insertions, 0 deletions