From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43EED3969835; Mon, 19 Jul 2021 17:08:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43EED3969835 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/28093] set language unknown -> print "foo" -> GDB crash Date: Mon, 19 Jul 2021 17:08:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 11.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2021 17:08:10 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28093 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The gdb-11-branch branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De22715ce3009= 57aabdf908a76fb1bf8bc17bba21 commit e22715ce300957aabdf908a76fb1bf8bc17bba21 Author: Tom Tromey Date: Thu Jul 15 10:13:18 2021 -0600 Avoid expression parsing crash with unknown language 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=3D28093 (cherry picked from commit dcd482c1b756d9da2130552a6eb58b852d6efb97) gdb/ChangeLog 2021-07-19 Tom Tromey PR gdb/28093 * language.c (auto_or_unknown_language::parser): Call error. gdb/testsuite/ChangeLog 2021-07-19 Tom Tromey PR gdb/28093 * gdb.base/langs.exp: Add tests. --=20 You are receiving this mail because: You are on the CC list for the bug.=