From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 49A1E3858C83; Fri, 7 Apr 2023 14:25:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49A1E3858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680877511; bh=gSehfEg4DmYXCTweqrzuuaMnnzGqmsfT+mLSDA5QdFY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eRurppl5U5sFy84Nyj/p/Kq8lsRwzbgxAVFNsnelJg2tVXPaJpnyuBcFQCkq4zg5s TVpVddj4A82+rne1cUnNX6kaQ7uB3IkCZSAu02JfjuYW31G4r/KOOF3QZx4aKfBY7H hW4k+M7naFGCQAnmhGte8yVSDgRPT04ySuwB5N2Q= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tui/30325] [gdb/tui] Stray '[' before insn adddress Date: Fri, 07 Apr 2023 14:25:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tui X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30325 --- Comment #3 from Tom de Vries --- Tentative patch: ... diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 52a0f7af00f..16badd6dbe4 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -666,7 +666,8 @@ tui_source_window_base::update_exec_info (bool refresh_= p) for (int i =3D 0; i < m_content.size (); i++) { struct tui_source_element *src_element =3D &m_content[i]; - char element[TUI_EXECINFO_SIZE] =3D " "; + /* Add 1 for terminating '\0'. Init to TUI_EXECINFO_SIZE spaces. */ + char element[TUI_EXECINFO_SIZE + 1] =3D " "; /* Now update the exec info content based upon the state of each line as indicated by the source content. */ diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 7370ae95d8b..bce9097ee41 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -58,6 +58,7 @@ DEF_ENUM_FLAGS_TYPE (enum tui_bp_flag, tui_bp_flags); #define TUI_BP_HIT_POS 0 #define TUI_BP_BREAK_POS 1 #define TUI_EXEC_POS 2 +#define TUI_SPACE_POS 3 #define TUI_EXECINFO_SIZE 4 /* Elements in the Source/Disassembly Window. */ ... --=20 You are receiving this mail because: You are on the CC list for the bug.=