Remove some TUI asserts
authorTom Tromey <tom@tromey.com>
Wed, 13 Nov 2019 00:02:49 +0000 (17:02 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 20 Dec 2019 16:15:50 +0000 (09:15 -0700)
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  <tom@tromey.com>

* 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

gdb/ChangeLog
gdb/tui/tui-winsource.c

index 7c518ca7bb95a978499ee1c91c5666f2b3c83a17..1fc603d8d6057621b53c62da8acdd0cf1104c6ae 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-20  Tom Tromey  <tom@tromey.com>
+
+       * 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  <tom@tromey.com>
 
        * tui/tui-winsource.c (tui_update_source_windows_with_addr): Call
index 06c00fa2b8087b4c7027071b699ed936a77c18aa..fe1eb8fc333684ed187ef28f38121a5bc4daf0e2 100644 (file)
@@ -449,9 +449,6 @@ tui_source_window_base::set_is_exec_point_at (struct tui_line_or_address l)
       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 @@ tui_source_window_base::update_breakpoint_info
         {
          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;
 
This page took 0.034989 seconds and 4 git commands to generate.