[PATCH 1/7] [gdb] Handle ^C in gnu_source_highlight_test

Tom de Vries tdevries@suse.de
Tue Sep 24 14:52:32 GMT 2024


On 9/23/24 19:45, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> In gnu_source_highlight_test we have:
> Tom> ...
> Tom>   try
> Tom>     {
> Tom>       res = try_source_highlight (styled_prog, language_c, fullname);
> Tom>     }
> Tom>   catch (...)
> Tom>     {
> Tom>       saw_exception = true;
> Tom>     }
> Tom> ...
> 
> Tom> This also swallows gdb_exception_quit and gdb_exception_forced_quit.  I don't
> Tom> know whether these can actually happen here, but if not it's better to
> Tom> accommodate for the possibility anyway.
> 
> It's doubtful but safe enough.
> 
> Tom> Fix this by handling gdb_exception explicitly, and rethrowing
> Tom> gdb_exception_quit and gdb_exception_forced_quit.
> 
> Approved-By: Tom Tromey <tom@tromey.com>

I've pushed this series as posted, unless mentioned otherwise in an 
individual reply.

Thanks for the reviews.

- Tom



More information about the Gdb-patches mailing list