From 45a4356715b9d5c35c581c14e17978a1cd2aed18 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 31 Jan 2011 15:16:59 +0000 Subject: * infcmd.c (finish_backward): Use breakpoint_set_silent. * python/py-breakpoint.c (bppy_set_silent): Use breakpoint_set_silent. (bppy_set_thread): Use breakpoint_set_thread. (bppy_set_task): Use breakpoint_set_task. * breakpoint.h (breakpoint_set_silent, breakpoint_set_thread) (breakpoint_set_task): Declare. (make_breakpoint_silent): Remove. * breakpoint.c (breakpoint_set_silent): New function. (breakpoint_set_thread): Likewise. (breakpoint_set_task): Likewise. (make_breakpoint_silent): Remove. --- gdb/breakpoint.c | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index ff0ea18..60d91ac 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -940,6 +940,46 @@ breakpoint_set_commands (struct breakpoint *b, observer_notify_breakpoint_modified (b->number); } +/* Set the internal `silent' flag on the breakpoint. Note that this + is not the same as the "silent" that may appear in the breakpoint's + commands. */ + +void +breakpoint_set_silent (struct breakpoint *b, int silent) +{ + int old_silent = b->silent; + + b->silent = silent; + if (old_silent != silent) + observer_notify_breakpoint_modified (b->number); +} + +/* Set the thread for this breakpoint. If THREAD is -1, make the + breakpoint work for any thread. */ + +void +breakpoint_set_thread (struct breakpoint *b, int thread) +{ + int old_thread = b->thread; + + b->thread = thread; + if (old_thread != thread) + observer_notify_breakpoint_modified (b->number); +} + +/* Set the task for this breakpoint. If TASK is 0, make the + breakpoint work for any task. */ + +void +breakpoint_set_task (struct breakpoint *b, int task) +{ + int old_task = b->task; + + b->task = task; + if (old_task != task) + observer_notify_breakpoint_modified (b->number); +} + void check_tracepoint_command (char *line, void *closure) { @@ -10738,13 +10778,6 @@ set_ignore_count (int bptnum, int count, int from_tty) error (_("No breakpoint number %d."), bptnum); } -void -make_breakpoint_silent (struct breakpoint *b) -{ - /* Silence the breakpoint. */ - b->silent = 1; -} - /* Command to set ignore-count of breakpoint N to COUNT. */ static void -- cgit v1.1