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>
try
{
bar ();
- }
- catch (const my_exception &ex) /* Catch 1. */
+ } catch (const my_exception &ex) /* Catch 1. */
{
if (i == 1)
throw; /* Throw 2. */
try
{
foo ();
- }
- catch (const my_exception &ex) /* Catch 2. */
+ } catch (const my_exception &ex) /* Catch 2. */
{
if (i == 1)
return 1; /* Stop here. */