aboutsummaryrefslogtreecommitdiff
path: root/gdb/go-lang.c
diff options
context:
space:
mode:
authorGuinevere Larsen <blarsen@redhat.com>2023-07-21 11:10:42 +0200
committerGuinevere Larsen <blarsen@redhat.com>2023-08-24 11:08:35 +0200
commit6e7db5d6bcc383766e10c2ea6f6bf01b629db1b0 (patch)
treea500e987482000bfed75c27618a2f6c9d03fecdb /gdb/go-lang.c
parent890891f14de5f08a5e5bfa4a6907fb6ec409dd45 (diff)
downloadbinutils-6e7db5d6bcc383766e10c2ea6f6bf01b629db1b0.zip
binutils-6e7db5d6bcc383766e10c2ea6f6bf01b629db1b0.tar.gz
binutils-6e7db5d6bcc383766e10c2ea6f6bf01b629db1b0.tar.bz2
gdb/testsuite: fix testing gdb.reverse/step-reverse.exp with clang
When testing using reverse-stepi to fully step through a function, the code checks for an infinite loop by seeing if we land on the line that contains the return statement multiple times. This assumption only works if there is only one instruction associated with that line, which is how GCC handles line information, but other compilers may handle it differently. Clang-15, for instance, associates 6. Because of this, the inferior used to get seriously out of sync with the test expectations, and result in 13 spurious failures. The same issue occurs with gdb.reverse/step-precsave.exp. This commit changes the test so that we check for PC instead of line number. The test still only happens when the same line is detected, to simplify the resulting log. With this change, no new failures are emitted when using clang. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/go-lang.c')
0 files changed, 0 insertions, 0 deletions