mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
Change tui_update_breakpoint_info to be a method
This changes tui_update_breakpoint_info to be a method on tui_source_window_base. gdb/ChangeLog 2019-08-16 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (struct tui_source_window_base) <update_breakpoint_info>: Declare. (tui_update_breakpoint_info): Don't declare. * tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is) (tui_update_all_breakpoint_info): Update. (tui_source_window_base::update_breakpoint_info): Rename from tui_update_breakpoint_info. (tui_source_window_base::update_exec_info): Update.
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
2019-08-16 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-winsource.h (struct tui_source_window_base)
|
||||||
|
<update_breakpoint_info>: Declare.
|
||||||
|
(tui_update_breakpoint_info): Don't declare.
|
||||||
|
* tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is)
|
||||||
|
(tui_update_all_breakpoint_info): Update.
|
||||||
|
(tui_source_window_base::update_breakpoint_info): Rename from
|
||||||
|
tui_update_breakpoint_info.
|
||||||
|
(tui_source_window_base::update_exec_info): Update.
|
||||||
|
|
||||||
2019-08-16 Tom Tromey <tom@tromey.com>
|
2019-08-16 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* tui/tui-winsource.h (struct tui_source_window_base)
|
* tui/tui-winsource.h (struct tui_source_window_base)
|
||||||
|
@ -99,7 +99,7 @@ tui_source_window_base::update_source_window_as_is
|
|||||||
erase_source_content ();
|
erase_source_content ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tui_update_breakpoint_info (this, nullptr, false);
|
update_breakpoint_info (nullptr, false);
|
||||||
show_source_content ();
|
show_source_content ();
|
||||||
update_exec_info ();
|
update_exec_info ();
|
||||||
if (type == SRC_WIN)
|
if (type == SRC_WIN)
|
||||||
@ -448,12 +448,10 @@ tui_update_all_breakpoint_info (struct breakpoint *being_deleted)
|
|||||||
{
|
{
|
||||||
for (tui_source_window_base *win : tui_source_windows ())
|
for (tui_source_window_base *win : tui_source_windows ())
|
||||||
{
|
{
|
||||||
if (tui_update_breakpoint_info (win, being_deleted, false))
|
if (win->update_breakpoint_info (being_deleted, false))
|
||||||
{
|
|
||||||
win->update_exec_info ();
|
win->update_exec_info ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Scan the source window and the breakpoints to update the break_mode
|
/* Scan the source window and the breakpoints to update the break_mode
|
||||||
@ -463,20 +461,19 @@ tui_update_all_breakpoint_info (struct breakpoint *being_deleted)
|
|||||||
refreshed. */
|
refreshed. */
|
||||||
|
|
||||||
bool
|
bool
|
||||||
tui_update_breakpoint_info (struct tui_source_window_base *win,
|
tui_source_window_base::update_breakpoint_info
|
||||||
struct breakpoint *being_deleted,
|
(struct breakpoint *being_deleted, bool current_only)
|
||||||
bool current_only)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
bool need_refresh = false;
|
bool need_refresh = false;
|
||||||
|
|
||||||
for (i = 0; i < win->content.size (); i++)
|
for (i = 0; i < content.size (); i++)
|
||||||
{
|
{
|
||||||
struct breakpoint *bp;
|
struct breakpoint *bp;
|
||||||
extern struct breakpoint *breakpoint_chain;
|
extern struct breakpoint *breakpoint_chain;
|
||||||
struct tui_source_element *line;
|
struct tui_source_element *line;
|
||||||
|
|
||||||
line = &win->content[i];
|
line = &content[i];
|
||||||
if (current_only && !line->is_exec_point)
|
if (current_only && !line->is_exec_point)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -498,7 +495,7 @@ tui_update_breakpoint_info (struct tui_source_window_base *win,
|
|||||||
|
|
||||||
for (loc = bp->loc; loc != NULL; loc = loc->next)
|
for (loc = bp->loc; loc != NULL; loc = loc->next)
|
||||||
{
|
{
|
||||||
if (win->location_matches_p (loc, i))
|
if (location_matches_p (loc, i))
|
||||||
{
|
{
|
||||||
if (bp->enable_state == bp_disabled)
|
if (bp->enable_state == bp_disabled)
|
||||||
mode |= TUI_BP_DISABLED;
|
mode |= TUI_BP_DISABLED;
|
||||||
@ -529,7 +526,7 @@ void
|
|||||||
tui_source_window_base::update_exec_info ()
|
tui_source_window_base::update_exec_info ()
|
||||||
{
|
{
|
||||||
werase (execution_info->handle);
|
werase (execution_info->handle);
|
||||||
tui_update_breakpoint_info (this, nullptr, true);
|
update_breakpoint_info (nullptr, true);
|
||||||
for (int i = 0; i < content.size (); i++)
|
for (int i = 0; i < content.size (); i++)
|
||||||
{
|
{
|
||||||
struct tui_source_element *src_element = &content[i];
|
struct tui_source_element *src_element = &content[i];
|
||||||
|
@ -142,6 +142,14 @@ public:
|
|||||||
struct symtab *s,
|
struct symtab *s,
|
||||||
struct tui_line_or_address line_or_addr);
|
struct tui_line_or_address line_or_addr);
|
||||||
|
|
||||||
|
/* Scan the source window and the breakpoints to update the
|
||||||
|
break_mode information for each line. Returns true if something
|
||||||
|
changed and the execution window must be refreshed. See
|
||||||
|
tui_update_all_breakpoint_info for a description of
|
||||||
|
BEING_DELETED. */
|
||||||
|
bool update_breakpoint_info (struct breakpoint *being_deleted,
|
||||||
|
bool current_only);
|
||||||
|
|
||||||
/* Erase the source content. */
|
/* Erase the source content. */
|
||||||
virtual void erase_source_content () = 0;
|
virtual void erase_source_content () = 0;
|
||||||
|
|
||||||
@ -239,15 +247,6 @@ struct tui_source_windows
|
|||||||
removed from the list of breakpoints. */
|
removed from the list of breakpoints. */
|
||||||
extern void tui_update_all_breakpoint_info (struct breakpoint *being_deleted);
|
extern void tui_update_all_breakpoint_info (struct breakpoint *being_deleted);
|
||||||
|
|
||||||
/* Scan the source window and the breakpoints to update the break_mode
|
|
||||||
information for each line. Returns true if something changed and
|
|
||||||
the execution window must be refreshed. See
|
|
||||||
tui_update_all_breakpoint_info for a description of
|
|
||||||
BEING_DELETED. */
|
|
||||||
extern bool tui_update_breakpoint_info (struct tui_source_window_base *win,
|
|
||||||
struct breakpoint *being_deleted,
|
|
||||||
bool current_only);
|
|
||||||
|
|
||||||
/* Function to display the "main" routine. */
|
/* Function to display the "main" routine. */
|
||||||
extern void tui_display_main (void);
|
extern void tui_display_main (void);
|
||||||
extern void tui_update_source_windows_with_addr (struct gdbarch *, CORE_ADDR);
|
extern void tui_update_source_windows_with_addr (struct gdbarch *, CORE_ADDR);
|
||||||
|
Reference in New Issue
Block a user