summaryrefslogtreecommitdiff
path: root/gdb/tui/tui-hooks.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-08-30 20:07:05 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-08-30 20:07:05 +0000
commitff9c04178000f2b0e42d928f91f3e36e0c06f647 (patch)
treed6d1e508813de1aec02f779c86dfd88d299af6ac /gdb/tui/tui-hooks.c
parentbff664b9016d9d65cb82b59c7e61e9cb365aa953 (diff)
downloadgdb-ff9c04178000f2b0e42d928f91f3e36e0c06f647.tar.gz
* tuiSourceWin.h (tui_update_all_breakpoint_info): Declare.
(tui_update_breakpoint_info): Declare. (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove. * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Update breakpoint information using tui_update_breakpoint_info. (tui_update_all_breakpoint_info): New function to refresh all execution windows. (tui_update_breakpoint_info): New function to recompute the status of exec info window from breakpoints. (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove. (tuiSetExecInfoContent): Use the exec info flags computed by tui_update_breakpoint_info to display a short status about breakpoints. * tuiData.h (TuiExecInfoContent): New for exec info string. (TuiWhichElement): Use it. (TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT): New defines. (TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): New defines. (TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS): Likewise. (TUI_EXECINFO_SIZE): Likewise. * tuiData.c (initContentElement): Clear exec info string. * tui-hooks.c (get_breakpoint): Remove. (tui_event_create_breakpoint): Call tui_update_all_breakpoint_info. (tui_event_delete_breakpoint): Likewise. (tui_event_modify_breakpoint): Likewise.
Diffstat (limited to 'gdb/tui/tui-hooks.c')
-rw-r--r--gdb/tui/tui-hooks.c60
1 files changed, 3 insertions, 57 deletions
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index d6051942a23..fe144a36590 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -167,44 +167,12 @@ tui_register_changed_hook (int regno)
}
}
-extern struct breakpoint *breakpoint_chain;
-
-/* Find a breakpoint given its number. Returns null if not found. */
-static struct breakpoint *
-get_breakpoint (int number)
-{
- struct breakpoint *bp;
-
- for (bp = breakpoint_chain; bp; bp = bp->next)
- {
- if (bp->number == number)
- return bp;
- }
- return 0;
-}
-
/* Breakpoint creation hook.
Update the screen to show the new breakpoint. */
static void
tui_event_create_breakpoint (int number)
{
- struct breakpoint *bp;
-
- bp = get_breakpoint (number);
- if (bp)
- {
- switch (bp->type)
- {
- case bp_breakpoint:
- case bp_hardware_breakpoint:
- tuiAllSetHasBreakAt (bp, 1);
- tuiUpdateAllExecInfos ();
- break;
-
- default:
- break;
- }
- }
+ tui_update_all_breakpoint_info ();
}
/* Breakpoint deletion hook.
@@ -212,35 +180,13 @@ tui_event_create_breakpoint (int number)
static void
tui_event_delete_breakpoint (int number)
{
- struct breakpoint *bp;
- struct breakpoint *b;
- int clearIt;
-
- bp = get_breakpoint (number);
- if (bp == 0)
- return;
-
- /* Before turning off the visuals for the bp, check to see that
- there are no other bps at the same address. */
- clearIt = 0;
- for (b = breakpoint_chain; b; b = b->next)
- {
- clearIt = (b == bp || b->address != bp->address);
- if (!clearIt)
- break;
- }
-
- if (clearIt)
- {
- tuiAllSetHasBreakAt (bp, 0);
- tuiUpdateAllExecInfos ();
- }
+ tui_update_all_breakpoint_info ();
}
static void
tui_event_modify_breakpoint (int number)
{
- ;
+ tui_update_all_breakpoint_info ();
}
static void