forked from Imagelibrary/binutils-gdb
[gdb] Handle ^C in gnu_source_highlight_test
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>
This commit is contained in:
@@ -282,6 +282,12 @@ static void gnu_source_highlight_test ()
|
||||
{
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user