]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: fix gdb.mi/mi-catch-cpp-exceptions.exp with clang
authorGuinevere Larsen <blarsen@redhat.com>
Tue, 23 Jul 2024 16:56:17 +0000 (13:56 -0300)
committerGuinevere Larsen <blarsen@redhat.com>
Tue, 17 Sep 2024 20:18:36 +0000 (17:18 -0300)
commitbd26cd1810ce4296b228cd31d137a0b54e40c189
tree06ec60d542bcbc9c1d7b56c20387328092ffa387
parent1794b3a18db2e5241f4daa88c99a5bcec9b1c311
gdb/testsuite: fix gdb.mi/mi-catch-cpp-exceptions.exp with clang

Clang adds line table information for a try/catch block differently to
gcc. Instead of linking the instructions related to __cxa_begin_catch to
the line containing the "catch" statement in the source code, it links
to the closing brace of the try block.

This was causing gdb.mi/mi-catch-cpp-exceptions.exp to fail when tested
with clang. The test was updated to have the catch in the same line as
the closing brace so it passes with no additional modifications with
clang.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.cc