From patchwork Fri Dec 20 16:20:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36982 Received: (qmail 60585 invoked by alias); 20 Dec 2019 16:20:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 60519 invoked by uid 89); 20 Dec 2019 16:20:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=sk:set_is_ X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Dec 2019 16:20:17 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 3CBFD2058E; Fri, 20 Dec 2019 11:20:16 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id 728242058E; Fri, 20 Dec 2019 11:20:09 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 622AB281DA; Fri, 20 Dec 2019 11:20:09 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Fri, 20 Dec 2019 11:20:09 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Remove some TUI asserts X-Gerrit-Change-Id: I807e1e9bdb0cfa475e70375ceca3a5d4f2eb8d0b X-Gerrit-Change-Number: 633 X-Gerrit-ChangeURL: X-Gerrit-Commit: 039298ec451ecf1fa1b9ff1771168b0a5b3a6f68 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191220162009.622AB281DA@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/633 ...................................................................... Remove some TUI asserts This removes a few asserts from the TUI. These asserts aren't useful, because they simply check an invariant that's already ensured by the type system. gdb/ChangeLog 2019-12-20 Tom Tromey * tui/tui-winsource.c (tui_source_window_base::set_is_exec_point_at) (tui_source_window_base::update_breakpoint_info): Remove asserts. Change-Id: I807e1e9bdb0cfa475e70375ceca3a5d4f2eb8d0b --- M gdb/ChangeLog M gdb/tui/tui-winsource.c 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7c518ca..1fc603d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2019-12-20 Tom Tromey + * tui/tui-winsource.c (tui_source_window_base::set_is_exec_point_at) + (tui_source_window_base::update_breakpoint_info): Remove asserts. + +2019-12-20 Tom Tromey + * tui/tui-winsource.c (tui_update_source_windows_with_addr): Call tui_show_disassem. * tui/tui-disasm.h (tui_show_disassem_and_update_source): Don't diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 06c00fa..fe1eb8f 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -449,9 +449,6 @@ struct tui_line_or_address content_loa = content[i].line_or_addr; - gdb_assert (l.loa == LOA_ADDRESS || l.loa == LOA_LINE); - gdb_assert (content_loa.loa == LOA_LINE - || content_loa.loa == LOA_ADDRESS); if (content_loa.loa == l.loa && ((l.loa == LOA_LINE && content_loa.u.line_no == l.u.line_no) || (l.loa == LOA_ADDRESS && content_loa.u.addr == l.u.addr))) @@ -512,9 +509,6 @@ { struct bp_location *loc; - gdb_assert (line->line_or_addr.loa == LOA_LINE - || line->line_or_addr.loa == LOA_ADDRESS); - if (bp == being_deleted) return false;