[PATCH] Avoid expression parsing crash with unknown language

Pedro Alves pedro@palves.net
Thu Jul 15 16:28:11 GMT 2021


On 2021-07-15 5:16 p.m., Tom Tromey wrote:
> PR gdb/28093 points out that gdb crashes when language is set to
> "unknown" and expression parsing is attempted.  At first I thought
> this was a regression due to the expression rewrite, but it turns out
> that older versions crash as well.
> 
> This patch avoids the crash by changing the default expression parser
> to throw an exception.  I think this is preferable -- the current
> behavior of silently doing nothing does not really make sense.
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28093

Looks good, thanks!


More information about the Gdb-patches mailing list