aboutsummaryrefslogtreecommitdiff
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
commit00b2bad465eaa08f94998de03f578885a98706ec (patch)
treec491a7aa469f4040401b71ec20ec333e5e19179c /gdb/tui/tui-hooks.c
parente5b45b8395cfa59cf974580a72011f4a07c87377 (diff)
downloadgdb-00b2bad465eaa08f94998de03f578885a98706ec.zip
gdb-00b2bad465eaa08f94998de03f578885a98706ec.tar.gz
gdb-00b2bad465eaa08f94998de03f578885a98706ec.tar.bz2
* 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 d605194..fe144a3 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