diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-25 14:42:49 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-07-04 10:36:31 -0600 |
commit | 0598af4880f58af5ce7c15419551362646892c7f (patch) | |
tree | 86064bd52fa57b21c7b5a145b08c6cb2cd850a4b /gdb/tui/tui-winsource.h | |
parent | 213fd9faf563ce5726ce66c8104cbaba44ba9c09 (diff) | |
download | gdb-0598af4880f58af5ce7c15419551362646892c7f.zip gdb-0598af4880f58af5ce7c15419551362646892c7f.tar.gz gdb-0598af4880f58af5ce7c15419551362646892c7f.tar.bz2 |
Fix TUI use of "has_break" field
The TUI uses the "has_break" in two different ways: sometimes as a
boolean, and sometimes as flags.
This patch changes the TUI to be more type-safe here, and fixes the
code. I could not find a bug that this caused, so apparently this is
just cosmetic.
This deletes some code from tui_set_disassem_content. Whenver this is
called, I believe the TUI updates the breakpoint information
afterward, so this assignment is redundant; which is good because it
is also incorrect.
gdb/ChangeLog
2019-07-04 Tom Tromey <tom@tromey.com>
PR tui/24724:
* tui/tui-winsource.c (tui_clear_source_content): Update.
(tui_source_window_base::set_is_exec_point_at): Fix comment.
(tui_update_breakpoint_info): Update.
(tui_set_exec_info_content): Update.
* tui/tui-source.c (tui_set_source_content_nil): Update.
* tui/tui-disasm.c (tui_set_disassem_content): Don't set
has_break.
* tui/tui-data.h (enum tui_bp_flag): New.
(tui_bp_flags): New enum flags type.
(struct tui_source_element) <break_mode>: Change type. Rename
from has_break.
(TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT)
(TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): Don't define. Now enum
constants.
* tui/tui-winsource.h: Fix comment.
Diffstat (limited to 'gdb/tui/tui-winsource.h')
-rw-r--r-- | gdb/tui/tui-winsource.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index adf4af4..2a85a00 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -31,7 +31,7 @@ struct tui_win_info; state changed. */ extern void tui_update_all_breakpoint_info (void); -/* Scan the source window and the breakpoints to update the hasBreak +/* Scan the source window and the breakpoints to update the break_mode information for each line. Returns 1 if something changed and the execution window must be refreshed. */ extern int tui_update_breakpoint_info (struct tui_source_window_base *win, |