In gnu_source_highlight_test we have:
...
try
{
res = try_source_highlight (styled_prog, language_c, fullname);
}
catch (...)
{
saw_exception = true;
}
...
This also swallows gdb_exception_quit and gdb_exception_forced_quit. I don't
know whether these can actually happen here, but if not it's better to
accommodate for the possibility anyway.
Fix this by handling gdb_exception explicitly, and rethrowing
gdb_exception_quit and gdb_exception_forced_quit.
Tested on aarch64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
{
res = try_source_highlight (styled_prog, language_c, fullname);
}
+ catch (const gdb_exception &e)
+ {
+ if (e.reason != RETURN_ERROR)
+ throw;
+ saw_exception = true;
+ }
catch (...)
{
saw_exception = true;