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 tui/27680] ui-style.c:243: internal-error: bool ui_file_style::parse(const char*, size_t*): Assertion `match == 0' failed.' Date: Tue, 06 Apr 2021 08:40:21 +0000 [thread overview] Message-ID: <bug-27680-4717-8MfVLx2EcF@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27680-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27680 --- Comment #10 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d811a7cf74fa8523f67a13c0527b27f4954e9ae1 commit d811a7cf74fa8523f67a13c0527b27f4954e9ae1 Author: Tom de Vries <tdevries@suse.de> Date: Tue Apr 6 10:40:11 2021 +0200 [gdb/tui] Fix len_without_escapes in tui-disasm.c On openSUSE Tumbleweed I run into: ... FAIL: gdb.tui/basic.exp: asm window shows main ERROR: invalid command name "_csi_L" ... Using a minimal example, we get: ... $ gdb -q outputs/gdb.tui/basic/basic -ex "tui enable" -ex "layout asm" <TUI output> src/gdb/ui-style.c:243: internal-error: bool \ ui_file_style::parse(const char*, size_t*): Assertion `match == 0' failed. ... The problem is in len_without_escapes, where we detect the start of an escape sequence, but then pass ptr to style.parse while ptr no longer points to the escape due to the ptr++ in the while condition: ... while ((c = *ptr++) != '\0') { if (c == '\033') { ui_file_style style; size_t n_read; if (style.parse (ptr, &n_read)) ... Fix this by removing the ++ in the while condition, and adding ptr++ in the loop body where appropriate. Tested on x86_64-linux. gdb/ChangeLog: 2021-04-06 Tom de Vries <tdevries@suse.de> PR tui/27680 * tui/tui-disasm.c (len_without_escapes): Pass ptr pointing at escape to style.parse. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-04-06 8:40 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-01 9:09 [Bug tui/27680] New: " vries at gcc dot gnu.org 2021-04-01 9:12 ` [Bug tui/27680] " vries at gcc dot gnu.org 2021-04-01 9:13 ` vries at gcc dot gnu.org 2021-04-01 9:20 ` vries at gcc dot gnu.org 2021-04-01 9:26 ` vries at gcc dot gnu.org 2021-04-01 9:27 ` vries at gcc dot gnu.org 2021-04-01 9:43 ` vries at gcc dot gnu.org 2021-04-01 12:55 ` tromey at sourceware dot org 2021-04-01 13:44 ` vries at gcc dot gnu.org 2021-04-01 13:49 ` tromey at sourceware dot org 2021-04-06 8:40 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-06 8:42 ` vries at gcc dot gnu.org 2021-05-01 11:00 ` stefan.bruens@rwth-aachen.de 2021-05-03 7:57 ` vries at gcc dot gnu.org 2021-05-03 12:48 ` vries at gcc dot gnu.org 2021-05-05 21:13 ` vries at gcc dot gnu.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-27680-4717-8MfVLx2EcF@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).