Introduce tui_source_window_base::location_matches_p method
authorTom Tromey <tom@tromey.com>
Fri, 28 Jun 2019 21:19:10 +0000 (15:19 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:05 +0000 (12:19 -0600)
commitc2cd8994669f63eb415522352a5d5006d0fbfb48
treea82d261431329dcffd107a687f7016bed4ad6a5c
parent4dde7b34f4e40ee6e0ea596357e4def60bd67d20
Introduce tui_source_window_base::location_matches_p method

This introduces the location_matches_p method, removing a spot that
explicitly examines a window's type.

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui-winsource.c (tui_update_breakpoint_info): Use
location_matches_p.
* tui/tui-source.c (tui_source_window::location_matches_p): New
method.
* tui/tui-disasm.c (tui_disasm_window::location_matches_p): New
method.
* tui/tui-data.h (struct tui_source_window_base)
<location_matches_p>: New method.
(struct tui_source_window, struct tui_disasm_window)
<location_matches_p>: Likewise.
gdb/ChangeLog
gdb/tui/tui-data.h
gdb/tui/tui-disasm.c
gdb/tui/tui-source.c
gdb/tui/tui-winsource.c