public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-28093-4717-On3GsfeoE7@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28093-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28093 --- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The gdb-11-branch branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e22715ce300957aabdf908a76fb1bf8bc17bba21 commit e22715ce300957aabdf908a76fb1bf8bc17bba21 Author: Tom Tromey <tromey@adacore.com> 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=28093 (cherry picked from commit dcd482c1b756d9da2130552a6eb58b852d6efb97) gdb/ChangeLog 2021-07-19 Tom Tromey <tromey@adacore.com> PR gdb/28093 * language.c (auto_or_unknown_language::parser): Call error. gdb/testsuite/ChangeLog 2021-07-19 Tom Tromey <tromey@adacore.com> PR gdb/28093 * gdb.base/langs.exp: Add tests. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-07-19 17:08 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-15 13:41 [Bug gdb/28093] New: " pedro at palves dot net 2021-07-15 13:43 ` [Bug gdb/28093] " pedro at palves dot net 2021-07-15 14:47 ` tromey at sourceware dot org 2021-07-15 15:44 ` tromey at sourceware dot org 2021-07-15 15:52 ` tromey at sourceware dot org 2021-07-15 16:16 ` tromey at sourceware dot org 2021-07-15 19:54 ` cvs-commit at gcc dot gnu.org 2021-07-19 17:08 ` cvs-commit at gcc dot gnu.org [this message] 2021-07-19 17:09 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28093-4717-On3GsfeoE7@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).